NNData
This message carries tensors and its data. NeuralNetwork node outputs NNData.Creating NNData
You can also create this message on the host (example here) or Script node (Script NNData example), populate the tensor with the data, and send the message to theinput
of the NeuralNetwork node.Reference
class
depthai.NNData(depthai.Buffer)
method
method
method
method
getAllLayerNames(self) -> list[str]: list[str]
Returns: Names of all layers added
method
getAllLayers(self) -> list[TensorInfo]: list[TensorInfo]
Returns: All layers and their information
method
method
getLayerDatatype(self, name: str, datatype: TensorInfo.DataType) -> bool: bool
Retrieve datatype of a layers tensor Parameter ``name``: Name of the layer Parameter ``datatype``: Datatype of layers tensor Returns: True if layer exists, false otherwise
method
getSequenceNum(self) -> int: int
Retrieves image sequence number
method
method
getTensorDatatype(self, name: str) -> TensorInfo.DataType: TensorInfo.DataType
Get the datatype of a given tensor Returns: TensorInfo::DataType tensor datatype
method
getTensorInfo(self, name: str) -> TensorInfo|None: TensorInfo|None
Retrieve tensor information Parameter ``name``: Name of the tensor Returns: Tensor information
method
getTimestamp(self) -> datetime.timedelta: datetime.timedelta
Retrieves timestamp related to dai::Clock::now()
method
getTimestampDevice(self) -> datetime.timedelta: datetime.timedelta
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
method
method
hasLayer(self, name: str) -> bool: bool
Checks if given layer exists Parameter ``name``: Name of the layer Returns: True if layer exists, false otherwise
method
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.