Network.__new__
's required params
argument breaks torch compatibility
#577
Milestone
Network.__new__
's required params
argument breaks torch compatibility
#577
When this is a required arg, it breaks
torch.save()
andtorch.load()
. But more importantly, it also breaks code that doescopy.deepcopy(model)
.One option is to make it an optional keyword arg which defaults to
None
. Whentorch.load()
de-serializes an object, it will first call__new__
to create a class, then create an instance and populate this with data, such that in this caseparams=None
is justified.The text was updated successfully, but these errors were encountered: