Interface Merger

All Superinterfaces:
ProtoSerializable<org.tribuo.math.protos.MergerProto>, Serializable
All Known Implementing Classes:
HeapMerger, MatrixHeapMerger

public interface Merger extends ProtoSerializable<org.tribuo.math.protos.MergerProto>, Serializable
An interface for merging an array of DenseSparseMatrix into a single DenseSparseMatrix.

Mergers are principally used to aggregate gradients across a minibatch.

Merging is done by summation.

  • Method Details

    • merge

      Merges an array of DenseSparseMatrix into a single DenseSparseMatrix.
      Parameters:
      inputs - The matrices to merge.
      Returns:
      The merged matrix.
    • merge

      SparseVector merge(SparseVector[] inputs)
      Merges an array of SparseVector into a single SparseVector.
      Parameters:
      inputs - The vectors to merge.
      Returns:
      The merged vector.