Skip to main content

Module neural_compute

Module neural_compute 

Source
Expand description

Auto-generated module structure

Modules§

feedforwardnet_traits
FeedForwardNet - Trait Implementations
inferencepipeline_traits
InferencePipeline - Trait Implementations
messagepassingnet_traits
MessagePassingNet - Trait Implementations

Structs§

AdamOptimizer
Adam optimizer for a flat parameter vector.
AtomicNeuralNetwork
Atomic neural network potential (NNP) with one sub-network per element.
AttentionReadout
Attention-based graph readout that computes a weighted sum of node features.
BatchNormLayer
Batch normalization layer (inference mode).
BehlerParrinelloDescriptor
Behler-Parrinello symmetry functions for constructing atomic descriptors.
Conv1DLayer
A 1-D convolutional layer operating on a sequence of feature vectors.
DataNormalizer
Feature-wise Z-score normalizer.
DenseLayer
A single fully-connected (dense) layer with an activation function.
DenseLayer64
A fully-connected layer with f64 weights supporting forward pass and gradient computation for backpropagation.
DropoutLayer
Dropout regularisation layer.
FeedForwardNet
A sequential feed-forward neural network.
GnnLayer
A single graph neural network layer implementing the sum-aggregation message passing update:
GpuNeuralBuffer
A mock GPU buffer for batched neural network inference.
GradAccumulator
Accumulates gradients from multiple backward passes for mini-batch training.
InferencePipeline
An inference pipeline that chains DenseLayer and BatchNormLayer operations.
LayerNorm
Layer normalisation applied to each time step independently.
LayerNormLayer
Layer normalisation (Ba et al., 2016).
MessagePassingNet
A multi-layer message passing neural network stacking GnnLayers.
MultiHeadAttention
Multi-head attention module.
NetworkBuilder
Convenience builder for standard AANN architectures.
NeuralLayer
A single fully-connected layer with f64 weights.
NeuralNetwork
A sequential feed-forward neural network using f64 precision.
PositionalEncoding
Sinusoidal positional encoding (Vaswani et al., 2017).
RnnCell
A single-step Elman RNN cell: h_t = activation(W_x * x_t + W_h * h_{t-1} + b).
TransformerBlock
A single transformer encoder block: x → MHA(LayerNorm(x)) + x → FFN(LayerNorm(·)) + ·
TransformerFfn
Position-wise feed-forward network used inside a transformer block.

Enums§

ActivationFn
Activation functions for neural network layers.
ActivationFn64
Activation function for f64-precision neural network layers.
ExtActivation
Extended activation functions with additional variants for f64 paths.
InferenceOp
A single operation in the inference pipeline.

Functions§

batch_atomic_energies
Predict atomic energies for a batch of (descriptor, atomic_number) pairs.
batch_forward
Run a forward pass for every sample in batch.
clip_gradients_by_norm
Clip a collection of gradient slices in-place so that their combined L2 norm does not exceed max_norm.
compute_forces_batch
Run the network on every position and return a force vector per atom.
compute_gradient_norm
Compute the L2 norm (Frobenius norm) of a concatenated gradient vector.
cross_entropy_loss
Compute cross-entropy loss between predictions and one-hot target.
huber_loss
Huber loss between prediction and target.
huber_loss_grad
Gradient of Huber loss w.r.t. predictions.
l2_regularisation
Compute L2 regularisation loss contribution.
l2_regularisation_grad
Compute L2 regularisation gradient contribution (adds lambda * w to each element).
load_weights_from_buffer
Load weights from a flat f32 buffer into a network, partitioning by layer sizes.
mean_huber_loss
Mean Huber loss over a batch.
mse_loss
Mean squared error loss between predictions and targets.
neural_potential_energy
Compute a scalar potential energy by summing the first network output over all atoms.
save_weights_to_buffer
Serialize network weights to a flat f32 buffer.
scaled_dot_product_attention
Compute scaled dot-product attention.
softmax
Compute softmax of a vector.