OpNumpyAlign

class OpNumpyAlign.NumpyAlignOp(inverse)[source]
itypes = [TensorType(int8, matrix), TensorType(int8, matrix), TensorType(float32, 3D), TensorType(int32, matrix)][source]
otypes = [TensorType(int32, matrix)][source]
perform(node, inputs_storage, output_storage)[source]

Required: Calculate the function on the inputs and put the variables in the output storage. Return None.

Parameters:
node : Apply instance

Contains the symbolic inputs and outputs.

inputs : list

Sequence of inputs (immutable).

output_storage : list

List of mutable 1-element lists (do not change the length of these lists)

Raises:
MethodNotDefined

The subclass does not override this method.

Notes

The output_storage list might contain data. If an element of output_storage is not None, it has to be of the right type, for instance, for a TensorVariable, it has to be a Numpy ndarray, with the right number of dimensions, and the correct dtype. Its shape and stride pattern, can be arbitrary. It not is guaranteed that it was produced by a previous call to impl. It could be allocated by another Op impl is free to reuse it as it sees fit, or to discard it and allocate new memory.

grad(inputs, output_grads)[source]
infer_shape(node, input_shapes)[source]