Class MxOpParams

java.lang.Object
ai.djl.util.PairList<String,Object>
ai.djl.mxnet.engine.MxOpParams
All Implemented Interfaces:
Iterable<ai.djl.util.Pair<String,Object>>

public class MxOpParams extends ai.djl.util.PairList<String,Object>
An internal helper for creating the MXNet operator parameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addParam(String paramName, boolean value)
    Adds a parameter.
    void
    addParam(String paramName, double value)
    Adds a parameter.
    void
    addParam(String paramName, float value)
    Adds a parameter.
    void
    addParam(String paramName, int value)
    Adds a parameter.
    void
    addParam(String paramName, long value)
    Adds a parameter.
    void
    addParam(String paramName, ai.djl.ndarray.types.Shape shape)
    Adds a parameter.
    void
    addParam(String paramName, Number value)
    Adds a parameter.
    void
    addParam(String paramName, String value)
    Adds a parameter.
    void
    addTupleParam(String paramName, float... tuple)
    Adds a parameter with tuple value.
    void
    addTupleParam(String paramName, int... tuple)
    Adds a parameter with tuple value.
    void
    addTupleParam(String paramName, long... tuple)
    Adds a parameter with tuple value.
    void
    setDataType(ai.djl.ndarray.types.DataType dataType)
    Sets the dataType to use for the operation.
    void
    setDevice(ai.djl.Device device)
    Sets the device to use for the operation.
    void
    setParam(String paramName, String value)
    Sets a (potentially existing) parameter to a new value.
    void
    setShape(ai.djl.ndarray.types.Shape shape)
    Sets the Shape parameter.
    void
    setSparseFormat(ai.djl.ndarray.types.SparseFormat sparseFormat)
    Sets the sparseFormat to use for the operation.

    Methods inherited from class ai.djl.util.PairList

    add, add, add, addAll, clear, contains, equals, get, get, hashCode, indexOf, isEmpty, iterator, keyArray, keyAt, keys, remove, remove, size, stream, subList, subList, toMap, toMap, unique, valueArray, valueAt, values

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • MxOpParams

      public MxOpParams()
  • Method Details

    • setShape

      public void setShape(ai.djl.ndarray.types.Shape shape)
      Sets the Shape parameter.
      Parameters:
      shape - the shape to set
    • setDevice

      public void setDevice(ai.djl.Device device)
      Sets the device to use for the operation.
      Parameters:
      device - the device to use for the operation
    • setDataType

      public void setDataType(ai.djl.ndarray.types.DataType dataType)
      Sets the dataType to use for the operation.
      Parameters:
      dataType - the dataType to use for the operation
    • setSparseFormat

      public void setSparseFormat(ai.djl.ndarray.types.SparseFormat sparseFormat)
      Sets the sparseFormat to use for the operation.
      Parameters:
      sparseFormat - the sparseFormat to use for the operation
    • setParam

      public void setParam(String paramName, String value)
      Sets a (potentially existing) parameter to a new value.
      Parameters:
      paramName - the parameter name to update
      value - the value to set the parameter to
    • addParam

      public void addParam(String paramName, ai.djl.ndarray.types.Shape shape)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      shape - the value of the new parameter
    • addParam

      public void addParam(String paramName, String value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, int value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, long value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, double value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, float value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, boolean value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addParam

      public void addParam(String paramName, Number value)
      Adds a parameter.
      Parameters:
      paramName - the name of the new parameter
      value - the value of the new parameter
    • addTupleParam

      public void addTupleParam(String paramName, int... tuple)
      Adds a parameter with tuple value.
      Parameters:
      paramName - the name of the new parameter
      tuple - the values of the new parameter
    • addTupleParam

      public void addTupleParam(String paramName, long... tuple)
      Adds a parameter with tuple value.
      Parameters:
      paramName - the name of the new parameter
      tuple - the values of the new parameter
    • addTupleParam

      public void addTupleParam(String paramName, float... tuple)
      Adds a parameter with tuple value.
      Parameters:
      paramName - the name of the new parameter
      tuple - the values of the new parameter