Skip to main content

Module neural_physics

Module neural_physics 

Source
Expand description

Neural network-based physics acceleration (CPU mock).

Provides a simple feed-forward neural network with multiple activation functions, forward-pass inference, MSE loss, ML force potentials, and collision probability prediction — all on CPU as a GPU mock backend.

Structs§

NeuralLayer
A single fully-connected neural network layer.
NeuralNet
A feed-forward neural network composed of stacked NeuralLayers.

Enums§

ActivationType
Activation function used in a neural layer.

Functions§

activate
Evaluate activation function act at scalar x.
activate_derivative
Evaluate the derivative of activation function act at pre-activation x.
create_network
Create a fully-connected network with the given layer sizes and random weights.
forward_pass
Run a forward pass through net, returning the output vector.
gpu_neural_batch_forward
Run a batched GPU-style forward pass for multiple input vectors.
mse_loss
Mean squared error between predicted and target vectors.
neural_collision_check
Predict collision probability between two spheres using a neural network.
neural_force_prediction
Predict interatomic forces using a neural network potential.