Skip to content

Commit

Permalink
Use w2nn.load_model to use cudnn #369
Browse files Browse the repository at this point in the history
  • Loading branch information
nagadomi committed Oct 28, 2020
1 parent 44503fb commit c9b0fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.lua
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ local function train()
}
local model
if settings.resume:len() > 0 then
model = torch.load(settings.resume, "ascii")
model = w2nn.load_model(settings.resume, settings.backend == "cudnn", "ascii")
adam_config.xEvalCount = math.floor((#train_x * settings.patches) / settings.batch_size) * settings.batch_size * settings.inner_epoch * (settings.resume_epoch - 1)
print(string.format("set eval count = %d", adam_config.xEvalCount))
if adam_config.xEvalCount > 0 then
Expand Down

0 comments on commit c9b0fe7

Please sign in to comment.