|
power1.cs.virginia.edu
power6.cs.virginia.edu
cuda1.cs.virginia.edu
(must first SSH to power1 to get to cuda1)
cuda3.cs.virginia.edu
--gres=gpu
(e.g. srun --gres=gpu th yourscript.lua
).
th
to open a LuaJIT/Torch shell. Note that on the department machines one should not use the luajit
command because that is broken. Additionally, some people report that it is possible to use Torch on AWS free tier, but it requires some configuration.
load_images = require 'load_images' images = load_images.load('face_images', 750)The first argument of load() is the subdirectory containing image datafiles (unzipped from one of the datasets above to the current directory), and the second argument is the number of images in the subdirectory. The resulting tensor is size nimages x channels x height x width, where nimages is the number of images, channels is 3 (for the RGB colors), and height and width are both 128.
torch.randperm
. To reduce memory requirements, we ask that you please set the default Torch datatype to 32-bit float with the following command at the top of your program (before calling the loader):torch.setdefaulttensortype('torch.FloatTensor')
SpatialConvolution
layer. However, note that the SpatialBatchNormalization
layer requires 4D tensor inputs, so you have to divide your training dataset into mini-batches of say 10 images each (so the inputs are size nbatchsize x 1 x height x width, and the outputs are size nbatchsize x 2 x height x width).nn.Sequential
method evaluate()
).require 'cutorch'
). There are limited numbers of GPUs available on the department machines, which will likely become congested near the assignment due date. Thus, the extra credit can be submitted later, through Sun Nov 6 (11:59 PM).
yourname_project2.zip
. Please include: