There is a newer version of the record available.

Published September 25, 2022 | Version 1.5.27
Software Open

Tools to convert ONNX files (NCHW) to TensorFlow format (NHWC)

Authors/Creators

Description

  1. Improved full validation algorithm
  2. Problem solved where validation could fail for a sequence of tensors of the same shape. Bug in onnx_tf_tensor_validation #139
  3. Validation speed is now approximately five times faster.
  4. The more complex the structure of the model, the greater the improvement in validation speed.
  5. When converting pidnet_S_cityscapes_192x320.onnx, I noticed that the output size of AveragePool is different between ONNX and TensorFlow, but I will separate the correspondence from this pull request. Maybe this pull request will improve it. MaxPool padding insertion logic update #138
    INFO: onnx_op_type: AveragePool onnx_op_name: /spp/scale2/scale2.0/AveragePool
    INFO:  input_name.1: /layer5/layer5.1/Add_output_0 shape: [1, 512, 3, 5] dtype: float32
    INFO:  output_name.1: /spp/scale2/scale2.0/AveragePool_output_0 shape: [1, 512, 1, 2] dtype: float32
    INFO: tf_op_type: AveragePooling2D
    INFO:  input.1.x: name: tf.math.add_81/Add:0 shape: (1, 3, 5, 512) dtype: <dtype: 'float32'> 
    INFO:  input.2.pool_size: val: [9, 9] 
    INFO:  input.3.strides: val: [4, 4] 
    INFO:  input.4.padding: val: [[0, 0], [4, 4], [4, 4], [0, 0]] 
    INFO:  output.1.output: name: tf.concat_1/concat:0 shape: (1, 2, 2, 512) dtype: <dtype: 'float32'>
    
  6. Changed Skipped indication to Skipped (Deleted or Shape Unmatched).
  • sample
    onnx2tf -i pidnet_S_cityscapes_192x320.onnx -cotof -cotoa 1e-4
    
  • Before
  • After
What's Changed

Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.5.26...1.5.27

Notes

If you use onnx2tf in your research, please cite it using these metadata.

Files

PINTO0309/onnx2tf-1.5.27.zip

Files (447.0 kB)

Name Size Download all
md5:e9c65471843786f23646e1d34063b000
447.0 kB Preview Download

Additional details

Related works