start train test_run_002
0%| | 0/1000 [00:00<?, ?it/s]/home/ylp/anaconda3/envs/pytorch0.4/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:173: UserWarning: nn.UpsamplingNearest2d is deprecated. Use nn.Upsample instead.
warnings.warn("nn.UpsamplingNearest2d is deprecated. Use nn.Upsample instead.")
100%|###################################################################################################################################################################| 1000/1000 [04:18<00:00, 3.87it/s]
start valid test_run_002
0%| | 0/10 [00:00<?, ?it/s]Traceback (most recent call last):
File "train.py", line 130, in
main()
File "train.py", line 127, in main
train(func, data_func, config)
File "train.py", line 94, in train
outs = train_func(batch_id + i, config, phase, *datas)
File "/home/ylp/sunyubo/github/pose-ae-train/task/pose.py", line 113, in make_train
losses = {i[0]: result[-num_loss + idx]i[1] for idx, i in enumerate(config['train']['loss'])}
File "/home/ylp/sunyubo/github/pose-ae-train/task/pose.py", line 113, in
losses = {i[0]: result[-num_loss + idx]*i[1] for idx, i in enumerate(config['train']['loss'])}
IndexError: index -3 is out of bounds for dimension 0 with size 2
When train,the following problem arises:
start train test_run_002 0%| | 0/1000 [00:00<?, ?it/s]/home/ylp/anaconda3/envs/pytorch0.4/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:173: UserWarning: nn.UpsamplingNearest2d is deprecated. Use nn.Upsample instead. warnings.warn("nn.UpsamplingNearest2d is deprecated. Use nn.Upsample instead.") 100%|###################################################################################################################################################################| 1000/1000 [04:18<00:00, 3.87it/s] start valid test_run_002 0%| | 0/10 [00:00<?, ?it/s]Traceback (most recent call last): File "train.py", line 130, in
main()
File "train.py", line 127, in main
train(func, data_func, config)
File "train.py", line 94, in train
outs = train_func(batch_id + i, config, phase, *datas)
File "/home/ylp/sunyubo/github/pose-ae-train/task/pose.py", line 113, in make_train
losses = {i[0]: result[-num_loss + idx]i[1] for idx, i in enumerate(config['train']['loss'])}
File "/home/ylp/sunyubo/github/pose-ae-train/task/pose.py", line 113, in
losses = {i[0]: result[-num_loss + idx]*i[1] for idx, i in enumerate(config['train']['loss'])}
IndexError: index -3 is out of bounds for dimension 0 with size 2
Can you tell me how to handle it?Thank you.