phillipi / pix2pix

Image-to-image translation with conditional adversarial nets
https://phillipi.github.io/pix2pix/
Other
10.18k stars 1.71k forks source link

Trouble running display #64

Open coventry opened 7 years ago

coventry commented 7 years ago

This is likely a newbie question, in which case apologies. It's my first time using torch.

The display output is basically blank. The <body> contains

  <body>
    <noscript>display requires JavaScript</noscript>
    <button id="status">status</button>
  </body>

...and just shows up as a small green "online"/"offline" toggle button in the top left-hand corner.

I'm running display and train.lua as follows. Corrections very welcome.

root@44fbf66c8c00:/pix# th -ldisplay.start 8888 0.0.0.0
server listening on http://0.0.0.0:8888
GET     /events
GET     /
GET     /style.css
GET     /panes.js
GET     /events
GET     /favicon.png

root@44fbf66c8c00:/pix# display_freq=1 display_plot='errL1,errG,errD' DATA_ROOT=./datasets/facades name=facades_generation which_direction=BtoA th train.lua                                                                                                                                               [22/1993]
{
  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 : 1
  display_freq : 1
  display_id : 10
  flip : 1
  ntrain : inf
  lr : 0.0002
  nThreads : 2
  display_plot : "errL1,errG,errD"
  save_latest_freq : 5000
  serial_batches : 0
}
Random Seed: 8676
#threads...2
Starting donkey with id: 1 seed: 8677
table: 0x402bbc08
Starting donkey with id: 2 seed: 8678
table: 0x41120d50
./datasets/facades
./datasets/facades
trainCache      /pix/cache/_pix_datasets_facades_train_trainCache.t7
Creating train metadata
serial batch:,  0
table: 0x40561be8
running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class
trainCache      /pix/cache/_pix_datasets_facades_train_trainCache.t7
Creating train metadata
serial batch:,  0
table: 0x415d9d68
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
now combine all the files to a single large file
load the large concatenated list of sample paths to self.imagePath
cmd..wc -L '/tmp/lua_K5voTT' |cut -f1 -d' '
load the large concatenated list of sample paths to self.imagePath
cmd..wc -L '/tmp/lua_y4o7yL' |cut -f1 -d' '
400 samples found......................... 0/400 .......................................]  ETA: 0ms | Step: 0ms         
Updating classList and imageClass appropriately
 [======================================== 1/1 ========================================>]  Tot: 0ms | Step: 0ms         
400 samples found......................... 0/400 .......................................]  ETA: 0ms | Step: 0ms         
Updating classList and imageClass appropriately
 [======================================== 1/1 ========================================>]  Tot: 0ms | Step: 0ms         
Cleaning up temporary files
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...
done
Epoch: [1][      49 /      400]  Time: 0.223  DataTime: 0.000    Err_G: 0.8045  Err_D: 0.6729  ErrL1: 0.2700
Epoch: [1][      99 /      400]  Time: 0.223  DataTime: 0.000    Err_G: 0.8879  Err_D: 0.5638  ErrL1: 0.2848
Epoch: [1][     149 /      400]  Time: 0.223  DataTime: 0.000    Err_G: 0.5377  Err_D: 0.7555  ErrL1: 0.3924
Epoch: [1][     199 /      400]  Time: 0.224  DataTime: 0.000    Err_G: 2.4808  Err_D: 0.0926  ErrL1: 0.3895
Epoch: [1][     249 /      400]  Time: 0.224  DataTime: 0.000    Err_G: 3.5942  Err_D: 0.0906  ErrL1: 0.3900
Epoch: [1][     299 /      400]  Time: 0.224  DataTime: 0.000    Err_G: 1.9321  Err_D: 0.2085  ErrL1: 0.4939
Epoch: [1][     349 /      400]  Time: 0.235  DataTime: 0.000    Err_G: 4.0155  Err_D: 0.0537  ErrL1: 0.4394
Epoch: [1][     399 /      400]  Time: 0.256  DataTime: 0.000    Err_G: 3.3058  Err_D: 0.0382  ErrL1: 0.4399
End of epoch 1 / 200     Time Taken: 91.750
Epoch: [2][      49 /      400]  Time: 0.227  DataTime: 0.000    Err_G: 2.9637  Err_D: 0.1760  ErrL1: 0.3569
Epoch: [2][      99 /      400]  Time: 0.247  DataTime: 0.000    Err_G: 3.9921  Err_D: 0.1488  ErrL1: 0.5377
brannondorsey commented 7 years ago

Hi there, is it possible that you've disabled JavaScript in whatever browser you are using to try and view the display? Enabling/disabling javascript can generally be done from the web dev console.

On Tue, Mar 21, 2017 at 1:50 PM, coventry notifications@github.com wrote:

This is likely a newbie question, in which case apologies. It's my first time using torch.

The display output is basically blank. The contains

...and just shows up as a small green "online"/"offline" toggle button in the top left-hand corner.

I'm running display and train.lua as follows. Corrections very welcome.

root@44fbf66c8c00:/pix# th -ldisplay.start 8888 0.0.0.0 server listening on http://0.0.0.0:8888 GET /events GET / GET /style.css GET /panes.js GET /events GET /favicon.png

root@44fbf66c8c00:/pix# display_freq=1 display_plot='errL1,errG,errD' DATA_ROOT=./datasets/facades name=facades_generation which_direction=BtoA th train.lua [22/1993] { 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 : 1 display_freq : 1 display_id : 10 flip : 1 ntrain : inf lr : 0.0002 nThreads : 2 display_plot : "errL1,errG,errD" save_latest_freq : 5000 serial_batches : 0 } Random Seed: 8676

threads...2

Starting donkey with id: 1 seed: 8677 table: 0x402bbc08 Starting donkey with id: 2 seed: 8678 table: 0x41120d50 ./datasets/facades ./datasets/facades trainCache /pix/cache/_pix_datasets_facades_train_trainCache.t7 Creating train metadata serial batch:, 0 table: 0x40561be8 running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class trainCache /pix/cache/_pix_datasets_facades_train_trainCache.t7 Creating train metadata serial batch:, 0 table: 0x415d9d68 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 now combine all the files to a single large file load the large concatenated list of sample paths to self.imagePath cmd..wc -L '/tmp/lua_K5voTT' |cut -f1 -d' ' load the large concatenated list of sample paths to self.imagePath cmd..wc -L '/tmp/lua_y4o7yL' |cut -f1 -d' ' 400 samples found......................... 0/400 .......................................] ETA: 0ms | Step: 0ms Updating classList and imageClass appropriately [======================================== 1/1 ========================================>] Tot: 0ms | Step: 0ms 400 samples found......................... 0/400 .......................................] ETA: 0ms | Step: 0ms Updating classList and imageClass appropriately [======================================== 1/1 ========================================>] Tot: 0ms | Step: 0ms Cleaning up temporary files 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... done Epoch: [1][ 49 / 400] Time: 0.223 DataTime: 0.000 Err_G: 0.8045 Err_D: 0.6729 ErrL1: 0.2700 Epoch: [1][ 99 / 400] Time: 0.223 DataTime: 0.000 Err_G: 0.8879 Err_D: 0.5638 ErrL1: 0.2848 Epoch: [1][ 149 / 400] Time: 0.223 DataTime: 0.000 Err_G: 0.5377 Err_D: 0.7555 ErrL1: 0.3924 Epoch: [1][ 199 / 400] Time: 0.224 DataTime: 0.000 Err_G: 2.4808 Err_D: 0.0926 ErrL1: 0.3895 Epoch: [1][ 249 / 400] Time: 0.224 DataTime: 0.000 Err_G: 3.5942 Err_D: 0.0906 ErrL1: 0.3900 Epoch: [1][ 299 / 400] Time: 0.224 DataTime: 0.000 Err_G: 1.9321 Err_D: 0.2085 ErrL1: 0.4939 Epoch: [1][ 349 / 400] Time: 0.235 DataTime: 0.000 Err_G: 4.0155 Err_D: 0.0537 ErrL1: 0.4394 Epoch: [1][ 399 / 400] Time: 0.256 DataTime: 0.000 Err_G: 3.3058 Err_D: 0.0382 ErrL1: 0.4399 End of epoch 1 / 200 Time Taken: 91.750 Epoch: [2][ 49 / 400] Time: 0.227 DataTime: 0.000 Err_G: 2.9637 Err_D: 0.1760 ErrL1: 0.3569 Epoch: [2][ 99 / 400] Time: 0.247 DataTime: 0.000 Err_G: 3.9921 Err_D: 0.1488 ErrL1: 0.5377

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phillipi/pix2pix/issues/64, or mute the thread https://github.com/notifications/unsubscribe-auth/ADC6vRot_0jjxEUkBLbA44opuF5smP-xks5roBwJgaJpZM4MkQDV .

-- PGP Public Key http://brannondorsey.com/publickey.asc http://brannondorsey.com @brannondorsey https://twitter.com/brannondorsey

coventry commented 7 years ago

No, javascript is enabled, and the button would toggle from "online" to "offline" when I clicked on it. It could be my ad blocker, I suppose. I will experiment. Thanks for the suggestion.

d0t1q commented 6 years ago

@coventry I'm having this issue as well, were you able to resolve this?

coventry commented 6 years ago

I was, but I haven't used Lua Torch since, have forgotten the details in the past year, and I'm unsure where I put my notes on it. If they turn up, I'll post them here.

happsky commented 5 years ago

@d0t1q I'm having this issue as well, were you able to resolve this?

sjain24 commented 3 years ago

Same issue