pix2pix
pix2pix copied to clipboard
There is a error occured when training the model using GPU
Hello, Thanks for your code. but when I tried your code, it always shows the problem that :
hao@sibiu:~/pix2pix-master1$ DATA_ROOT=./datasets/facades name=facades_generation which_direction=BtoA th train.lua
{
cudnn : 1
name : "facades_generation"
niter : 200
batchSize : 1
n_layers_D : 0
ndf : 64
which_model_netG : "unet"
save_display_freq : 5000
print_freq : 50
gpu : 1
use_GAN : 1
DATA_ROOT : "./datasets/facades"
serial_batch_iter : 1
use_L1 : 1
save_epoch_freq : 50
output_nc : 3
checkpoints_dir : "./checkpoints"
input_nc : 3
beta1 : 0.5
continue_train : 0
which_direction : "BtoA"
phase : "train"
fineSize : 256
condition_GAN : 1
loadSize : 286
lambda : 100
ngf : 64
preprocess : "regular"
which_model_netD : "basic"
display_freq : 100
display : 1
display_id : 10
ntrain : inf
nThreads : 2
lr : 0.0002
flip : 1
save_latest_freq : 5000
serial_batches : 0
}
Random Seed: 8967
#threads...2
Starting donkey with id: 1 seed: 8968
table: 0x40530d80
Starting donkey with id: 2 seed: 8969
table: 0x406f7280
./datasets/facades
trainCache /home/hao/pix2pix-master1/cache/_home_hao_pix2pix-master1_datasets_facades_train_trainCache.t7
Creating train metadata
serial batch:, 0
table: 0x400aeb38
running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class
./datasets/facades
trainCache /home/hao/pix2pix-master1/cache/_home_hao_pix2pix-master1_datasets_facades_train_trainCache.t7
Creating train metadata
serial batch:, 0
table: 0x406dee78
running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class
now combine all the files to a single large file
load the large concatenated list of sample paths to self.imagePath
now combine all the files to a single large file
cmd..wc -L '/tmp/lua_DOjJKU' |cut -f1 -d' '
400 samples found......................... 0/400 .......................................] ETA: 0ms | Step: 0ms
Updating classList and imageClass appropriately
[======================================== 1/1 ========================================>] Tot: 1ms | Step: 1ms
load the large concatenated list of sample paths to self.imagePath
cmd..wc -L '/tmp/lua_PCaggu' |cut -f1 -d' '
Cleaning up temporary files
400 samples found......................... 0/400 .......................................] ETA: 0ms | Step: 0ms
Updating classList and imageClass appropriately
[======================================== 1/1 ========================================>] Tot: 1ms | Step: 1ms
Cleaning up temporary files
Dataset Size: 400
define model netG...
define model netD...
nn.gModule
nn.Sequential {
[input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> (9) -> (10) -> (11) -> (12) -> (13) -> output]
(1): nn.SpatialConvolution(6 -> 64, 4x4, 2,2, 1,1)
(2): nn.LeakyReLU(0.2)
(3): nn.SpatialConvolution(64 -> 128, 4x4, 2,2, 1,1)
(4): nn.SpatialBatchNormalization
(5): nn.LeakyReLU(0.2)
(6): nn.SpatialConvolution(128 -> 256, 4x4, 2,2, 1,1)
(7): nn.SpatialBatchNormalization
(8): nn.LeakyReLU(0.2)
(9): nn.SpatialConvolution(256 -> 512, 4x4, 1,1, 1,1)
(10): nn.SpatialBatchNormalization
(11): nn.LeakyReLU(0.2)
(12): nn.SpatialConvolution(512 -> 1, 4x4, 1,1, 1,1)
(13): nn.Sigmoid
}
transferring to gpu...
/home/gloria/torch/install/bin/luajit: ...e/gloria/torch/install/share/lua/5.1/nngraph/gmodule.lua:205: attempt to call method 'replace' (a nil value)
stack traceback:
...e/gloria/torch/install/share/lua/5.1/nngraph/gmodule.lua:205: in function 'cudnn'
train.lua:186: in main chunk
[C]: in function 'dofile'
...oria/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
@phillipi I am a beginner of deep learning and Linux. The torch I used is Torch7. Besides, I run this code on a server machine and do not have the sudo rights. Any suggestion for that ? thanks!
The following shows the libs I have installed.
hao@sibiu:~/pix2pix-master1$ luarocks list
Installed rocks:
argcheck scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
async scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
audio 0.1-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
cudnn scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
cunn scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
cunnx scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
cutorch scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
cwrap scm-1 (installed) - /home/hao/.luarocks/lib/luarocks/rocks scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
display scm-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
dok scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
env scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
fftw3 scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
gnuplot scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
graph scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
graphicsmagick 1.scm-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
image 1.1.alpha-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
lua-cjson 2.1devel-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
luaffi scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
luafilesystem 1.6.3-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
luasocket 3.0rc1-2 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
matio scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
nn scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
nngraph scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
nnx 0.1-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
optim 1.0.5-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
paths scm-1 (installed) - /home/hao/.luarocks/lib/luarocks/rocks scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
penlight scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
qtlua scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
qttorch scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
signal scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
sundown scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
sys 1.1-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
threads scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
torch scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
trepl scm-1 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
xlua 1.0-0 (installed) - /home/gloria/torch/install/lib/luarocks/rocks
Have you installed cudnn library?