Saving class args to restore model without instantiating #2747
-
|
Usually, in all the docs and tutorials I saw, we first need to create an As you see, we have to "remember" the args Is there a way to save these args when saving the model, so the only information needed to restore the model is the class type I was thinking that we could save the args separately as a metadata dict and later retrieve it, but I was wondering if there was another prefered way to do so. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Usually, din & dout are considered as model configs. You can save them in json or yaml format along with your checkpoint folder. These config parameters are not necessary to be saved in every checkpoint as they don't change. |
Beta Was this translation helpful? Give feedback.
Usually, din & dout are considered as model configs. You can save them in json or yaml format along with your checkpoint folder. These config parameters are not necessary to be saved in every checkpoint as they don't change.