Key error 10 while running the training code

I have tried to train the following code:

But the training code is stopped automatically at epoch 10 due to key error 10 . I’m not exactly sure why this error occurs.

File "", line 67, in <module>
  File "", line 64, in main
    main_worker(args.rank, args)
  File "", line 54, in main_worker
  File "/home/DeepDeblur-PyTorch-master/src/", line 196, in test
    self.evaluate(epoch, 'test')
  File "/home/DeepDeblur-PyTorch-master/src/", line 182, in evaluate
  File "/home/DeepDeblur-PyTorch-master/src/loss/", line 311, in geoss_desc
    loss = self.loss_stat[self.mode]['Total'][self.epoch]
KeyError: 10 

Could you help me solve this error.

This seems not be a pytorch/torchvision issue. More like a issue in the github repo.

Based on the initial hunch, it looks like something with epoch, maybe…