Gather

  • namespace: Rindow\NeuralNetworks\Layer
  • classname: Gather

Gather slices from params axis according to indices.

Methods

constructor

$builer->Gather(
    int $axis=-1,
    array $input_shapes=null,
    string $name=null,
)

You can create a Gather layer instances with the Layer Builder.

Options

  • axis: The axis of the input data to slice.
  • input_shape: Tell the first layer the shape of the input data. In input_shape, the batch dimension is not included.

Examples

$model->add($nn->layers()->Gather(
    axis:1,
));