burn
burn copied to clipboard
support the pow operation between two tensors
I find that the tensor could be taken the power by a scalar value:
https://docs.rs/burn/latest/burn/tensor/struct.Tensor.html#method.powf
But I haven't found the method to take the power of a tensor with another tensor, like torch:
https://pytorch.org/docs/stable/generated/torch.pow.html
Try result = (power * base.log()).exp()
. This is equivalent to base^power.
@Gadersd, thanks for your suggestion! I have another problem. Is there an equivalent to torch.nonzero
?
https://pytorch.org/docs/stable/generated/torch.nonzero.html
I think we should still support the pow
operation between two tensors and not force people to use a combination of mul
, log
and exp
.
Is there a plan to support pow
operation? If not, I'll close the issue.
We will support that operation, so we can keep the issue open!
Completed via https://github.com/tracel-ai/burn/pull/748