Closed VPRzhou closed 5 years ago
Hi, does your dataroot contain two directories named beginning with the name "train" ?
The script looks inside the given dataroot argument for all folders starting with "train" and this number of folders must match n_domains.
oh,I got it. I have set two subfolders named"train0、train1"in the dataset directory, it works. But there is a new wrong happened. The error is as follows:
create web directory ./checkpoints/nighttoday/web...
Traceback (most recent call last):
File "train.py", line 22, in
Sorry for the delay. Um, it looks like one of your train directories is empty.
thanks for your reply. The training process is working now.
Hi,I have encountered a problem I have consulted you before. I have set up two folders"train0,train1"(test0,test1) under the dataroot ,and the two folders also contains photos . When I run the train.py( test.py) file,they can not work properly.I am sorry for bothering you again.The train.py's error is as follows:
python train.py --name 2day --dataroot ./datasets/train1 --n_domains 2 --niter 150 --niter_decay 150
------------ Options -------------
batchSize: 1
beta1: 0.5
checkpoints_dir: ./checkpoints
continue_train: False
dataroot: ./datasets/train1
display_freq: 100
display_id: 0
display_port: 8097
display_single_pane_ncols: 0
display_winsize: 256
fineSize: 256
gpu_ids: [0]
input_nc: 3
isTrain: True
lambda_cycle: 10.0
lambda_forward: 0.0
lambda_identity: 0.0
lambda_latent: 0.0
loadSize: 286
lr: 0.0002
max_dataset_size: inf
nThreads: 2
n_domains: 2
name: 2day
ndf: 64
netD_n_layers: 4
netG_n_blocks: 9
netG_n_shared: 0
ngf: 64
niter: 150
niter_decay: 150
no_flip: False
no_html: False
norm: instance
output_nc: 3
phase: train
pool_size: 50
print_freq: 100
resize_or_crop: resize_and_crop
save_epoch_freq: 5
use_dropout: False
which_epoch: 0
-------------- End ----------------
Traceback (most recent call last):
File "train.py", line 10, in
You gave argument --dataroot ./datasets/train1
Your dataroot is actually ./datasets
:)
Thank you your reply.But I am not clear what you say. Do you mean I should make a change to the dataroot? I totally run the code as you said,but I do not know the reason why it doesn't work.
Data root is the root of all data folders. The code looks in the data root for folders named train and test
The code errors because it probably found zero folders under test1 that starts with "train" or "test"
oh,the dataroot structure should be:datasets/train/train0&train1,is it right?
When training, train0 & train1 should be in the data root. (Any folder can be the data root)
When testing, test0 and test1 should be in the data root.
The data root can be the same for both. So all trains and tests can be together inside the dataroot, i.e. DATAROOT/train0+train1+test0+test1
Thank you very much,I got it. It works now!
Hi,I have to bother you again.As TABLE I shown,how can I get the night training dataset(6666 triplets).
Hi, the link to the curated dataset I used is in the README
Hello,there is something wrong when I do train.py. I do not know the problem where it is from. I'm looking forward your reply,thank you. python train.py --name nighttoday --dataroot ./datasets/test1 --n_domains 2 --niter 150 --niter_decay 150
Traceback (most recent call last): File "train.py", line 10, in
print('# training images = %d' % len(dataset))
File "/home/zhoul/ToDayGAN/data/data_loader.py", line 18, in len
return min(len(self.dataset), self.opt.max_dataset_size)
File "/home/zhoul/ToDayGAN/data/unaligned_dataset.py", line 54, in len
return max(self.sizes)
ValueError: max() arg is an empty sequence