The derivative for pow is not implemented

I got a runtime error like:
RuntimeError: the derivative for pow is not implemented

I am wondering why the derivative for pow is not implemented, it seems as easy as sin()

Which PyTorch version are you using?
You can check it with print(torch.__version__).
It’s working on my machine, so if you are using the latest stable release of the 1.0 preview, could you please post a code snippet reproducing this error?

The Pytorch version is : 0.4.1

The pow function is used as follows:

The para is a Parameter object with size [out, int, h]-----my custom net layer

band = para[:,:,2].reshape(num,1,1).repeat(1,h,w)
ratio = torch.tensor(np.sqrt(np.log(2)/2)/np.pi) * (torch.pow(2,band)+1)/(torch.pow(2,band)-1)

when loss.backward() is executed it raise:
RuntimeError: the derivative for pow is not implemented

Besides, I test the code in Windows OS. Is it the reason?

pow with scalar basis was fixed in master about a month ago, so it isn’t in 0.4.1, but is available in more recent build on windows, too.

Best regards

Thomas

1 Like

Thank you very much. It does me a favour