ConcatReducer

class opennmt.layers.ConcatReducer(*args, **kwargs)[source]

A reducer that concatenates the inputs.

Inherits from: opennmt.layers.Reducer

Extended by:

__init__(axis=- 1, **kwargs)[source]

Initializes the concat reducer.

Parameters
  • axis – Dimension along which to concatenate. This reducer supports concatenating in depth or in time.

  • **kwargs – Additional layer arguments.

reduce(inputs)[source]

See opennmt.layers.Reducer.call().

reduce_sequence(inputs, sequence_lengths)[source]

See opennmt.layers.Reducer.call().