Package ai.djl.mxnet.engine
Class MxOpParams
An internal helper for creating the MXNet operator parameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidAdds a parameter.voidaddTupleParam(String paramName, float... tuple) Adds a parameter with tuple value.voidaddTupleParam(String paramName, int... tuple) Adds a parameter with tuple value.voidaddTupleParam(String paramName, long... tuple) Adds a parameter with tuple value.voidsetDataType(ai.djl.ndarray.types.DataType dataType) Sets the dataType to use for the operation.voidsetDevice(ai.djl.Device device) Sets the device to use for the operation.voidSets a (potentially existing) parameter to a new value.voidsetShape(ai.djl.ndarray.types.Shape shape) Sets the Shape parameter.voidsetSparseFormat(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, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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
Sets a (potentially existing) parameter to a new value.- Parameters:
paramName- the parameter name to updatevalue- the value to set the parameter to
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametershape- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addParam
Adds a parameter.- Parameters:
paramName- the name of the new parametervalue- the value of the new parameter
-
addTupleParam
Adds a parameter with tuple value.- Parameters:
paramName- the name of the new parametertuple- the values of the new parameter
-
addTupleParam
Adds a parameter with tuple value.- Parameters:
paramName- the name of the new parametertuple- the values of the new parameter
-
addTupleParam
Adds a parameter with tuple value.- Parameters:
paramName- the name of the new parametertuple- the values of the new parameter
-