Neural Network Library containing Tensor and NeuralNet classes for inference.
More...
|
| using | NN::NeuralNetPtr = std::shared_ptr< NeuralNet > |
| | Smart pointer type for managing NeuralNet instances.
|
| |
| using | NN::Shape = std::vector< int64_t > |
| | Shape of a N-dimensional Tensor represented as the size in each dimension. Can be -1 in case of dynamic dimensions.
|
| |
Neural Network Library containing Tensor and NeuralNet classes for inference.
Contains the Tensor class for representing N-dimensional arrays with various data types. The Tensor class supports operations like reshaping, mapping, reducing, and converting to/from cv::Mat.
A factory handles model loading and abstracts the underlying inference engine (e.g., ONNX Runtime).
◆ NeuralNetPtr
Smart pointer type for managing NeuralNet instances.
This is a shared pointer type that allows for easy management of NeuralNet instances. It is used to avoid memory leaks and ensure proper cleanup of resources.
◆ Shape
| using NN::Shape = typedef std::vector<int64_t> |
Shape of a N-dimensional Tensor represented as the size in each dimension. Can be -1 in case of dynamic dimensions.
The Shape is a vector of int64_t values, where each value represents the size of the corresponding dimension. A Shape can be used to describe the input or output shape of a Tensor in a neural network. For example, a Shape of [-1, 3, 512, 512] indicates a dynamic batch size (first dimension), 3 channels, and a spatial resolution of 512x512 pixels. The -1 indicates that the batch size can vary.
Abstract base class for neural networks.
Definition NeuralNet.h:31
virtual Shape inputShape() const =0
Get the input shape of the neural network. This might contain dynamic dimensions (e....
The shape of a Tensor is never empty, so it always contains at least one dimension. It is guaranteed that no dimension is -1, so the shape is static. This means that the number of elements in a Tensor can be calculated as the product of all dimensions.
◆ ErrorCode
Error codes for the neural network module.
This enum class defines the various error codes that can be returned by the neural network module:
- InvalidArgument: The provided argument i.e. the path to the onnx model is invalid.
- OutOfMemory: The system/gpu ran out of memory.
- RuntimeError: A runtime error occurred.
- Author
- Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..faun.nosp@m.hofe.nosp@m.r.de)
- Date
- August 2025
◆ TensorType
TensorType encapsulates the supported data types of tensor elements. The supported types are: