write_metadata_into_onnx
-
Description: Writes custom metadata into an ONNX model.
-
Parameters
- onnx_path (
Union[str, Path]
): The path to the ONNX model. - out_path (
Union[str, Path]
): The path to save the output ONNX model. - drop_old_meta (
bool
): Whether to remove the old metadata. Default isFalse
. **kwargs
: Custom metadata.
- onnx_path (
-
Example
import capybara as cb
onnx_path = 'model.onnx'
out_path = 'model_with_metadata.onnx'
cb.write_metadata_into_onnx(
onnx_path,
out_path,
drop_old_meta=False,
key1='value1',
key2='value2',
key3='value3',
)