浏览代码

Set cuda():evaluate()

nagadomi 9 年之前
父节点
当前提交
4322b63750
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tools/cleanup_model.lua

+ 2 - 0
tools/cleanup_model.lua

@@ -17,6 +17,8 @@ local opt = cmd:parse(arg)
 local model = torch.load(opt.model, opt.iformat)
 if model then
    w2nn.cleanup_model(model)
+   model:cuda()
+   model:evaluate()
    torch.save(opt.model, model, opt.oformat)
 else
    error("model not found")