lib/torch/nn/module.rb in torch-rb-0.1.1 vs lib/torch/nn/module.rb in torch-rb-0.1.2
- old
+ new
@@ -24,10 +24,9 @@
end
def zero_grad
parameters.each do |param|
if param.grad
- raise Error, "Not supported yet"
param.grad.detach!
param.grad.zero!
end
end
end