singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles commented on issue #691: Add save and load method for Module class
Date Fri, 15 May 2020 11:18:43 GMT

nudles commented on issue #691:
URL: https://github.com/apache/singa/issues/691#issuecomment-629179541


   > 
   > 
   > I guess "high/low priority" refers to the preference? In the "low priority" option,
the `save` and `load` is non intrusive/not part of class `module`.
   > Personally, serialization, is a mechanism telling how to handle a class, is preferred
to be non intrusive/ not part of the class. The class itself is a structure. For example `mymodel
= MyModel(); mymodel.load(fp)`. Maybe can be `mymodel=singa.module.load(fp)`
   
   we provide two approaches.
   1. save and load as class method. The disk file is in onnx format. Major application scenario:
checkpoint and restore training. Or rename is to checkpoint() and restore().
   2. singa.save() and singa.load(). Major application scenario: we do not have the code of
MyModule and only have the serialized model. The disk file is in pickle format as we use pickle
to serialize MyModule class.


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