Add a PyTorch to Tensorflow tutorial#68
Conversation
|
Hi, I have just run the PyTorch to Tensorflow tutorial with nothing changed. I want to test whether the generated pb file can generate a same result as pytorch model. So I input an image resized to (28,28). I have tried to input image after transform.ToTensor and put it into pytorch model. The generated output is not the same with the output = tf_rep.run(np.asarray(img, dtype=np.float32)[np.newaxis, np.newaxis, :, :]). So I also tried to put the 28x28 image into pytorch model directly, which can not generate a same result as tf output either. Do you have any suggestions to this problem? |
|
@XiaodanLi001 you can do layer by layer comparison. The models seem not very deep. Manually insert ing some print statement should not be too hard. Also you can leverage tools like tensorboard. @winnietsang may have better suggestion. |
Add an end-to-end tutorial that show user how to convert a PyTorch model to Tensorflow model