Ooops.
authorFrancois Fleuret <francois@fleuret.org>
Fri, 16 Jun 2017 06:30:15 +0000 (08:30 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Fri, 16 Jun 2017 06:30:15 +0000 (08:30 +0200)
cnn-svrt.py

index 6645ac1..7bef242 100755 (executable)
@@ -171,15 +171,15 @@ for arg in vars(args):
 
 for problem_number in range(1, 24):
 
-    model_filename = model.name + '_' + \
-                     str(problem_number) + '_' + \
-                     str(args.nb_train_batches) + '.param'
-
     model = AfrozeShallowNet()
 
     if torch.cuda.is_available():
         model.cuda()
 
+    model_filename = model.name + '_' + \
+                     str(problem_number) + '_' + \
+                     str(args.nb_train_batches) + '.param'
+
     nb_parameters = 0
     for p in model.parameters(): nb_parameters += p.numel()
     log_string('nb_parameters {:d}'.format(nb_parameters))