Hi,
I think you misread the doc 45 for the pow function: it takes torch.pow(input, exponent) 
The thing is that here you try to work with an input which is not a Tensor (or Variable) and that does not work with the autograd.