summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorjunyanz <junyanz@berkeley.edu>2017-06-13 00:10:04 -0700
committerjunyanz <junyanz@berkeley.edu>2017-06-13 00:10:04 -0700
commit7212499f839db946c9296b84d6491fe5d6097dea (patch)
tree95f05a1163d09ce9e56bde60f6b332bd529e5f5c /test.py
parente6858e35f0a08c6139c133122d222d0d85e8005d (diff)
predict single image
Diffstat (limited to 'test.py')
-rw-r--r--test.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/test.py b/test.py
index d2910ab..f019d10 100644
--- a/test.py
+++ b/test.py
@@ -1,18 +1,17 @@
import time
import os
from options.test_options import TestOptions
-opt = TestOptions().parse() # set CUDA_VISIBLE_DEVICES before import torch
-
from data.data_loader import CreateDataLoader
from models.models import create_model
from util.visualizer import Visualizer
from pdb import set_trace as st
from util import html
-opt.nThreads = 1 # test code only supports nThreads=1
-opt.batchSize = 1 #test code only supports batchSize=1
-opt.serial_batches = True # no shuffle
-opt.no_flip = True
+opt = TestOptions().parse()
+opt.nThreads = 1 # test code only supports nThreads = 1
+opt.batchSize = 1 # test code only supports batchSize = 1
+opt.serial_batches = True # no shuffle
+opt.no_flip = True # no flip
data_loader = CreateDataLoader(opt)
dataset = data_loader.load_data()