PyTorch torch.true_divide Function
PyTorch torch Reference Manual
torch.true_divideis a function in PyTorch used to perform element-wise true division (floating-point division).
Function Definition
torch.true_divide(input, other, out=None)
Usage Examples
Example
import torch
# Element-wise true division
x = torch.tensor([5.0, 6.0, 7.0])
y = torch.tensor([2.0, 2.0, 2.0])
result = torch.true_divide(x, y)
print(result)
# Element-wise true division
x = torch.tensor([5.0, 6.0, 7.0])
y = torch.tensor([2.0, 2.0, 2.0])
result = torch.true_divide(x, y)
print(result)
Other Extensions