Skip to content

Commit

Permalink
check that clearState returns itself
Browse files Browse the repository at this point in the history
  • Loading branch information
szagoruyko committed Jun 3, 2016
1 parent c53353f commit 21f34c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Jacobian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ function nn.Jacobian.testIO(module,input, minval, maxval)
-- write module
local filename = os.tmpname()
local f = torch.DiskFile(filename, 'w'):binary()
module:clearState()
-- call clearState and check that it returns itself
assert(module == module:clearState(),'clearState did not return self')
f:writeObject(module)
f:close()
-- read module
Expand Down

0 comments on commit 21f34c8

Please sign in to comment.