Closed chethan-reddy2 closed 3 years ago
I have the same error @switchablenorms,
change
test = np.random.randint(9)
I have the same error @switchablenorms,
change
test = np.random.randint(9)
Thanks @josearangos I changed it but after that, I am facing an error
chethan@ex5820:~/DeepFashion_Try_On/ACGPN_inference$ python3 test.py ? ------------ Options ------------- batchSize: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: False data_type: 32 dataroot: ../Data_preprocessing/ debug: False display_freq: 100 display_winsize: 512 fineSize: 512 gpu_ids: [0] input_nc: 3 isTrain: True label_nc: 20 lambda_feat: 10.0 loadSize: 512 load_pretrain: ./checkpoints/label2city lr: 0.0002 max_dataset_size: inf model: pix2pixHD nThreads: 2 n_blocks_global: 4 n_blocks_local: 3 n_downsample_global: 4 n_layers_D: 3 n_local_enhancers: 1 name: label2city ndf: 64 netG: global ngf: 64 niter: 100 niter_decay: 100 niter_fix_global: 0 no_flip: False no_ganFeat_loss: False no_html: False no_lsgan: False no_vgg_loss: False norm: instance num_D: 2 output_nc: 3 phase: test pool_size: 0 print_freq: 100 resize_or_crop: scale_width save_epoch_freq: 10 save_latest_freq: 1000 serial_batches: False tf_log: False use_dropout: False verbose: False which_epoch: latest -------------- End ---------------- CustomDatasetDataLoader dataset [AlignedDataset] was created ../Data_preprocessing/test_label label ../Data_preprocessing/test_label label ../Data_preprocessing/test_img img ../Data_preprocessing/test_img img ../Data_preprocessing/test_edge edge ../Data_preprocessing/test_edge edge ../Data_preprocessing/test_mask mask ../Data_preprocessing/test_mask mask ../Data_preprocessing/test_colormask colormask ../Data_preprocessing/test_colormask colormask ../Data_preprocessing/test_color color ../Data_preprocessing/test_color color
latest_net_U.pth
latest_net_G1.pth
latest_net_G2.pth
latest_net_G.pth
/home/chethan/.local/lib/python3.6/site-packages/torchvision/transforms/transforms.py:257: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
/home/chethan/.local/lib/python3.6/site-packages/torchvision/transforms/transforms.py:257: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Traceback (most recent call last):
File "test.py", line 104, in
Can you please help with this error?
chethan@ex5820:~/DeepFashion_Try_On/ACGPN_inference$ python3 test.py ? ------------ Options ------------- batchSize: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: False data_type: 32 dataroot: ../Data_preprocessing/ debug: False display_freq: 100 display_winsize: 512 fineSize: 512 gpu_ids: [0] input_nc: 3 isTrain: True label_nc: 20 lambda_feat: 10.0 loadSize: 512 load_pretrain: ./checkpoints/label2city lr: 0.0002 max_dataset_size: inf model: pix2pixHD nThreads: 2 n_blocks_global: 4 n_blocks_local: 3 n_downsample_global: 4 n_layers_D: 3 n_local_enhancers: 1 name: label2city ndf: 64 netG: global ngf: 64 niter: 100 niter_decay: 100 niter_fix_global: 0 no_flip: False no_ganFeat_loss: False no_html: False no_lsgan: False no_vgg_loss: False norm: instance num_D: 2 output_nc: 3 phase: test pool_size: 0 print_freq: 100 resize_or_crop: scale_width save_epoch_freq: 10 save_latest_freq: 1000 serial_batches: False tf_log: False use_dropout: False verbose: False which_epoch: latest -------------- End ---------------- CustomDatasetDataLoader dataset [AlignedDataset] was created ../Data_preprocessing/test_label label ../Data_preprocessing/test_label label ../Data_preprocessing/test_img img ../Data_preprocessing/test_img img ../Data_preprocessing/test_edge edge ../Data_preprocessing/test_edge edge ../Data_preprocessing/test_mask mask ../Data_preprocessing/test_mask mask ../Data_preprocessing/test_colormask colormask ../Data_preprocessing/test_colormask colormask ../Data_preprocessing/test_color color ../Data_preprocessing/test_color color
Inference images = 10 latest_net_U.pth latest_net_G1.pth latest_net_G2.pth latest_net_G.pth /home/chethan/.local/lib/python3.6/site-packages/torchvision/transforms/transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead. "please use transforms.Resize instead.") /home/chethan/.local/lib/python3.6/site-packages/torchvision/transforms/transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead. "please use transforms.Resize instead.") Traceback (most recent call last): File "test.py", line 104, in for i, data in enumerate(dataset, start=epoch_iter): File "/home/chethan/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in next return self._process_next_batch(batch) File "/home/chethan/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch raise batch.exc_type(batch.exc_msg) IndexError: Traceback (most recent call last): File "/home/chethan/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/chethan/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/chethan/DeepFashion_Try_On/ACGPN_inference/data/aligned_dataset.py", line 160, in getitem C_path = self.C_paths[test] IndexError: list index out of range