singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles opened a new issue #691: Add save and load method for Module class
Date Sat, 09 May 2020 09:06:33 GMT

nudles opened a new issue #691:
URL: https://github.com/apache/singa/issues/691


   ```python
   def save(self, fpath, include_state=False):
       """Save the model in onnx format.
   
       Args:
          fpath: output file path (without the extension)
          include_state(bool): if true, save the state data to fpath.state.
       """
   
   def load(self, fpath, include_state=False):
       """Load the model from file in onnx format.
       
        Args:
          fpath: input file path (without the extension)
          include_state(bool): if true, load the state from fpath.state.
   ```
   
   The state data includes the graph_model, the model's input data shape and device (is it
cuda device), the optimizer and loss function.
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message