chainerx.square

chainerx.square(x)

Returns the element-wise square of the input.

Parameters

x (ndarray or scalar) – Input data

Returns

Returned array: \(y = x * x\). A scalar is returned if x is a scalar.

Return type

ndarray

Note

During backpropagation, this function propagates the gradient of the output array to the input array x.

See also

numpy.square