Array Operations

Array creation routines

chainerx.empty

Returns an array without initializing the elements.

chainerx.empty_like

Returns a new array with same shape and dtype of a given array.

chainerx.eye

Returns a 2-D array with ones on the diagonals and zeros elsewhere.

chainerx.identity

Returns a 2-D identity array.

chainerx.ones

Returns a new array of given shape and dtype, filled with ones.

chainerx.ones_like

Returns an array of ones with same shape and dtype as a given array.

chainerx.zeros

Returns a new array of given shape and dtype, filled with zeros.

chainerx.zeros_like

Returns an array of zeros with same shape and dtype as a given array.

chainerx.full

Returns a new array of given shape and dtype, filled with a given value.

chainerx.full_like

Returns a full array with same shape and dtype as a given array.

chainerx.array

Creates an array.

chainerx.asarray

Converts an object to an array.

chainerx.asanyarray

Converts an object to an array.

chainerx.ascontiguousarray

Returns a C-contiguous array.

chainerx.copy

Creates a copy of a given array.

chainerx.frombuffer

Returns a 1-D array interpretation of a buffer.

chainerx.fromfile

Constructs an array from data in a text or binary file.

chainerx.fromfunction

Constructs an array by executing a function over each coordinate.

chainerx.fromiter

Constructs a new 1-D array from an iterable object.

chainerx.fromstring

Constructs a new 1-D array initialized from text data in a string.

chainerx.loadtxt

Constructs an array by loading data from a text file.

chainerx.arange

Returns an array with evenly spaced values within a given interval.

chainerx.linspace

Returns an array with evenly spaced numbers over a specified interval.

chainerx.diag

Returns a diagonal or a diagonal array.

chainerx.diagflat

Creates a diagonal array from the flattened input.

Activation functions

chainerx.log_softmax

The log of the softmax of input array.

chainerx.tanh

Hyperbolic tangent, element-wise

chainerx.relu

Rectified Linear Unit function.

chainerx.sigmoid

Array manipulation routines

chainerx.reshape

Returns a reshaped array.

chainerx.ravel

Returns a flattened array.

chainerx.transpose

Permutes the dimensions of an array.

chainerx.broadcast_to

Broadcasts an array to a given shape.

chainerx.squeeze

Removes size-one axes from the shape of an array.

chainerx.asarray

Converts an object to an array.

chainerx.ascontiguousarray

Returns a C-contiguous array.

chainerx.concatenate

Joins arrays along an axis.

chainerx.stack

Stacks arrays along a new axis.

chainerx.split

Splits an array into multiple sub arrays along a given axis.

Indexing routines

chainerx.take

Takes elements from an array along an axis.

Linear algebra

chainerx.dot

Returns a dot product of two arrays.

Logic functions

chainerx.isinf

Test element-wise for positive or negative infinity.

chainerx.isnan

Test element-wise for NaN and return result as a boolean array.

chainerx.logical_and

Returns an array of x1 AND x2 element-wise.

chainerx.logical_or

Returns an array of x1 OR x2 element-wise.

chainerx.logical_not

Returns an array of NOT x element-wise.

chainerx.greater

Returns an array of (x1 > x2) element-wise.

chainerx.greater_equal

Returns an array of (x1 >= x2) element-wise.

chainerx.less

Returns an array of (x1 < x2) element-wise.

chainerx.less_equal

Returns an array of (x1 <= x2) element-wise.

chainerx.equal

Returns an array of (x1 == x2) element-wise.

chainerx.not_equal

Returns an array of (x1 != x2) element-wise.

Mathematical functions

chainerx.negative

Numerical negative, element-wise.

chainerx.add

Add arguments, element-wise.

chainerx.subtract

Subtract arguments, element-wise.

chainerx.multiply

Multiply arguments, element-wise.

chainerx.divide

Divide arguments, element-wise.

chainerx.sum

Sum of array elements over a given axis.

chainerx.maximum

Maximum arguments, element-wise.

chainerx.exp

Numerical exponential, element-wise.

chainerx.log

Natural logarithm, element-wise.

chainerx.logsumexp

The log of the sum of exponentials of input array.

chainerx.log_softmax

The log of the softmax of input array.

chainerx.sqrt

Non-negative square-root, element-wise

chainerx.sin

Sine, element-wise

chainerx.cos

Cosine, element-wise

chainerx.tan

Tangent, element-wise

chainerx.arcsin

Inverse sine, element-wise

chainerx.arccos

Trigonometric inverse cosine, element-wise

chainerx.arctan

Trigonometric inverse tangent, element-wise

chainerx.tanh

Hyperbolic tangent, element-wise

chainerx.square

Returns the element-wise square of the input.

chainerx.clip

Clips the values of an array to a given interval.

chainerx.ceil

Return the ceiling of the input, element-wise..

Random sampling

chainerx.random.normal

Draws random samples from a normal (Gaussian) distribution.

chainerx.random.uniform

Draws samples from a uniform distribution.

Sorting, searching, and counting

chainerx.argmax

Returns the indices of the maximum along an axis.

Statistics

chainerx.amax

Returns the maximum of an array or the maximum along an axis.

Connection

chainerx.conv

N-dimensional convolution.

chainerx.conv_transpose

N-dimensional transposed convolution.

chainerx.linear

Linear function, or affine transformation.

Normalization

chainerx.batch_norm

Batch normalization function.

chainerx.fixed_batch_norm

Batch normalization function with fixed statistics.

Pooling

chainerx.max_pool

Spatial max pooling function.

chainerx.average_pool

Spatial average pooling function.