1
0
Fork 0
mirror of synced 2024-05-17 03:12:18 +12:00

clearState

This commit is contained in:
nagadomi 2018-10-27 09:41:52 +00:00
parent 2d85f70415
commit 4c8a47e149
2 changed files with 11 additions and 0 deletions

View file

@ -38,3 +38,9 @@ function AuxiliaryLossTable:updateGradInput(input, gradOutput)
return self.gradInput
end
function AuxiliaryLossTable:clearState()
self.gradInput = {}
self.output_table = {}
self.output_tensor:set()
return parent:clearState()
end

View file

@ -32,3 +32,8 @@ function ScaleTable:updateGradInput(input, gradOutput)
return self.gradInput
end
function ScaleTable:clearState()
self.grad_tmp:set()
self.scale:set()
return parent:clearstate()
end