Pytorch Torch Lcm
# PyTorch torch.lcm Function
* * *
[ of elements between two tensors.
### Function Definition
torch.lcm(input, other, out=None)
Parameter Description:
* `input`: First input tensor
* `other`: Second input tensor
* `out`: Output tensor
* * *
## Usage Examples
## Example
import torch
# Create two tensors
a = torch.tensor([3,4,5])
b = torch.tensor([6,8,10])
# Compute least common multiple
y = torch.lcm(a, b)
print(y)
Output:
tensor([ 6, 8, 10])
## Example
import torch
# Create two tensors
a = torch.tensor([12,15])
b = torch.tensor([18,25])
# Compute least common multiple
y = torch.lcm(a, b)
print(y)
Output:
tensor([ 36, 75])
* * *
[![Image 4: Pytorch torch Reference Manual]( Pytorch torch Reference Manual](
YouTip