From 66efcb706b13262e2f38963515bcdb1c49d324b4 Mon Sep 17 00:00:00 2001 From: Brandon Amos Date: Tue, 5 Apr 2016 18:01:15 -0400 Subject: [PATCH] Model: Use opt.imgDim for retraining \cc @melgor Ideally I should have made imgDim part of the model. This works for now, but users training will need to be careful about this size. --- training/model.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/training/model.lua b/training/model.lua index e2ff23e..b8113b6 100644 --- a/training/model.lua +++ b/training/model.lua @@ -20,6 +20,7 @@ if opt.retrain ~= 'none' then assert(paths.filep(opt.retrain), 'File not found: ' .. opt.retrain) print('Loading model from file: ' .. opt.retrain); model = torch.load(opt.retrain) + print("Using imgDim = ", opt.imgDim) else paths.dofile(opt.modelDef) assert(imgDim, "Model definition must set global variable 'imgDim'") @@ -37,7 +38,7 @@ if opt.cuda then criterion:cuda() end -optimizeNet(model, imgDim) +optimizeNet(model, opt.imgDim) print('=> Model') print(model)