Skip to content

Releases: PINTO0309/sam4onnx

1.0.16

28 May 23:01
84cd2fe
Compare
Choose a tag to compare
  • Retention of metadata_props

What's Changed

Full Changelog: 1.0.15...1.0.16

1.0.15

30 Apr 05:24
6e72b47
Compare
Choose a tag to compare
  • Fix to preserve domain and ir_version

What's Changed

Full Changelog: 1.0.14...1.0.15

1.0.14

02 May 06:40
34baba6
Compare
Choose a tag to compare
  • Support for recursive search of subgraphs of If OP.
  • Enhanced functionality to allow parameter rewriting even when the OP to be rewritten is in a hierarchy of multi-level subgraphs.
    • main graph
      image
    • sub graph.1
      image
    • sub graph.2
      image

What's Changed

  • Support for recursive search of subgraphs of If OP. by @PINTO0309 in #4

Full Changelog: 1.0.13...1.0.14

1.0.13

26 Feb 17:30
76c3411
Compare
Choose a tag to compare
  • Support for rewriting the output shape of operations
      -os OUTPUT_SHAPES OUTPUT_SHAPES, --output_shapes OUTPUT_SHAPES OUTPUT_SHAPES
        Specifies the name of the output to be changed. output_shapes can be specified multiple times.
        --output_shapes output_name1 shape1
        --output_shapes output_name2 shape2
    
        e.g.
        --output_shapes output_name1 [1]
        --output_shapes output_name2 [1,3,224,224]
    

What's Changed

  • Support for rewriting the output shape of operations by @PINTO0309 in #3

Full Changelog: 1.0.12...1.0.13

1.0.12

02 Jan 16:34
976418b
Compare
Choose a tag to compare

What's Changed

  • Support for models with custom domains by @PINTO0309 in #2

New Contributors

Full Changelog: 1.0.11...1.0.12

1.0.11

08 Sep 11:39
Compare
Choose a tag to compare
  • Add short form parameter
    $ sam4onnx -h
    
    usage:
        sam4onnx [-h]
        -if INPUT_ONNX_FILE_PATH
        -of OUTPUT_ONNX_FILE_PATH
        [-on OP_NAME]
        [-a NAME DTYPE VALUE]
        [-da DELETE_ATTRIBUTES [DELETE_ATTRIBUTES ...]]
        [-ic NAME DTYPE VALUE]
        [-n]
    
    optional arguments:
      -h, --help
        show this help message and exit
    
      -if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH
        Input onnx file path.
    
      -of OUTPUT_ONNX_FILE_PATH, --output_onnx_file_path OUTPUT_ONNX_FILE_PATH
        Output onnx file path.
    
      -on OP_NAME, --op_name OP_NAME
        OP name of the attributes to be changed.
        When --attributes is specified, --op_name must always be specified.
        e.g. --op_name aaa
    
      -a ATTRIBUTES ATTRIBUTES ATTRIBUTES, --attributes ATTRIBUTES ATTRIBUTES ATTRIBUTES
        Parameter to change the attribute of the OP specified in --op_name.
        If the OP specified in --op_name has no attributes,
        it is ignored. attributes can be specified multiple times.
        --attributes name dtype value dtype is one of
        "float32" or "float64" or "int32" or "int64" or "str".
        https://github.com/onnx/onnx/blob/main/docs/Operators.md
    
        e.g.
        --attributes alpha float32 [[1.0]]
        --attributes beta float32 [1.0]
        --attributes transA int64 0
        --attributes transB int64 0
    
      -da DELETE_ATTRIBUTES [DELETE_ATTRIBUTES ...], --delete_attributes DELETE_ATTRIBUTES [DELETE_ATTRIBUTES ...]
        Parameter to delete the attribute of the OP specified in --op_name.
        If the OP specified in --op_name has no attributes,
        it is ignored. delete_attributes can be specified multiple times.
        --delete_attributes name1 name2 name3
        https://github.com/onnx/onnx/blob/main/docs/Operators.md
    
        e.g. --delete_attributes alpha beta
    
      -ic INPUT_CONSTANTS INPUT_CONSTANTS INPUT_CONSTANTS, --input_constants INPUT_CONSTANTS INPUT_CONSTANTS INPUT_CONSTANTS
        Specifies the name of the constant to be changed.
        If you want to change only the constant,
        you do not need to specify --op_name and --attributes.
        input_constants can be specified multiple times.
        --input_constants constant_name numpy.dtype value
    
        e.g.
        --input_constants constant_name1 int64 0
        --input_constants constant_name2 float32 [[1.0,2.0,3.0],[4.0,5.0,6.0]]
        --input_constants constant_name3 float32 [\'-Infinity\']
    
      -n, --non_verbose
        Do not show all information logs. Only error logs are displayed.
    

1.0.10

07 Aug 04:47
Compare
Choose a tag to compare
  • Supports the specification of -np.inf, -np.inf, "Infinity", and "-Infinity"
    image

1.0.9

17 Jul 14:40
Compare
Choose a tag to compare
  • Support for constant rewriting when the same constant is shared. Valid only when op_name is specified. Generates a new constant that is different from the shared constant.

  • Reshape_156 onnx::Reshape_391 int64 [1, -1, 85]
    image

  • Reshape_174 onnx::Reshape_391 int64 [1, -1, 85]
    image

    sam4onnx \
    --input_onnx_file_path yolov7-tiny_test_sim.onnx \
    --output_onnx_file_path yolov7-tiny_test_sim_mod.onnx \
    --op_name Reshape_156 \
    --input_constants onnx::Reshape_391 int64 [1,14400,85]
  • Reshape_156 onnx::Reshape_391 int64 [1, -1, 85] -> Reshape_156 onnx::Reshape_391_mod_3 int64 [1, 14400, 85]
    image

  • Reshape_174 onnx::Reshape_391 int64 [1, -1, 85]
    image

1.0.8

07 Jun 23:19
Compare
Choose a tag to compare
  • string attributes bug fixes

1.0.7

25 May 06:41
b27a1df
Compare
Choose a tag to compare
  • Security update
  • README update