SumReducer

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

A reducer that sums the inputs.

Inherits from: opennmt.layers.Reducer

reduce(inputs)[source]

See opennmt.layers.Reducer.call().

reduce_sequence(inputs, sequence_lengths)[source]

See opennmt.layers.Reducer.call().