commit c41d01c9ec096cec3d753b8d106645ce9147473e
parent 4ccfa17fc00882ad3994249ce098b9ed2c83a901
Author: umhau <umhau@users.noreply.github.com>
Date: Thu, 16 Feb 2017 13:13:27 -0500
include test run command
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
@@ -13,3 +13,6 @@ mpirun -np 11 -f ../machinefile th mlaunch.lua
Where '11' is the number of available cores in the cluster, '../machinefile'
points to the MPI machinefile, and mlaunch.lua is configured with the specific
Torch script you care to run.
+
+To use/test the trained model, run this code:
+th sample.lua cv/some_checkpoint.t7 -gpuid -1
+\ No newline at end of file
diff --git a/train.lua b/train.lua
@@ -64,7 +64,7 @@ cmd:option('-checkpoint_dir', 'cv', 'output directory where checkpoints get writ
cmd:option('-savefile','lstm','filename to autosave the checkpont to. Will be inside checkpoint_dir/')
cmd:option('-accurate_gpu_timing',0,'set this flag to 1 to get precise timings when using GPU. Might make code bit slower but reports accurate timings.')
-- GPU/CPU
-cmd:option('-gpuid',0,'which gpu to use. -1 = use CPU')
+cmd:option('-gpuid',-1,'which gpu to use. -1 = use CPU')
cmd:option('-opencl',0,'use OpenCL (instead of CUDA)')
cmd:option('-word_level',0,'whether to operate on the word level, instead of character level (0: use chars, 1: use words)')
cmd:option('-threshold',0,'minimum number of occurences a token must have to be included (ignored if -word_level is 0)')