maximum

tripy.maximum(lhs: Tensor, rhs: Tensor) Tensor[source]

Performs an elementwise maximum.

Parameters:
  • lhs (Tensor) – [dtype=T1] The first input tensor.

  • rhs (Tensor) – [dtype=T1] The second input tensor. It should be broadcast-compatible.

Returns:

[dtype=T1] A new tensor with the broadcasted shape.

Return type:

Tensor

TYPE CONSTRAINTS:
Example
Example
1a = tp.Tensor([1.0, 6.0])
2b = tp.Tensor([2.0, 3.0])
3output = tp.maximum(a, b)
>>> a
tensor([1.0000, 6.0000], dtype=float32, loc=gpu:0, shape=(2,))
>>> b
tensor([2.0000, 3.0000], dtype=float32, loc=gpu:0, shape=(2,))
>>> output
tensor([2.0000, 6.0000], dtype=float32, loc=gpu:0, shape=(2,))