|
@@ -210,7 +210,7 @@ local function train()
|
|
|
best_score = score
|
|
|
print("* update best model")
|
|
|
if settings.save_history then
|
|
|
- torch.save(string.format(settings.model_file, epoch, i), model:clearState())
|
|
|
+ torch.save(string.format(settings.model_file, epoch, i), model:clearState(), "ascii")
|
|
|
if settings.method == "noise" then
|
|
|
local log = path.join(settings.model_dir,
|
|
|
("noise%d_best.%d-%d.png"):format(settings.noise_level,
|
|
@@ -223,7 +223,7 @@ local function train()
|
|
|
save_test_scale(model, test_image, log)
|
|
|
end
|
|
|
else
|
|
|
- torch.save(settings.model_file, model:clearState())
|
|
|
+ torch.save(settings.model_file, model:clearState(), "ascii")
|
|
|
if settings.method == "noise" then
|
|
|
local log = path.join(settings.model_dir,
|
|
|
("noise%d_best.png"):format(settings.noise_level))
|