pymoose.relu#

pymoose.relu(x, placement=None)[source]#

Apply the rectified-linear unit (ReLU) function, f(x) = max(0, x).

If the input is a tensor, the operation is performed elementwise.

Parameters
  • x – A value.

  • placement – An optional Placement to pin this operation to.

Returns

A value correspoding to ReLU(x).