-
Notifications
You must be signed in to change notification settings - Fork 17
Carl Vondrick edited this page Sep 12, 2016
·
1 revision
net:forward(input) -- forward data first!
net.modules[LAYER].output
The below will create a copy of the network with all weights shared. The running_mean and running_var are for batch normalization, and you can remove them if you want.
net2 = net:clone('weight', 'bias', 'gradWeight', 'gradBias', 'running_mean', 'running_var')
net:apply(function(m) m.accGradParameters = function() end end)
net.modules[LAYER].accGradParameters = function() end