singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles edited a comment on issue #691: Add save and load method for Module class
Date Sat, 16 May 2020 08:30:04 GMT

nudles edited a comment on issue #691:
URL: https://github.com/apache/singa/issues/691#issuecomment-629609089


   To be consistent, I think we'd better always call `m.compile()` explicitly?
   ```python
   m=MyModel()
   m.compile([x], use_graph=True)
   m.load_states(fpath)
   
   m=MyONNXModel(onnx_model)
   m.compile([x], use_graph=True)
   
   m=singa.load(fpath)
   m.compile([x], use_graph=True)
   ```
   
   Then the `load_states()` only has a single argument, i.e., fpath.
   
   Any better solution?


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