Solved by Nikronic in post #2 
              
              
                Hi, 

.zero_ is a method not attribute. You need to call it using parentheses: 
features = torch.FloatTensor(1,512).zero_().cuda()

Bests