You right the top1 prob dimension (1, 1) but the probabilities still  look wrong
(0.9997780919075012, 1)
(1, 1)
(0.47908642888069153, 2)
(1, 1)
(0.36988458037376404, 3)
(1, 1)
(0.996319055557251, 4)
(1, 1)
(0.5528988838195801, 5)
(1, 1)
(0.1464884728193283, 6)
(1, 1)
(0.2512759864330292, 7)
(1, 1)
(0.9949786067008972, 8)
(1, 1)
(0.7263955473899841, 9)
(1, 1)
(0.9951314926147461, 10)
(1, 1)
(0.3069855272769928, 11)
(1, 1)
(0.999177873134613, 12)
(1, 1)
(0.44164711236953735, 13)
(1, 1)
(0.9995712637901306, 14)
(1, 1)
(0.47538724541664124, 15)
(1, 1)
(0.6424259543418884, 16)
(1, 1)
(0.999626874923706, 17)
(1, 1)
(0.5170174837112427, 18)
(1, 1)
(0.5674574971199036, 19)
(1, 1)
(0.9995905756950378, 20)
here is similar code  for a vanilla caption

  
      
      GitHub
  
  
    

yunjey/pytorch-tutorial 2

PyTorch Tutorial for Deep Learning Researchers. Contribute to yunjey/pytorch-tutorial development by creating an account on GitHub.