Skip to content

Pytorch to tensorflow inference results are different #595

Description

@EnisBerk

Hi,
I am trying to convert tensorflow VGGish to pytorch.
You can see step by step what I am doing in that google colab notebook

Problems:

  • MMdnn handling NWHC order wrong. If I use master branch I got reshape(1,W,H,1), using latest release I got reshape(-1,W,H,1). (on the notebook, I am using latest master).
  • When I resolve that problem model expects float32 input and does not do casting itself. (that might be expected)
  • My biggest problem is results are different. You can see in the notebook I shared, checksums are different. Is that expected ?

I am using google Colab:
Platform (like ubuntu 16.04/win10):
Ubuntu version: "17.10 (Artful Aardvark)"
Python version:
3.6.3
Source framework with version (like Tensorflow 1.4.1 with GPU):
Tensorflow 1.13.0-rc1 with GPU
Destination framework with version (like CNTK 2.3 with GPU):
Pytorch 1.0.1 with GPU

Pre-trained model path (webpath or webdisk path):
https://github.com/tensorflow/models/tree/master/research/audioset
https://storage.googleapis.com/audioset/vggish_model.ckpt
Running scripts:
colab research google
mirror on github

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions