Comments (6)
@xtanitfy It's quite easy to debug or view the contents of some tensors by tensorflow, e.g. tf.Print, tf.Debug, or you can use tf.py_func to wrap any function in python with anything you can do.
from ssd.tensorflow.
Thank you very much!
But with the callback of tf.estimator, what time do I print by using tf.Print or tf.Debug?
from ssd.tensorflow.
@xtanitfy there is no necessary to use callback, you can place tf.Print anywhere in you codes
from ssd.tensorflow.
I think i can use tf.py_func to dispose of any tensor。Thanks!
from ssd.tensorflow.
def my_function(array1, array2):
return array1 + array2, array1 - array2, array1 * array2, np.dot(array1, array2)
def debug_value(array,name):
with open(name+'.txt','w') as f:
f.write(str(array))
return array
if name == 'main':
array1 = np.array([[1, 2], [3, 4]])
array2 = np.array([[5, 6], [7, 8]])
a1 = tf.placeholder(dtype=tf.float32, shape=[2, 2], name='array1')
a2 = tf.placeholder(dtype=tf.float32, shape=[2, 2], name='array2')
b1 = a1 * 2
b1 = tf.py_func(debug_value,[b1,'b1'],[tf.float32])
y1, y2, y3, y4 = tf.py_func(my_function, [b1, a2], [tf.float32, tf.float32, tf.float32, tf.float32])
with tf.Session() as sess:
tf.global_variables_initializer().run()
_y1, _y2, _y3, _y4 = sess.run([y1, y2, y3, y4], feed_dict={a1: array1, a2: array2})
print(_y1)
print('*' * 8)
print(_y2)
print('*' * 8)
print(_y3)
print('*' * 8)
print(_y4)
from ssd.tensorflow.
I use this way to debug the value.
from ssd.tensorflow.
Related Issues (20)
- Is the coordinate position of the detection box upper left corner, lower right corner or upper left corner with width and height?
- How can I use multi-GPUs to train the ssd model? HOT 1
- the pixel of train_image_size is 256
- InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error: Assign requires shapes of both tensors to match. lhs shape= [1,1,1024,1024] rhs shape= [1,1,4096,4096] [[node save/Assign_29 (defined at E:\Infrared_Deeplearning\SSD-AbsoluteCoord\utility\scaffolds.py:86) ]] HOT 2
- 为什么开始训练后执行到一定情况就会卡住,然后CPU占用率满,但是gpu为0 HOT 1
- 为什么多GPU并行报OOM
- Why there are no celoss ,locloss and loss images after I finish training on my own dataset?
- 请问如何在GPU上运行? HOT 1
- How to train my own
- How to train my own Dataset? HOT 1
- How to continue the last training? HOT 1
- eval_ssd.py 生成的预测结果文件中没有filename HOT 1
- TypeError: Expected binary or unicode string, got None
- may i have a script for transferring .ckpt to .pb
- Hello, can this network run under win10 + CPU environment?
- 请问我在执行eval——
- 请问我在执行eval_ssd.py遇到的问题,下面是报错内容
- voc_eval.py 211行出现keyerror: File "voc_eval.py", line 211, in voc_eval R = class_recs[image_ids[d]] KeyError: '000000117121' HOT 3
- 怎样把Tensor转换成NDArray
- tensorflow.python.framework.errors_impl.NotFoundError: Could not find directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssd.tensorflow.