Skip to content
Snippets Groups Projects
Commit ee385e23 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Wrapper] add onnx save and modelproto accessors

parent f006c320
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,18 @@ class ModelWrapper:
def graph(self, value):
self._model_proto.graph = value
@property
def model(self):
return self._model_proto
@model.setter
def model(self, value):
self._model_proto = value
def save(self, filename):
"""Save the wrapper ONNX ModelProto into a file with given name."""
onnx.save(self._model_proto, filename)
def transform_repeated(self, transform):
"""Applies given transform repeatedly until no more changes can be made
and returns a transformed ModelWrapper instance.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment