lFatality / tensorflow2caffe

Convert a model from TensorFlow to Caffe.
MIT License
112 stars 31 forks source link

Output not completely match #1

Open LaTieCheng opened 5 years ago

LaTieCheng commented 5 years ago

Hi there,

Thank you very much for providing such a helpful tutorial. I realize that in the example you provided, some of the outputs' last digits are not matching, is this a rounding difference between tensorflow and caffe, or there is an issue?

Many thx!

lFatality commented 5 years ago

As far as I remember there were no differences in the output of the Caffe and Tensorflow model. If you check out the last video in the series you can see that I compare the output of both models and they match (https://youtu.be/kvXHOIn3-8s?t=1081).

If you use Python 2 for Caffe and Python 3 for Tensorflow you have to import division in your Caffe code, otherwise the results don't match, so I included this line: from __future__ import division
Maybe this doesn't fit your setup?

I'm not sure why the results shouldn't match. I didn't have problems then and you are the first to report any error. Maybe double check if your setup is different or anything else interferes, otherwise I'd recommend to check the weights/biases and outputs of every layer and see where the differences occur. I gave some hints on how to debug at the end of the last video.