New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load trainability status of layers when importing them from JSON configuration #153
Comments
I agree that it could be implemented now, but in reality, we need to add more check/IllegalStateExceptions if the layer implementing the NoGradients layer has an The idea is the following: layers with NoGradient marker interface should have this status as |
I can do this one |
Should these checks u mention for NoGradients layers be applied only to these, or to other layers as well. Because some layers do set |
Yo @zaleslaw or @mkaze what do ya think about something like this: I don't really like how the default value is public var isTrainable: Boolean = this is NoGradients without leaking I see three options:
But maybe one of your has a better idea (or anyone else!!) |
Similar to #107, the trainability status of a layer is not taken into account when importing it from JSON configuration, e.g. if a layer is freezed in the saved JSON configuration it might be loaded as trainable (depending on the default value of
isTrainable
property for that layer).To fix this, either each of the layer creator functions in
ModelLoader.kt
should be modified to set theisTrainable
property of the created layer with value ofconfig.trainable
; or alternatively, this could be done in a single place likeconvertToLayer
function for all layers. Further, one should take into account this issue when implementing a fix.The text was updated successfully, but these errors were encountered: