Hello,
l have a pytorch variable :
preds[4,4]
Out[305]: 
Variable containing:
-96.7809
[torch.cuda.FloatTensor of size 1 (GPU 0)]

l want to do the following :
 import math
 x=preds[4,4]
 y=maths.exp(x)
 z= y / (y+1)

However when l do :
y=maths.exp(x)

l get the following error :
   math.exp(preds[4,4])
TypeError: a float is required

How can l transform a torch variable to a float in order to be able to do these operations ?
or is there any trick to do that  in pytorch ?
Thanks