cjerry1243 / mobilenetv2_tf_to_caffe Goto Github PK
View Code? Open in Web Editor NEWconvert tensorflow mobilenet-v2 checkpoint to caffemodel
convert tensorflow mobilenet-v2 checkpoint to caffemodel
When I add the code : compare_layer_output(net, 'conv1', checkpoint, 'MobilenetV2/Conv/Conv2D:0', image_file) in converter_v2.py
error occurs:
('Save converted caffemodel to', 'caffemodel_fromckpt/mobilenet_v2_1.0_224.caffemodel')
Traceback (most recent call last):
File "converter_v2.py", line 297, in
compare_layer_output(net, 'conv1', checkpoint, 'MobilenetV2/Conv/Conv2D:0', image_file)
File "converter_v2.py", line 278, in compare_layer_output
tf_output = sess.run(tensor, feed_dict={images: image})
File "/home/lyq/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/home/lyq/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1111, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (3, 224, 224) for Tensor u'Placeholder:0', which has shape '(?, 224, 224, 3)'
I solved ther problem by change the channl, but there is alos problems,,
Traceback (most recent call last):
File "run_ckpt.py", line 126, in
compare_layer_output(net, layer_name, checkpoint_path, tensor_name, image_file)
File "run_ckpt.py", line 107, in compare_layer_output
err = square_error(tf_output[0, :, :, i], caffe_output[0, :, :, i])
File "run_ckpt.py", line 75, in square_error
return np.sum(np.square(x-x_))
ValueError: operands could not be broadcast together with shapes (112,112) (113,113)
why the channel output of tf and caffe are not equal, that is vey strange
Thanks for your job. I have test your tool, it's great.
And when I check the prototxt which you provided, I found there is not exist "conv2_1/expand" block? But when I check other's implement, there is a "conv2_1/expand" block used 1*1 conv operate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.