Sam4onnx

Latest version: v1.0.16

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.0.16

- Retention of metadata_props

What's Changed
* Retention of metadata_props by PINTO0309 in https://github.com/PINTO0309/sam4onnx/pull/6


**Full Changelog**: https://github.com/PINTO0309/sam4onnx/compare/1.0.15...1.0.16

1.0.15

- Fix to preserve domain and ir_version

What's Changed
* Fix to preserve domain and ir_version by PINTO0309 in https://github.com/PINTO0309/sam4onnx/pull/5


**Full Changelog**: https://github.com/PINTO0309/sam4onnx/compare/1.0.14...1.0.15

1.0.14

- 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](https://user-images.githubusercontent.com/33194443/235596381-b0b33548-6718-4f87-b3ee-3353bd966354.png)
- sub graph.1
![image](https://user-images.githubusercontent.com/33194443/235596582-adc8695d-58ba-4196-aeb0-a99b2e97c942.png)
- sub graph.2
![image](https://user-images.githubusercontent.com/33194443/235596737-fa7b5e1f-769c-4798-bc44-031bf366867a.png)

What's Changed
* Support for recursive search of subgraphs of `If` OP. by PINTO0309 in https://github.com/PINTO0309/sam4onnx/pull/4


**Full Changelog**: https://github.com/PINTO0309/sam4onnx/compare/1.0.13...1.0.14

1.0.13

- 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 https://github.com/PINTO0309/sam4onnx/pull/3


**Full Changelog**: https://github.com/PINTO0309/sam4onnx/compare/1.0.12...1.0.13

1.0.12

What's Changed
* Support for models with custom domains by PINTO0309 in https://github.com/PINTO0309/sam4onnx/pull/2

New Contributors
* PINTO0309 made their first contribution in https://github.com/PINTO0309/sam4onnx/pull/2

**Full Changelog**: https://github.com/PINTO0309/sam4onnx/compare/1.0.11...1.0.12

1.0.11

- 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.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.