title: Is it possible to keep parameter as an exponent in PyTorch?
body: <p>I am running a program in which an intermediate step returns a tensor (say, T). The tensor does not contain parameters but is just real numbers.</p>
  <p>I want to use a parameter at exponent for T. Let us name the parameter as x. So, the intermediate step should return T^x now.</p>
  <p>I tried to train the model, but the value of x after the first backward pass is becoming <code>nan</code>.</p>
  <p>If I use multiplication instead of exponentiation i.e., Tx instead of T^x, then the training is going well without any <code>nan</code> values.</p>
  <p>Is it possible to pass the parameter as an exponent in PyTorch? If yes, then how can I train for x?</p>