Skip to content

Releases: PINTO0309/onnx2tf

1.21.1

13 May 10:04
3807991
Compare
Choose a tag to compare
  • Constant
    • Bring Constant layers unconnected to the model into the model.

    • It is assumed that the -nuo option is specified because running onnxsim will remove constants from the ONNX file.

    • Wrap constants in a Lambda layer and force them into the model.

    • toy_with_constant.onnx.zip

    • Convert test

      onnx2tf -i toy_with_constant.onnx -nuo -cotof
      ONNX TFLite
      image image

      image

    • Inference test

      import tensorflow as tf
      import numpy as np
      from pprint import pprint
      
      interpreter = tf.lite.Interpreter(model_path="saved_model/toy_with_constant_float32.tflite")
      interpreter.allocate_tensors()
      
      input_details = interpreter.get_input_details()
      output_details = interpreter.get_output_details()
      
      interpreter.set_tensor(
          tensor_index=input_details[0]['index'],
          value=np.ones(tuple(input_details[0]['shape']), dtype=np.float32)
      )
      interpreter.invoke()
      
      variable_output = interpreter.get_tensor(output_details[0]['index'])
      constant_output = interpreter.get_tensor(output_details[1]['index'])
      
      print("=================")
      print("Variable Output:")
      pprint(variable_output)
      print("=================")
      print("Constant Output:")
      pprint(constant_output)
      =================
      Variable Output:
      array([[-0.02787317, -0.05505124,  0.05421712,  0.03526559, -0.14131774,
               0.0019211 ,  0.08399964,  0.00433664, -0.00984338, -0.03370604]],
            dtype=float32)
      =================
      Constant Output:
      array([1., 2., 3., 4., 5.], dtype=float32)
      
  • Constant outputs removed from ONNX during conversion #627

1.21.0

07 May 10:43
429627c
Compare
Choose a tag to compare
  • Fix Typo
  • Change API parameter names

What's Changed

Full Changelog: 1.20.10...1.21.0

1.20.10

07 May 06:55
a851283
Compare
Choose a tag to compare
  • YOLOvN ONNX
  • Fixed to restore metadata
  • pip install -U sng4onnx>=1.0.4 sne4onnx>=1.0.13
    image

What's Changed

Full Changelog: 1.20.9...1.20.10

1.20.9

06 May 04:46
30f25f7
Compare
Choose a tag to compare

What's Changed

  • [experimental] Support for dynamic Tile, dynamic Reshape by @PINTO0309 in #623

Full Changelog: 1.20.8...1.20.9

1.20.8

05 May 16:42
bf8e894
Compare
Choose a tag to compare
onnx2tf \
-i maskrcnn_resnet50_fpn.onnx \
-onimc boxes.55 onnx::Shape_3316 3315 onnx::Loop_3751

image

What's Changed

  • Improved conversion stability of subgraphs of If operations. by @PINTO0309 in #622

Full Changelog: 1.20.7...1.20.8

1.20.7

05 May 14:45
4207e99
Compare
Choose a tag to compare

image

  • Bug fix. ReduceL1, ReduceL2, ReduceLogSum, ReduceLogSumExp, ReduceMax, ReduceMean, ReduceMin, ReduceProd, ReduceSum, ReduceSumSquare

What's Changed

Full Changelog: 1.20.6...1.20.7

1.20.6

05 May 05:50
dc87588
Compare
Choose a tag to compare
  • MaxPool, AveragePool
    • Improved conversion stability when H, W and D of MaxPool and AveragePool contain undefined dimensions.
    • The accuracy of the converted model is not always accurate.
    • e.g. YOLOvNn dynamic inputs [N, 3, H, W]
    • YOLOvN has been modified only to avoid a situation where the conversion aborts, although this is undoubtedly not good for the design of the model, as fixed parameters such as the number of classes are embedded in the backward Split operation with fixed values.
    • Concatenating dimensions that have completely different meanings is also a major problem.
    • Unless you replace the PyTorch implementation with Slice, you won't be able to do proper inferencing.
      • ONNX
        image
        image
      • TFLite
        image
        image

What's Changed

  • Improved conversion stability when H, W and D of MaxPool and AveragePool contain undefined dimensions by @PINTO0309 in #620

Full Changelog: 1.20.5...1.20.6

1.20.5

02 May 01:24
21e9374
Compare
Choose a tag to compare

1.20.4

30 Apr 12:22
a4b27ff
Compare
Choose a tag to compare
  • [experimental, Breaking change] tf.keras -> tf_keras
  • pip install tf-keras~=2.16
  • Because the API path for tf.keras is obsolete.

What's Changed

  • [experimental, Breaking change] tf.keras -> tf_keras by @PINTO0309 in #618

Full Changelog: 1.20.3...1.20.4

1.20.3

30 Apr 01:29
10befb9
Compare
Choose a tag to compare
  • ReduceL1, ReduceL2, ReduceLogSum, ReduceLogSumExp, ReduceMax, ReduceMean, ReduceMin, ReduceProd, ReduceSum, ReduceSumSquare
    • Improve stability of axes conversion when an unknown dimension order other than NCHW is input to ReduceXXX.
    • Automatically compensates for mistakes in axes dimensional transpositions.
  • Error
    image
    image
  • Fixed
    image
  • Op Error about "Transpose" #616

What's Changed

  • Improve stability of axes conversion when an unknown dimension order other than NCHW is input to ReduceXXX by @PINTO0309 in #617

Full Changelog: 1.20.2...1.20.3