Tensor Messages
Tensor metadata types for ML pipelines. For the full tensor API with DLPack zero-copy, see Tensor API.
Usage
Tensor data flows through HORUS using the Image, PointCloud, and Tensor pool-backed types — not message structs. The tensor descriptor types here are metadata for describing tensor shapes and dtypes.
For ML inference, the typical pattern is:
import horus
import numpy as np
def inference_tick(node):
img = node.recv("camera.rgb")
if img is None:
return
# Zero-copy to numpy via DLPack
frame = np.from_dlpack(img) # (H, W, C) uint8
# Run inference
result = model(frame)
node.send("predictions", result)
See Tensor API for TensorHandle, TensorPool, and DLPack patterns.
See Also
- Tensor API — TensorHandle, TensorPool, DLPack
- Image API — Zero-copy camera frames
- Rust Tensor Messages — Rust equivalent