Created
September 6, 2016 14:17
-
-
Save farrajota/415e889fe78b476167781d01df9cfe98 to your computer and use it in GitHub Desktop.
freeze parameters of a layer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.modules[1].parameters = function() return nil end -- freezes the layer when using optim | |
model.modules[1].accGradParameters = function() end -- overwrite this to reduce computations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment