Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: PINN Real-Time Inference

Crate: kwavers
Run: cargo run -p kwavers --example pinn_real_time_inference --features pinn
Source: crates/kwavers/examples/pinn_real_time_inference.rs

What This Example Demonstrates

This example demonstrates real-time Physics-Informed Neural Network (PINN) inference. It shows how to deploy a trained PINN model for fast inference on new input parameters.

Real-Time Features

FeatureDescription
Trained ModelPre-trained PINN checkpoint
Fast InferenceForward pass in milliseconds
Parameter VariationReal-time parameter sweeps
Streaming OutputContinuous result updates

Key Code Snippet

// Load pre-trained PINN
let pinn = load_trained_pinn("checkpoint.bin")?;

// Real-time inference loop
loop {
    let input = get_new_parameters()?;
    let result = pinn.forward(&input)?;
    
    update_display(&result);
    
    if should_stop() {
        break;
    }
}

Book Chapter

← Inverse Problems and Physics-Informed Neural Networks