You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I as referenced by the documentation, I got an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() missing 2 required positional arguments: 'name' and 'forward'
So, the documentation needs be updated to note what kind of model instance has to be used for reading from disk. Can I use a generic Model("unknown", lambda x: None) or do I need a look-alike model to the one I'm reading?
The text was updated successfully, but these errors were encountered:
I'm standing before the same issue. I got the results I wanted (pending error analysis) by loading the model from the same config that I used when training, and calling from_disk on that.
config = Config().from_disk("config.cfg")
config = registry.resolve(config)
model = config["model"].from_disk("model")
So I get the feeling from_disk only reads the trained weights of the model, but not the model architecture? I also hope this can be clarified in the documentation.
Yes the .from_disk() method only reads binary weights. We don't want to invoke code during deserialisation, so you have to set up the model how you expect it to be on the other side. You can use the registry to help with this.
When I tried literally running
I as referenced by the documentation, I got an error:
So, the documentation needs be updated to note what kind of model instance has to be used for reading from disk. Can I use a generic
Model("unknown", lambda x: None)
or do I need a look-alike model to the one I'm reading?The text was updated successfully, but these errors were encountered: