|
| struct | ActivationOp |
| | Element-wise non-linear activation (Identity, Sigmoid, Tanh, ReLU, Softmax). More...
|
| |
| class | AdaptiveMomentEstimation |
| | Adam optimizer with first/second gradient moments for stochastic minibatch training. More...
|
| |
| class | Addition |
| | Element-wise addition layer that sums two input tensors of identical shape (residual connections). More...
|
| |
| struct | AddOp |
| | Element-wise sum of several input tensors (used by residual connections). More...
|
| |
| class | ApproximationNetwork |
| | Factory neural network preconfigured for regression / function approximation. More...
|
| |
| struct | AttentionOp |
| | Scaled dot-product attention with optional causal mask and dropout. More...
|
| |
| struct | AugmentationSettings |
| | Image augmentation parameters: reflections, rotations and translations applied at training. More...
|
| |
| class | AutoAssociationNetwork |
| | Factory neural network preconfigured for auto-association (anomaly detection). More...
|
| |
| class | Backend |
| | Process-wide singleton that owns the thread pool and the cuBLAS/cuDNN handles. More...
|
| |
| struct | BackPropagation |
| | Workspace holding parameter gradients and per-layer deltas during a backward pass. More...
|
| |
| struct | BackPropagationLM |
| | Backprop scratch state specific to Levenberg-Marquardt (per-sample errors, Jacobian, Hessian approx). More...
|
| |
| struct | Batch |
| | Minibatch container holding pinned host/device buffers and views into a Dataset. More...
|
| |
| struct | BatchNormOp |
| | Batch normalization with learnable scale/shift and running statistics for inference. More...
|
| |
| class | Bounding |
| | Output bounding layer that clips outputs to configured lower and upper limits. More...
|
| |
| struct | BoundOp |
| | Clamps each output channel to a configurable lower/upper interval. More...
|
| |
| struct | BoxPlot |
| | Five-number summary (minimum, Q1, median, Q3, maximum) used to draw a box plot. More...
|
| |
| struct | Buffer |
| | Owning raw byte buffer that lives on CPU or CUDA memory, with aligned (re)allocation. More...
|
| |
| class | ClassificationNetwork |
| | Factory neural network preconfigured for tabular classification. More...
|
| |
| struct | CombinationOp |
| | Affine combination output = input * weights + bias (the dense matmul building block). More...
|
| |
| struct | CombinationReluOp |
| | Fused affine + ReLU activation (uses cuBLASLt epilogue on GPU when available). More...
|
| |
| class | Configuration |
| | Global singleton holding the OpenNN device and precision configuration. More...
|
| |
| class | Convolutional |
| | 2D convolutional layer with kernel, stride, padding, activation, and optional batch normalization. More...
|
| |
| class | ConvolutionalRelu |
| | Fused convolution + ReLU layer; runs as a single GPU op (cudnn) and is CUDA-Graph friendly. More...
|
| |
| struct | ConvolutionOp |
| | 2D convolution operator (NHWC layout) backed by Eigen on CPU and cuDNN on GPU. More...
|
| |
| struct | ConvolutionReluOp |
| | Fused 2D convolution + ReLU activation (uses cuDNN fused epilogue on GPU). More...
|
| |
| struct | Correlation |
| | Result of a correlation analysis: model parameters, fit quality, and the method/form used. More...
|
| |
| class | CsvReader |
| | Tokenising CSV reader that returns string_views into a single backing buffer. More...
|
| |
| class | Dataset |
| | Abstract base class for OpenNN datasets, owning samples, variables, and metadata. More...
|
| |
| class | Dense |
| | Fully-connected layer with configurable activation, optional batch normalization and dropout. More...
|
| |
| class | DenseRelu |
| | Fused dense + ReLU layer; combines linear projection and ReLU activation in a single op for performance. More...
|
| |
| struct | Descriptives |
| | Summary statistics (minimum, maximum, mean, standard deviation) for one variable. More...
|
| |
| struct | DropoutOp |
| | Inverted dropout: at training time zeros activations with probability rate and rescales survivors. More...
|
| |
| class | Embedding |
| | Token-id to dense vector embedding layer with optional scaling and positional encoding. More...
|
| |
| struct | EmbeddingLookupOp |
| | Token embedding lookup with optional scaling and additive positional encoding. More...
|
| |
| struct | EnumMap |
| |
| class | FileReader |
| | Thread-safe positional file reader (pread on POSIX, overlapped ReadFile on Windows). More...
|
| |
| class | FileWriter |
| | Streaming writer that finalises by atomic-renaming a .tmp file to its final path. More...
|
| |
| struct | FlatOp |
| | Flattens a multi-dimensional tensor into a 2D (batch, features) tensor. More...
|
| |
| class | Flatten |
| | Flatten layer that reshapes a multi-dimensional input into a single 1D feature vector. More...
|
| |
| class | ForecastingNetwork |
| | Factory neural network preconfigured for time-series forecasting. More...
|
| |
| struct | ForwardPropagation |
| | Workspace holding the activations of every layer during a forward pass. More...
|
| |
| class | GeneticAlgorithm |
| | Selects the optimal subset of input features using an evolutionary genetic algorithm. More...
|
| |
| class | GrowingInputs |
| | Selects the optimal subset of input features by greedily growing the input set. More...
|
| |
| class | GrowingNeurons |
| | Selects the optimal hidden neuron count by incrementally growing the number of neurons. More...
|
| |
| struct | Histogram |
| | Frequency histogram with per-bin minimums, maximums, centers, and counts. More...
|
| |
| class | ImageClassificationNetwork |
| | Factory convolutional neural network preconfigured for image classification. More...
|
| |
| class | ImageDataset |
| | Image dataset that streams BMP images from disk with optional augmentation. More...
|
| |
| class | InputsSelection |
| | Abstract base class for algorithms that search the optimal subset of input variables. More...
|
| |
| struct | InputsSelectionResults |
| | Aggregated results of an inputs selection run including optimal inputs and error histories. More...
|
| |
| class | Json |
| |
| class | JsonDocument |
| |
| class | JsonWriter |
| |
| class | KMeans |
| | K-means clustering utility that partitions samples into the requested number of clusters. More...
|
| |
| class | LanguageDataset |
| | Token-based language dataset with input/target vocabularies and binary token cache. More...
|
| |
| class | Layer |
| | Abstract base class for all OpenNN layers; orchestrates operators and shape propagation. More...
|
| |
| struct | LayerNormOp |
| | Layer normalization with learnable scale/shift, applied across the embedding dimension. More...
|
| |
| class | LevenbergMarquardtAlgorithm |
| | Levenberg-Marquardt optimizer combining Gauss-Newton and gradient descent through an adaptive damping factor. More...
|
| |
| class | Loss |
| | Unified loss container supporting MSE, cross-entropy, Minkowski, weighted, and regularized variants. More...
|
| |
| struct | MergeOp |
| | Reshapes (batch, heads, seq, head_dim) tensors back into (batch, seq, embed); no parameters. More...
|
| |
| class | ModelExpression |
| | Emits a trained neural network as source code in C, Python, JavaScript, or PHP. More...
|
| |
| class | ModelSelection |
| | Orchestrates model selection by combining inputs selection and neurons selection over a TrainingStrategy. More...
|
| |
| class | MultiHeadAttention |
| | Multi-head scaled dot-product attention layer used in transformer architectures. More...
|
| |
| struct | MultiHeadProjectionOp |
| | Projects (input_features) into (heads * head_dim) and reshapes for multi-head attention. More...
|
| |
| class | NeuralNetwork |
| | Container of layers forming a feed-forward neural network, with parameter storage and I/O. More...
|
| |
| class | NeuronSelection |
| | Abstract base class for algorithms that select the optimal number of hidden neurons. More...
|
| |
| struct | NeuronsSelectionResults |
| | Aggregated results of a neurons selection run including the optimal neuron count and error histories. More...
|
| |
| class | Normalization3d |
| | Layer normalization over the embedding axis of a 3D (batch, sequence, embedding) tensor. More...
|
| |
| struct | Operator |
| | Base class for compute building blocks composed by layers (matmul, activation, dropout, etc.). More...
|
| |
| class | Optimizer |
| | Abstract base class for training optimizers (Adam, SGD, Quasi-Newton, Levenberg-Marquardt). More...
|
| |
| struct | OptimizerData |
| | Per-optimizer scratch state (moments, directions, iteration counter) backing the update step. More...
|
| |
| struct | Pool3dOp |
| | Sequence-wide 1D pooling over the embedding dimension (mean or max). More...
|
| |
| class | Pooling |
| | 2D spatial pooling layer supporting max and average reduction. More...
|
| |
| class | Pooling3d |
| | Sequence pooling layer reducing the time axis of a (sequence, features) input. More...
|
| |
| struct | PoolOp |
| | 2D pooling operator supporting max and average reductions. More...
|
| |
| class | QuasiNewtonMethod |
| | Quasi-Newton optimizer using the BFGS inverse-Hessian approximation with line search. More...
|
| |
| class | Recurrent |
| | Basic recurrent (RNN) layer that unrolls over time steps with a shared activation. More...
|
| |
| class | Registry |
| |
| class | ResponseOptimization |
| | Optimizes input values so that a network's outputs satisfy user-defined conditions and objectives. More...
|
| |
| struct | ScaleOp |
| | Scales inputs to a target range using per-feature minimum/maximum or mean/std statistics. More...
|
| |
| class | Scaling |
| | Input scaling layer that normalizes features using per-variable descriptive statistics. More...
|
| |
| class | ScopedTimer |
| |
| struct | Shape |
| | Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank). More...
|
| |
| class | SimpleResNet |
| | Factory residual neural network with a configurable number of blocks per stage. More...
|
| |
| struct | Stats |
| |
| class | StochasticGradientDescent |
| | Stochastic gradient descent with optional momentum, Nesterov, and learning-rate decay. More...
|
| |
| class | TabularDataset |
| | Tabular dataset with CSV loading, scaling, descriptive statistics and correlation analysis. More...
|
| |
| struct | TensorSpec |
| | Lightweight description of a tensor's shape and data type (no storage attached). More...
|
| |
| struct | TensorView |
| | Non-owning view over a tensor: pointer, shape, and data type with rich reshape helpers. More...
|
| |
| class | TestingAnalysis |
| | Performs post-training analysis of a neural network: errors, confusion matrices, ROC, gain charts, etc. More...
|
| |
| class | TextClassificationNetwork |
| | Factory neural network preconfigured for text classification. More...
|
| |
| class | ThreadSafeQueue |
| |
| class | TimeSeriesDataset |
| | Time series dataset with configurable past/future windows and autocorrelation analysis. More...
|
| |
| struct | TrainingResults |
| | History and final metrics produced by a training run. More...
|
| |
| class | TrainingStrategy |
| | High-level orchestrator pairing a Loss with an Optimizer for a network/dataset. More...
|
| |
| class | Transformer |
| | Factory encoder-decoder Transformer neural network for sequence-to-sequence tasks. More...
|
| |
| class | TransformerDecoder |
| | Drives token-by-token inference of a Transformer model with configurable sampling strategies. More...
|
| |
| struct | TypeInfo |
| | Compile-time traits mapping an opennn::Type to its underlying numeric type and library identifiers. More...
|
| |
| struct | TypeInfo< Type::BF16 > |
| | TypeInfo specialization for bfloat16 (BF16) tensors. More...
|
| |
| struct | TypeInfo< Type::FP32 > |
| | TypeInfo specialization for 32-bit floating point (FP32) tensors. More...
|
| |
| struct | TypeInfo< Type::INT8 > |
| | TypeInfo specialization for signed 8-bit integer (INT8) tensors. More...
|
| |
| struct | UnscaleOp |
| | Inverse of ScaleOp: maps normalized outputs back to the original feature range. More...
|
| |
| class | Unscaling |
| | Output unscaling layer that reverts normalization back to the original feature ranges. More...
|
| |
| struct | Variable |
| | Single dataset column descriptor: name, role, type, scaler, and optional categories. More...
|
| |
| class | VGG16 |
| | Factory neural network reproducing the VGG-16 architecture. More...
|
| |
|
| template<Type... Supported, typename F> |
| void | visit_type (Type t, F &&f) |
| | Dispatches f with the TypeInfo of the runtime Type t (must be in Supported).
|
| |
| template<Type... Supported, typename F> |
| void | visit_type_pair (Type t_in, Type t_out, F &&f) |
| | Dispatches f with the TypeInfo pair for an input and output runtime Type.
|
| |
| cudnnDataType_t | to_cudnn (Type type) noexcept |
| | Returns the cuDNN data type matching the given OpenNN Type (Auto resolves to FP32).
|
| |
| cudaDataType_t | to_cuda (Type type) noexcept |
| | Returns the CUDA data type matching the given OpenNN Type (Auto resolves to FP32).
|
| |
| Index | type_bytes (Type type) noexcept |
| | Returns the byte size of one element of the given OpenNN Type.
|
| |
| bool | is_gpu () |
| | Returns true when the resolved configuration runs on a CUDA GPU.
|
| |
| bool | is_cpu () |
| | Returns true when the resolved configuration runs on CPU.
|
| |
| bool | is_bf16_training () |
| | Returns true when training is configured to use BF16 precision.
|
| |
| bool | is_bf16_inference () |
| | Returns true when inference is configured to use BF16 precision.
|
| |
| Device | current_device () |
| | Returns the active runtime device (CUDA if available, otherwise CPU).
|
| |
| Correlation | linear_correlation (const VectorR &, const VectorR &) |
| | Pearson linear correlation between two equal-length vectors.
|
| |
| Correlation | logarithmic_correlation (const VectorR &, const VectorR &) |
| | Logarithmic correlation: fits y = a + b * log(x) and returns the resulting fit.
|
| |
| Correlation | exponential_correlation (const VectorR &, const VectorR &) |
| | Exponential correlation: fits y = a * exp(b * x) and returns the resulting fit.
|
| |
| Correlation | power_correlation (const VectorR &, const VectorR &) |
| | Power correlation: fits y = a * x^b and returns the resulting fit.
|
| |
| Correlation | logistic_correlation (const VectorR &, const VectorR &) |
| | Logistic correlation between two vectors (binary or continuous targets).
|
| |
| Correlation | logistic_correlation (const VectorR &, const MatrixR &) |
| | Logistic correlation between a vector predictor and a one-hot matrix target.
|
| |
| Correlation | logistic_correlation (const MatrixR &, const VectorR &) |
| | Logistic correlation between a one-hot matrix predictor and a vector target.
|
| |
| Correlation | logistic_correlation (const MatrixR &, const MatrixR &) |
| | Logistic correlation between two one-hot matrices.
|
| |
| Correlation | point_biserial_correlation (const VectorR &, const VectorR &) |
| | Point-biserial correlation between a binary vector and a continuous vector.
|
| |
| Correlation | eta_squared_correlation (const VectorR &, const MatrixR &) |
| | Eta-squared (effect-size) correlation between a continuous vector and a categorical matrix.
|
| |
| Correlation | correlation (const MatrixR &, const MatrixR &) |
| | Generic correlation between two matrices, dispatching on column types (binary, categorical, continuous).
|
| |
| Correlation | linear_correlation_spearman (const VectorR &, const VectorR &) |
| | Spearman rank correlation between two vectors using a linear fit on ranks.
|
| |
| VectorR | calculate_spearman_ranks (const VectorR &) |
| | Computes Spearman ranks (average rank for ties) for the entries of a vector.
|
| |
| Correlation | logistic_correlation_spearman (const VectorR &, const VectorR &) |
| | Spearman-rank logistic correlation between two vectors.
|
| |
| Correlation | correlation_spearman (const MatrixR &, const MatrixR &) |
| | Generic Spearman correlation between two matrices, dispatching on column types.
|
| |
| float | r_correlation_to_z_correlation (const float) |
| | Fisher r-to-z transform of a correlation coefficient.
|
| |
| float | z_correlation_to_r_correlation (const float) |
| | Inverse Fisher z-to-r transform.
|
| |
| pair< float, float > | confidence_interval_z_correlation (const float, Index) |
| | Returns the [lower, upper] confidence interval for a correlation given its sample size.
|
| |
| VectorR | autocorrelations (const VectorR &, Index=10) |
| | Autocorrelations of a series for lags 0..max_lag.
|
| |
| VectorR | cross_correlations (const VectorR &, const VectorR &, Index) |
| | Cross-correlations between two series for lags 0..max_lag.
|
| |
| MatrixR | get_correlation_values (const Tensor< Correlation, 2 > &) |
| | Extracts the coefficient r from a 2D tensor of Correlation values.
|
| |
| const EnumMap< SampleRole > & | sample_role_map () |
| | Returns the bidirectional string/enum map for SampleRole.
|
| |
| const string & | sample_role_to_string (SampleRole role) |
| | Returns the canonical string name for a SampleRole.
|
| |
| SampleRole | string_to_sample_role (const string &name) |
| | Parses a string (name or "0"/"1"/"2"/"3") into the matching SampleRole.
|
| |
| void | mean_squared_error (const TensorView &input, const TensorView &target, float &error, float *workspace_device) |
| | Computes the mean squared error between predictions and targets.
|
| |
| void | mean_squared_error_gradient (const TensorView &input, const TensorView &target, const TensorView &input_delta) |
| | Writes the MSE gradient with respect to the predictions into input_delta.
|
| |
| void | normalized_squared_error (const TensorView &input, const TensorView &target, float coefficient, float &error, float *workspace_device) |
| | Computes the squared error normalized by a dataset-level coefficient.
|
| |
| void | normalized_squared_error_gradient (const TensorView &input, const TensorView &target, float coefficient, const TensorView &input_delta) |
| | Writes the normalized-squared-error gradient with respect to the predictions into input_delta.
|
| |
| void | weighted_squared_error (const TensorView &input, const TensorView &target, float pos_w, float neg_w, float &error, float *workspace_device) |
| | Computes the binary squared error weighted asymmetrically for positive and negative classes.
|
| |
| void | weighted_squared_error_gradient (const TensorView &input, const TensorView &target, float pos_w, float neg_w, float coefficient, const TensorView &input_delta) |
| | Writes the gradient of the weighted squared error scaled by coefficient into input_delta.
|
| |
| void | binary_cross_entropy (const TensorView &input, const TensorView &target, float &error, float *workspace_device) |
| | Computes the binary cross-entropy between predicted probabilities and binary targets.
|
| |
| void | categorical_cross_entropy (const TensorView &input, const TensorView &target, float &error, float *workspace_device) |
| | Computes the multi-class (categorical) cross-entropy between softmax probabilities and one-hot targets.
|
| |
| void | cross_entropy_gradient (const TensorView &input, const TensorView &target, const TensorView &input_delta) |
| | Writes the cross-entropy gradient with respect to the (pre-softmax/logit) predictions into input_delta.
|
| |
| void | minkowski_error (const TensorView &input, const TensorView &target, float power, float &error, float *workspace_device) |
| | Computes the Minkowski error sum(|input - target|^power) for the given power exponent.
|
| |
| void | minkowski_error_gradient (const TensorView &input, const TensorView &target, float power, const TensorView &input_delta) |
| | Writes the Minkowski-error gradient with respect to the predictions into input_delta.
|
| |
| void | cross_entropy_3d (const TensorView &input, const TensorView &target, float &error, Index &active_tokens_out, Index &correct_tokens_out, float *errors_device=nullptr) |
| | Computes 3-D (sequence) cross-entropy used by transformer-style targets, ignoring padded positions.
|
| |
| void | cross_entropy_3d_gradient (const TensorView &input, const TensorView &target, const TensorView &input_delta, Index active_tokens_count) |
| | Writes the 3-D cross-entropy gradient into input_delta, normalizing by the host-side active-token count.
|
| |
| void | cross_entropy_3d_gradient_device_count (const TensorView &input, const TensorView &target, const TensorView &input_delta, const float *active_tokens_count_device) |
| | Variant of cross_entropy_3d_gradient that reads the active-token count from device memory.
|
| |
| void | l1_regularization (const TensorView ¶meters, float lambda, float &penalty) |
| | Computes the L1 regularization penalty lambda * sum(|parameters|).
|
| |
| void | l1_regularization_gradient (const TensorView ¶meters, float lambda, const TensorView &gradient) |
| | Adds the L1 regularization gradient lambda * sign(parameters) into the gradient tensor.
|
| |
| void | l2_regularization (const TensorView ¶meters, float lambda, float &penalty) |
| | Computes the L2 regularization penalty lambda * sum(parameters^2).
|
| |
| void | l2_regularization_gradient (const TensorView ¶meters, float lambda, const TensorView &gradient) |
| | Adds the L2 regularization gradient 2 * lambda * parameters into the gradient tensor.
|
| |
| Tensor3 | load_image (const filesystem::path &) |
| | Loads an image from disk into a rank-3 (height, width, channels) tensor.
|
| |
| void | load_image (const filesystem::path &, float *dst, Index expected_height, Index expected_width, Index expected_channels, bool divide_by_255=false) |
| | Loads an image into a pre-allocated float buffer at the given shape.
|
| |
| Tensor3 | resize_image (const Tensor3 &, Index, Index) |
| | Returns a resized copy of an image at the requested height and width.
|
| |
| void | reflect_image_horizontal (Tensor3 &) |
| | Mirrors the image horizontally (left-right) in place.
|
| |
| void | reflect_image_vertical (Tensor3 &) |
| | Mirrors the image vertically (top-bottom) in place.
|
| |
| void | rotate_image (const Tensor3 &, Tensor3 &, float) |
| | Rotates the image by the given angle (radians) into the destination tensor.
|
| |
| void | translate_image_x (const Tensor3 &, Tensor3 &, Index) |
| | Translates the image along the X axis by the given number of pixels.
|
| |
| void | translate_image_y (const Tensor3 &, Tensor3 &, Index) |
| | Translates the image along the Y axis by the given number of pixels.
|
| |
| void | atomic_rename (const filesystem::path &from, const filesystem::path &to) |
| | Atomically renames a file, replacing the destination if needed.
|
| |
| void | add_json_field (JsonWriter &writer, const string &name, const string &value) |
| |
| void | write_json (JsonWriter &writer, initializer_list< pair< const char *, string > > props) |
| |
| float | read_json_type (const Json *root, const string &field) |
| |
| long | read_json_index (const Json *root, const string &field) |
| |
| bool | read_json_bool (const Json *root, const string &field) |
| |
| string | read_json_string (const Json *root, const string &field) |
| |
| string | read_json_string_fallback (const Json *root, initializer_list< string > names) |
| |
| const Json * | require_json_field (const Json *root, const string &field) |
| |
| template<typename Func> |
| void | for_json_items (const Json *parent, const char *tag, long count, Func func) |
| |
| JsonDocument | load_json_file (const filesystem::path &file_name) |
| |
| const Json * | get_json_root (const JsonDocument &document, const string &tag) |
| |
| const EnumMap< LayerType > & | layer_type_map () |
| | Returns the bidirectional mapping between LayerType values and their string names.
|
| |
| const string & | layer_type_to_string (LayerType type) |
| | Returns the string name associated with the given LayerType.
|
| |
| LayerType | string_to_layer_type (const string &name) |
| | Returns the LayerType corresponding to the given string name.
|
| |
| void | check_rank (const Shape &shape, initializer_list< int > allowed, const char *layer, const char *what) |
| | Throws if shape rank is not one of allowed.
|
| |
| void | pad (const TensorView &input, TensorView &output) |
| | Pads the input tensor and writes the result into output.
|
| |
| void | bound (const TensorView &input, const TensorView &lower_bounds, const TensorView &upper_bounds, TensorView &output) |
| | Clamps each element of input to the [lower_bounds, upper_bounds] range.
|
| |
| void | bound_cpu (const TensorView &input, const TensorView &lower_bounds, const TensorView &upper_bounds, TensorView &output) |
| | CPU implementation of bound().
|
| |
| void | scale (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| | Applies per-feature scaling (mean/std, min/max, or other scalers) to a tensor.
|
| |
| void | scale_cpu (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| | CPU implementation of scale().
|
| |
| void | unscale (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| | Inverse of scale(); reconstructs original values from a previously scaled tensor.
|
| |
| void | unscale_cpu (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| | CPU implementation of unscale().
|
| |
| void | copy (const TensorView &source, TensorView &destination) |
| | Copies the contents of source into destination, dispatching to CPU or GPU as needed.
|
| |
| void | copy_cpu (const TensorView &source, TensorView &destination) |
| | CPU implementation of copy().
|
| |
| void | add (const TensorView &input_1, const TensorView &input_2, TensorView &output) |
| | Element-wise addition: output = input_1 + input_2.
|
| |
| void | add_cpu (const TensorView &input_1, const TensorView &input_2, TensorView &output) |
| | CPU implementation of add().
|
| |
| void | multiply (const TensorView &input_a, bool transpose_a, const TensorView &input_b, bool transpose_b, TensorView &output, float alpha=1.0f, float beta=0.0f) |
| | General matrix multiply: output = alpha * op(input_a) * op(input_b) + beta * output.
|
| |
| void | multiply_cpu (const TensorView &input_a, bool transpose_a, const TensorView &input_b, bool transpose_b, TensorView &output, float alpha=1.0f, float beta=0.0f) |
| | CPU implementation of multiply().
|
| |
| void | softmax (TensorView &output) |
| | Applies softmax in place along the trailing dimension of output.
|
| |
| void | softmax_cpu (TensorView &output) |
| | CPU implementation of softmax().
|
| |
| void | max_pooling_3d_forward (const TensorView &input, TensorView &output, TensorView &maximal_indices, bool is_training) |
| | Forward pass of 3D max pooling; records argmax positions when training.
|
| |
| void | max_pooling_3d_forward_cpu (const TensorView &input, TensorView &output, TensorView &maximal_indices, bool is_training) |
| | CPU implementation of max_pooling_3d_forward().
|
| |
| void | average_pooling_3d_forward (const TensorView &input, TensorView &output) |
| | Forward pass of 3D average pooling.
|
| |
| void | average_pooling_3d_forward_cpu (const TensorView &input, TensorView &output) |
| | CPU implementation of average_pooling_3d_forward().
|
| |
| void | max_pooling_3d_backward (const TensorView &maximal_indices, const TensorView &output_delta, TensorView &input_delta) |
| | Backward pass for 3D max pooling; routes gradients to argmax positions.
|
| |
| void | max_pooling_3d_backward_cpu (const TensorView &maximal_indices, const TensorView &output_delta, TensorView &input_delta) |
| | CPU implementation of max_pooling_3d_backward().
|
| |
| void | average_pooling_3d_backward (const TensorView &input, const TensorView &output_delta, TensorView &input_delta) |
| | Backward pass for 3D average pooling.
|
| |
| void | average_pooling_3d_backward_cpu (const TensorView &input, const TensorView &output_delta, TensorView &input_delta) |
| | CPU implementation of average_pooling_3d_backward().
|
| |
| void | split_heads (const TensorView &source, TensorView &destination) |
| | Reshapes a multi-head attention tensor by splitting the last axis into heads.
|
| |
| void | split_heads_cpu (const TensorView &source, TensorView &destination) |
| | CPU implementation of split_heads().
|
| |
| void | merge_heads (const TensorView &source, TensorView &destination) |
| | Inverse of split_heads(); merges per-head tensors back into a single representation.
|
| |
| void | merge_heads_cpu (const TensorView &source, TensorView &destination) |
| | CPU implementation of merge_heads().
|
| |
| void | sort_string_vector (vector< string > &) |
| | Sorts a vector of strings in place in ascending lexicographical order.
|
| |
| vector< string > | concatenate_string_vectors (const vector< string > &, const vector< string > &) |
| | Concatenates two string vectors and returns the resulting vector.
|
| |
| string | formatNumber (float, int) |
| | Formats a floating point number as a string using the given number of decimal digits.
|
| |
| float | round_to_precision (float, const int &) |
| | Rounds the given floating point value to the requested number of significant digits.
|
| |
| void | throw_if (bool condition, const string &message, const source_location &loc=source_location::current()) |
| |
| template<typename T> |
| ostream & | operator<< (ostream &os, const vector< T > &vec) |
| |
| const string & | pooling_method_to_string (PoolingMethod method) |
| |
| PoolingMethod | string_to_pooling_method (const string &name) |
| |
| Stats & | global_stats () |
| |
| bool & | enabled () |
| |
| void | set_seed (unsigned seed) |
| | Seeds the library-wide pseudo-random number generator.
|
| |
| long long | get_seed () |
| | Returns the seed currently used by the library RNG.
|
| |
| float | random_uniform (float=-1, float=1) |
| | Draws a float uniformly in [min, max].
|
| |
| Index | random_integer (Index, Index) |
| | Draws an integer uniformly in [min, max].
|
| |
| bool | random_bool (float=0.5) |
| | Draws a boolean that is true with the given probability.
|
| |
| void | set_random_uniform (MatrixR &, float=-0.1, float=0.1) |
| | Fills the matrix with uniform random values in [min, max].
|
| |
| void | set_random_uniform (VectorMap, float=-0.1, float=0.1) |
| | Fills the vector map with uniform random values in [min, max].
|
| |
| void | set_random_normal (MatrixMap, float=0, float=1) |
| | Fills the matrix with normal random values of the given mean and standard deviation.
|
| |
| void | set_random_integer (MatrixR &, Index, Index) |
| | Fills the matrix with uniform random integers in [min, max].
|
| |
| void | shuffle (VectorB &vector_to_shuffle) |
| | Randomly permutes the entries of a boolean vector in place.
|
| |
| template<typename T> |
| void | shuffle_vector (vector< T > &) |
| | Randomly permutes the entries of the given vector in place.
|
| |
| void | shuffle_vector_blocks (vector< Index > &, size_t=20) |
| | Shuffles contiguous blocks of the given length while preserving in-block order.
|
| |
| Index | get_random_element (const vector< Index > &) |
| | Picks one element uniformly at random from the given vector.
|
| |
| float | glorot_limit (Index fan_in, Index fan_out) |
| | Returns the Glorot/Xavier uniform initialization limit sqrt(6 / (fan_in + fan_out)).
|
| |
| void | register_classes () |
| |
| void | scale_mean_standard_deviation (MatrixMap, Index, const Descriptives &) |
| | Standardises a column of the matrix in place using its descriptives' mean and standard deviation.
|
| |
| void | scale_standard_deviation (MatrixMap, Index, const Descriptives &) |
| | Divides a column of the matrix by its standard deviation in place.
|
| |
| void | scale_minimum_maximum (MatrixMap, Index, const Descriptives &, float=-1.0f, float=1.0f) |
| | Rescales a column to the [min_range, max_range] interval using its descriptives.
|
| |
| void | scale_logarithmic (MatrixMap, Index) |
| | Applies an element-wise logarithm to the given column.
|
| |
| void | unscale_minimum_maximum (MatrixMap, Index, const Descriptives &, float=-1.0f, float=1.0f) |
| | Inverse of scale_minimum_maximum(): reconstructs original values for the given column.
|
| |
| void | unscale_mean_standard_deviation (MatrixMap, Index, const Descriptives &) |
| | Inverse of scale_mean_standard_deviation() for the given column.
|
| |
| void | unscale_standard_deviation (MatrixMap, Index, const Descriptives &) |
| | Inverse of scale_standard_deviation() for the given column.
|
| |
| void | unscale_logarithmic (MatrixMap, Index) |
| | Inverse of scale_logarithmic() for the given column.
|
| |
| void | unscale_image_minimum_maximum (MatrixMap, Index) |
| | Maps a column back from [-1, 1] to the [0, 255] image-pixel range.
|
| |
| float | minimum (const MatrixR &) |
| | Returns the smallest finite element of a matrix.
|
| |
| float | minimum (const VectorR &) |
| | Returns the smallest finite element of a vector.
|
| |
| float | minimum (const VectorR &, const vector< Index > &) |
| | Returns the smallest finite element of the selected rows of a vector.
|
| |
| VectorR | column_minimums (const Tensor2 &, const vector< Index > &={}, const vector< Index > &={}) |
| | Per-column minimums of a 2D tensor.
|
| |
| float | maximum (const MatrixR &) |
| | Returns the largest finite element of a matrix.
|
| |
| float | maximum (const VectorR &) |
| | Returns the largest finite element of a vector.
|
| |
| float | maximum (const VectorR &, const vector< Index > &) |
| | Returns the largest finite element of the selected rows of a vector.
|
| |
| VectorR | column_maximums (const Tensor2 &, const vector< Index > &={}, const vector< Index > &={}) |
| | Per-column maximums of a 2D tensor, optionally restricted to a row/column subset.
|
| |
| float | range (const VectorR &) |
| | Returns the maximum minus the minimum of a vector.
|
| |
| float | mean (const VectorR &) |
| | Arithmetic mean of a vector, ignoring NaNs.
|
| |
| float | mean (const MatrixR &, Index) |
| | Arithmetic mean of a matrix column, ignoring NaNs.
|
| |
| VectorR | mean (const MatrixR &) |
| | Column-wise arithmetic means of a matrix.
|
| |
| VectorR | mean (const MatrixR &, const vector< Index > &, const vector< Index > &) |
| | Column-wise means of a matrix restricted to the given rows and columns.
|
| |
| float | median (const VectorR &) |
| | Median of a vector.
|
| |
| float | median (const MatrixR &, Index) |
| | Median of a single matrix column.
|
| |
| VectorR | median (const MatrixR &) |
| | Column-wise medians of a matrix.
|
| |
| VectorR | median (const MatrixR &, const vector< Index > &) |
| | Column-wise medians of the selected columns.
|
| |
| VectorR | median (const MatrixR &, const vector< Index > &, const vector< Index > &) |
| | Column-wise medians restricted to the given rows and columns.
|
| |
| float | variance (const VectorR &) |
| | Sample variance of a vector.
|
| |
| float | variance (const VectorR &, const VectorI &) |
| | Sample variance of the selected entries of a vector.
|
| |
| float | standard_deviation (const VectorR &) |
| | Sample standard deviation of a vector.
|
| |
| VectorR | standard_deviation (const VectorR &, Index) |
| | Rolling standard deviation of a vector over a window of the given size.
|
| |
| VectorR | quartiles (const VectorR &) |
| | Returns [Q1, Q2, Q3] of a vector.
|
| |
| VectorR | quartiles (const VectorR &, const vector< Index > &) |
| | Returns [Q1, Q2, Q3] of the selected entries of a vector.
|
| |
| BoxPlot | box_plot (const VectorR &) |
| | Five-number summary (box plot) of a vector.
|
| |
| BoxPlot | box_plot (const VectorR &, const vector< Index > &) |
| | Five-number summary (box plot) of the selected entries of a vector.
|
| |
| Descriptives | vector_descriptives (const VectorR &) |
| | Returns the (min, max, mean, std) descriptives of a vector.
|
| |
| vector< Descriptives > | descriptives (const MatrixR &) |
| | Returns the per-column descriptives of a matrix.
|
| |
| vector< Descriptives > | descriptives (const MatrixR &, const vector< Index > &, const vector< Index > &) |
| | Returns per-column descriptives restricted to the given rows and columns.
|
| |
| Histogram | histogram (const VectorR &, Index=10) |
| | Builds an equal-width histogram of a vector.
|
| |
| Histogram | histogram_centered (const VectorR &, float=0.0f, Index=10) |
| | Builds a histogram with one bin centered on the given value.
|
| |
| Histogram | histogram (const VectorB &) |
| | Builds a two-bin histogram counting false/true entries.
|
| |
| Histogram | histogram (const VectorI &, Index=10) |
| | Builds an equal-width histogram of an integer vector.
|
| |
| vector< Histogram > | histograms (const MatrixR &, Index=10) |
| | Builds one histogram per matrix column.
|
| |
| VectorI | total_frequencies (const vector< Histogram > &) |
| | Sums the per-bin frequencies across a collection of histograms.
|
| |
| Index | minimal_index (const VectorR &) |
| | Index of the smallest element in a vector.
|
| |
| VectorI | minimal_indices (const VectorR &, Index) |
| | Indices of the n smallest elements of a vector.
|
| |
| VectorI | minimal_indices (const MatrixR &) |
| | Row/column coordinates of the smallest element of a matrix.
|
| |
| Index | maximal_index (const VectorR &) |
| | Index of the largest element in a vector.
|
| |
| VectorI | maximal_indices (const VectorR &, Index) |
| | Indices of the n largest elements of a vector.
|
| |
| VectorI | maximal_indices (const MatrixR &) |
| | Row/column coordinates of the largest element of a matrix.
|
| |
| bool | row_finite (const VectorR &values, Index i) |
| | Returns true if the i-th entry of the vector is finite.
|
| |
| bool | row_finite (const MatrixR &matrix, Index i) |
| | Returns true if every entry in row i of the matrix is finite.
|
| |
| VectorR | slice_rows (const VectorR &values, const vector< Index > &indices) |
| | Returns a copy of the vector containing only the entries at the given indices.
|
| |
| MatrixR | slice_rows (const MatrixR &matrix, const vector< Index > &indices) |
| | Returns a copy of the matrix containing only the rows at the given indices.
|
| |
| VectorR | filter_missing_values (const VectorR &) |
| | Returns a copy of the vector with NaN entries removed.
|
| |
| template<typename X, typename Y> |
| pair< X, Y > | filter_missing_values (const X &x, const Y &y) |
| | Returns x and y restricted to rows where both are finite (row counts must match).
|
| |
| bool | is_contiguous (const vector< Index > &indices) |
| | Returns true if the sorted indices form a contiguous run (each entry equals the previous plus one).
|
| |
| template<typename T> |
| bool | is_binary (const T &tensor) |
| | Returns true if every non-NaN entry of the tensor is exactly 0.0 or 1.0.
|
| |
| MatrixR | append_rows (const MatrixR &, const MatrixR &) |
| | Returns the row-wise concatenation of two matrices with matching column counts.
|
| |
| template<typename T> |
| vector< T > | gather_by_index (const vector< T > &data, const vector< Index > &indices) |
| | Returns the elements of data at the given indices.
|
| |
| vector< Index > | build_feasible_rows_mask (const MatrixR &outputs, const VectorR &minimums, const VectorR &maximums) |
| | Returns the indices of the rows of outputs that lie within the per-column bounds.
|
| |
| template<typename T> |
| bool | is_constant (const T &tensor) |
| | Returns true if every non-NaN entry of the tensor equals the first finite entry.
|
| |
| vector< Index > | get_true_indices (const VectorB &flags) |
| | Returns the positions of the true entries in a boolean vector.
|
| |
| VectorI | calculate_rank (const VectorR &, bool ascending=true) |
| | Returns the rank of each element (1-based), ascending by default.
|
| |
| vector< Index > | get_elements_greater_than (const vector< Index > &, Index) |
| | Returns the entries of indices that are strictly greater than the given threshold.
|
| |
| VectorI | get_nearest_points (const MatrixR &, const VectorR &, int=1) |
| | Finds the n rows of the matrix closest to the given point by Euclidean distance.
|
| |
| void | fill_tensor_data (const MatrixR &, const vector< Index > &, const vector< Index > &, float *, bool=true, int contiguous=-1) |
| | Copies the selected sub-matrix into a flat float buffer.
|
| |
| VectorR | perform_Householder_QR_decomposition (const MatrixR &, const VectorR &) |
| | Solves a linear least-squares problem via Householder QR decomposition.
|
| |
| VectorMap | vector_map (const MatrixR &, Index) |
| | Returns an Eigen VectorMap that views a single column of a matrix without copying.
|
| |
| vector< string > | get_tokens (const string &, const string &) |
| | Splits a string on every occurrence of any character in the separator set.
|
| |
| vector< string_view > | get_token_views (string_view, char) |
| | Splits a string view on the given separator, returning views into the original buffer.
|
| |
| string_view | trim_view (string_view) |
| | Returns a view onto the input with leading and trailing whitespace removed.
|
| |
| vector< string > | tokenize (const string &) |
| | Splits the input on whitespace into individual tokens.
|
| |
| vector< string_view > | tokenize_views (string_view) |
| | Whitespace-tokenises a string view, returning views into the source buffer.
|
| |
| vector< string > | convert_string_vector (const vector< vector< string > > &, const string &) |
| | Joins each inner vector with the separator, returning one flattened string per row.
|
| |
| bool | is_numeric_string (string_view) |
| | Returns true if the string can be parsed as a numeric literal.
|
| |
| bool | is_date_time_string (string_view) |
| | Returns true if the string matches one of the supported date/time formats.
|
| |
| time_t | date_to_timestamp (const string &, Index=0, const DateFormat &format=AUTO) |
| | Parses a date/time string into a Unix timestamp.
|
| |
| void | replace_all_appearances (string &, const string &, const string &) |
| | Replaces every occurrence of a substring with another, in place.
|
| |
| void | replace_all_word_appearances (string &, const string &, const string &) |
| | Replaces every whole-word occurrence of a token with another, in place.
|
| |
| string | get_trimmed (const string &) |
| | Returns a copy of the string with leading and trailing whitespace removed.
|
| |
| bool | has_numbers (const vector< string > &) |
| | Returns true if any element of the vector parses as a number.
|
| |
| bool | has_numbers (const vector< string_view > &) |
| | Returns true if any element of the vector parses as a number.
|
| |
| void | replace (string &, const string &, const string &) |
| | In-place replacement of every occurrence of a substring with another.
|
| |
| void | display_progress_bar (int, int) |
| | Prints a textual progress bar to stdout for an in-progress operation.
|
| |
| string | get_time (float) |
| | Formats a duration in seconds as a human-readable HH:MM:SS string.
|
| |
| string | get_first_word (const string &) |
| | Returns the first whitespace-delimited word of a string.
|
| |
| template<typename T> |
| string | vector_to_string (const vector< T > &values, const string &separator=" ") |
| | Serializes a vector to a string with the given element separator.
|
| |
| template<typename Derived> |
| string | vector_to_string (const Eigen::DenseBase< Derived > &values, const string &separator=" ") |
| | Serializes an Eigen dense expression to a string with the given separator.
|
| |
| void | string_to_vector (const string &input, VectorR &values) |
| | Parses a whitespace-separated string of floats into a VectorR.
|
| |
| template<typename T, size_t Rank> |
| string | tensor_to_string (const TensorR< Rank > &values, const string &separator=" ") |
| | Serializes a tensor's flat data to a string with the given separator.
|
| |
| template<typename T, size_t Rank> |
| void | string_to_tensor (const string &input, TensorR< Rank > &values) |
| | Parses a whitespace-separated string into the flat storage of a tensor.
|
| |
| bool | contains (const vector< string > &, const string &) |
| | Returns true if the vector contains the given element.
|
| |
| bool | contains (const vector< string > &, string_view) |
| | Returns true if the vector contains the given element.
|
| |
| int | to_int (Index value) |
| |
| float | to_type (Index value) |
| |
| Index | align_up (Index value, Index alignment) |
| |
| Index | get_aligned_size (Index size) |
| |
| Index | get_aligned_bytes (Index n_bytes) |
| |
| Index | get_aligned_bytes (Index count, Type dtype) |
| |
| bool | is_aligned (const void *ptr) |
| |
| Index | get_aligned_size (const vector< TensorSpec > &specs) |
| |
| Index | get_aligned_size (const vector< vector< TensorSpec > > &specs) |
| |
| Index | get_aligned_bytes (const vector< TensorSpec > &specs) |
| |
| Index | get_aligned_bytes (const vector< vector< TensorSpec > > &specs) |
| |
| Index | get_aligned_bytes (const vector< Shape > &shapes, Type dtype) |
| |
| Index | get_aligned_bytes (const vector< TensorSpec > &specs, Type dtype) |
| |
| Index | get_aligned_bytes (const vector< vector< TensorSpec > > &specs, Type dtype) |
| |
| TensorView & | view_at_slot_or (vector< TensorView > &views, const vector< size_t > &slots, size_t i, TensorView &fallback) |
| |
| TensorView & | view_at_slot_or (vector< vector< TensorView > > &views, const vector< size_t > &slots, size_t i, TensorView &fallback) |
| |
| string | shape_to_string (const Shape &, const string &=" ") |
| | Serializes a shape as a separator-joined string of dimensions.
|
| |
| Shape | string_to_shape (const string &, const string &=" ") |
| | Parses a separator-joined string of dimensions into a Shape.
|
| |
| template<typename... Vs> |
| size_t | hash_combine (const Vs &... values) |
| | Boost-style hash combine that mixes any number of hashable values into a single size_t.
|
| |
| ThreadPoolDevice & | get_device () |
| | Convenience accessor for the global Eigen ThreadPoolDevice.
|
| |
| const EnumMap< VariableType > & | variable_type_map () |
| | Returns the bidirectional string/enum map for VariableType.
|
| |
| const string & | variable_type_to_string (VariableType type) |
| | Returns the canonical string name for a VariableType.
|
| |
| VariableType | string_to_variable_type (const string &name) |
| | Parses a string into the matching VariableType enumerator.
|
| |
| const EnumMap< ScalerMethod > & | scaler_method_map () |
| | Returns the bidirectional string/enum map for ScalerMethod.
|
| |
| const string & | scaler_method_to_string (ScalerMethod method) |
| | Returns the canonical string name for a ScalerMethod.
|
| |
| ScalerMethod | string_to_scaler_method (const string &name) |
| | Parses a string into the matching ScalerMethod enumerator.
|
| |
| const EnumMap< VariableRole > & | variable_role_map () |
| | Returns the bidirectional string/enum map for VariableRole.
|
| |
| const string & | variable_role_to_string (VariableRole role) |
| | Returns the canonical string name for a VariableRole.
|
| |
| VariableRole | string_to_variable_role (const string &name) |
| | Parses a string into a VariableRole; "Id" is mapped to VariableRole::None.
|
| |
| bool | role_matches (VariableRole actual, VariableRole query) |
| | Returns true if actual satisfies query, treating InputTarget as Input or Target.
|
| |