Mona_Jalal:

my personal guess is that acc should be float too.


Yes, this would also be my guess as note how the error changed from:
  File "main.py", line 251, in train
    losses.val.item(), losses.avg.item(), 
AttributeError: 'float' object has no attribute 'item'

to
  File "main.py", line 252, in train
    100. * accs.val.item(), 100. * accs.avg.item(), emb_norms.val.item(), emb_norms.avg.item()))
AttributeError: 'float' object has no attribute 'item'