From 9701b9c0a138db21a1ced76d1eb2ad1c97df6553 Mon Sep 17 00:00:00 2001 From: Greg Heinrich Date: Fri, 27 May 2016 11:37:13 +0200 Subject: [PATCH] Remove unused resize_mode in Torch path The resize mode is no longer used by the test.lua Torch wrapper. Besides this field isn't part of the common dataset interface. Using it is causing problems during multiple image inference in Torch when using generic datasets. This should have been changed in #723 --- digits/model/tasks/torch_train.py | 1 - tools/torch/test.lua | 1 - 2 files changed, 2 deletions(-) diff --git a/digits/model/tasks/torch_train.py b/digits/model/tasks/torch_train.py index 268117183..ea7e278f4 100644 --- a/digits/model/tasks/torch_train.py +++ b/digits/model/tasks/torch_train.py @@ -807,7 +807,6 @@ def infer_many_images(self, images, snapshot_epoch=None, gpu=None): '--testMany=yes', '--allPredictions=yes', #all predictions are grabbed and formatted as required by DIGITS '--image=%s' % str(temp_imglist_path), - '--resizeMode=%s' % str(self.dataset.resize_mode), # Here, we are using original images, so they will be resized in Torch code. This logic needs to be changed to eliminate the rework of resizing. Need to find a way to send python images array to Lua script efficiently '--network=%s' % self.model_file.split(".")[0], '--networkDirectory=%s' % self.job_dir, '--snapshot=%s' % file_to_load, diff --git a/tools/torch/test.lua b/tools/torch/test.lua index db37983ed..0cbb7e9a0 100644 --- a/tools/torch/test.lua +++ b/tools/torch/test.lua @@ -22,7 +22,6 @@ require 'Optimizer' --print 'processing options' opt = lapp[[ --m,--resizeMode (default squash) Resize mode (squash/crop/fill/half_crop) for the input test image, if it's dimensions differs from those of Train DB images. -t,--threads (default 8) number of threads -p,--type (default cuda) float or cuda -d,--devid (default 1) device ID (if using CUDA)