cos¶
dragon.vm.torch.
cos
(
input,
out=None
)[source]¶Compute the cos of input.
\[\text{out} = \cos(\text{input}) \]Examples:
x = torch.tensor([0., math.pi]) print(torch.cos(x)) # [1., -1.]
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.