Przeglądaj źródła

Set cuda():evaluate()

nagadomi 9 lat temu
rodzic
commit
4322b63750
1 zmienionych plików z 2 dodań i 0 usunięć
  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)
 local model = torch.load(opt.model, opt.iformat)
 if model then
 if model then
    w2nn.cleanup_model(model)
    w2nn.cleanup_model(model)
+   model:cuda()
+   model:evaluate()
    torch.save(opt.model, model, opt.oformat)
    torch.save(opt.model, model, opt.oformat)
 else
 else
    error("model not found")
    error("model not found")