Skip to content

Commit

Permalink
Remove model gpu reset when saving to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
farrajota committed Jun 27, 2017
1 parent d5267e1 commit f276b62
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions utils/model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ local function store(model, modelParameters, optimState, epoch, opt, flag)
if opt.clear_buffers then
model = model:clearState()
end
setDataParallel(model, opt.GPU, 1) -- set nn.DataParallelTable to use only 1 GPU
torch.save(filename_model, {model, modelParameters, info})
setDataParallel(model, opt.GPU, opt.nGPU)

-- make a symlink to the last trained model
local filename_symlink = paths.concat(opt.savedir,'model_final.t7')
Expand Down

0 comments on commit f276b62

Please sign in to comment.