Class ONNXMathUtils

java.lang.Object
org.tribuo.math.onnx.ONNXMathUtils

public abstract class ONNXMathUtils extends Object
Tribuo Math specific helper functions for building ONNX protos.
  • Method Details

    • floatVector

      public static ONNXInitializer floatVector(ONNXContext context, String name, SGDVector vector)
      Builds a ONNXInitializer containing the SGDVector.
      Parameters:
      context - The naming context.
      name - The base name for the proto.
      vector - the SGDVector to store in the proto.
      Returns:
      A TensorProto containing the vector.
    • floatMatrix

      public static ONNXInitializer floatMatrix(ONNXContext context, String name, Matrix matrix, boolean transpose)
      Builds a ONNXInitializer containing the Matrix.
      Parameters:
      context - The naming context.
      name - The base name for the proto.
      matrix - the matrix to store in the proto.
      transpose - Whether to transpose the vector before writing it.
      Returns:
      A TensorProto containing the matrix