![]() |
iVS3D v2.0.0
|
NN Neural Network Library containing Tensor and NeuralNet classes for inference. More...
Namespaces | |
| namespace | Util |
| Namespace for utility functions related to neural networks and tensors. | |
Classes | |
| struct | is_std_array |
| Checks if a type is a std::array. More... | |
| struct | is_std_array< std::array< U, N > > |
| struct | map_array_traits |
| Traits for mapping a function over a std::array. More... | |
| class | NeuralError |
| Represents an error that occurred in the neural network module and contains the error type and message. More... | |
| class | NeuralNet |
| Abstract base class for neural networks. More... | |
| class | NeuralNetFactory |
| Factory class for creating NeuralNet instances. This abstracts from the underlying inference engine (e.g., ONNX Runtime). More... | |
| class | OrtNeuralNet |
| A class that implements the NeuralNet interface using ONNX Runtime. More... | |
| struct | ReduceArgMax |
| Reduces a Tensor by finding the index of the maximum value along a specified axis. More... | |
| struct | ReduceArgMin |
| Reduces a Tensor by finding the index of the minimum value along a specified axis. More... | |
| struct | ReduceMax |
| Reduces a Tensor by computing the maximum value along a specified axis. More... | |
| struct | ReduceMin |
| Reduces a Tensor by computing the minimum value along a specified axis. More... | |
| struct | ReduceSum |
| Reduces a Tensor by summing its elements along a specified axis. More... | |
| class | Tensor |
| A Tensor represents a N-dimensional array containing elements of the same type. Can be used as input and output for inference. More... | |
Typedefs | |
| using | NeuralNetPtr = std::shared_ptr< NeuralNet > |
| Smart pointer type for managing NeuralNet instances. | |
| using | 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. | |
| template<typename T > | |
| using | decay_t = typename std::decay< T >::type |
| Remove cv/ref qualifiers and decay to check std::array<T, N> | |
Enumerations | |
| enum class | ErrorCode |
| Error codes for the neural network module. More... | |
| enum class | TensorType |
| TensorType encapsulates the supported data types of tensor elements. The supported types are: More... | |
Functions | |
| int64_t | shapeNumElements (const Shape &shape) |
| Calculates the number of elements from a given Shape. | |
| int64_t | shapeToStride (const Shape &shape, uint64_t axis) |
| Calculates the stride to iterate elements in a given axis. | |
| std::string | shapeToString (const Shape &shape) |
| Creates a human-readable string from the given shape. | |
| constexpr const char * | toString (TensorType type) |
| Convert the TensorType to a human-readable string. | |
NN 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).
| int64_t NN::shapeNumElements | ( | const Shape & | shape | ) |
Calculates the number of elements from a given Shape.
Returns
| shape | The shape object. |
| int64_t NN::shapeToStride | ( | const Shape & | shape, |
| uint64_t | axis | ||
| ) |
Calculates the stride to iterate elements in a given axis.
| shape | The shape of the tensor to iterate. |
| axis | The axis to iterate. This must be in range [0,shape.size()-1]! |
| std::string NN::shapeToString | ( | const Shape & | shape | ) |
Creates a human-readable string from the given shape.
| shape | The shape to convert. |
|
constexpr |
Convert the TensorType to a human-readable string.
| type | The TensorType to convert. |