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 would like to point out a problem that I found while developing a custom model: layer's weights are not saved if a Model subclass initializes a custom layer that contains sublayers in a class-level list variable called self._layers. The code below proves the issue and should illustrates it better.
I think that the same problem has been solved for the Model class by declaring a setter method (line 170). Perhaps it is possible to use the same approach for the Layer class.
The text was updated successfully, but these errors were encountered:
Yes now I know, but since it is not documented anywhere and it is not an uncommon name to use for a property, I was suggesting to apply the same approach used for the Model class and print an error when trying to set the property from the child class. Because it was not easy to find the error since you only know that something is wrong after the training and you have no errors or warnings.
Hi everyone,
I would like to point out a problem that I found while developing a custom model: layer's weights are not saved if a Model subclass initializes a custom layer that contains sublayers in a class-level list variable called
self._layers
. The code below proves the issue and should illustrates it better.The output is:
I think that the same problem has been solved for the
Model
class by declaring a setter method (line 170). Perhaps it is possible to use the same approach for theLayer
class.The text was updated successfully, but these errors were encountered: