Record Class NodeInfo
java.lang.Object
java.lang.Record
smile.onnx.NodeInfo
- Record Components:
name- the node name as used in the session run call.onnxType- the ONNX value type (e.g. TENSOR, SEQUENCE, MAP).tensorInfo- tensor type and shape information; non-null only whenonnxType == OnnxType.TENSOR.
Describes a model input or output node, including its name, ONNX value
type, and (for tensor nodes) its tensor type/shape information.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeInfo(String name, OnnxType onnxType, TensorInfo tensorInfo) Creates an instance of aNodeInforecord class.NodeInfo(String name, TensorInfo tensorInfo) Convenience constructor for a tensor node. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisTensor()Returnstrueif this node carries a tensor value.name()Returns the value of thenamerecord component.onnxType()Returns the value of theonnxTyperecord component.Returns the value of thetensorInforecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
NodeInfo
Convenience constructor for a tensor node.- Parameters:
name- the node name.tensorInfo- the tensor type and shape.
-
NodeInfo
Creates an instance of aNodeInforecord class.- Parameters:
name- the value for thenamerecord componentonnxType- the value for theonnxTyperecord componenttensorInfo- the value for thetensorInforecord component
-
-
Method Details
-
isTensor
public boolean isTensor()Returnstrueif this node carries a tensor value.- Returns:
- true if this is a tensor node.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
onnxType
-
tensorInfo
Returns the value of thetensorInforecord component.- Returns:
- the value of the
tensorInforecord component
-