Skip to content

Instantly share code, notes, and snippets.

View mdabir1203's full-sized avatar
🎯
Focusing

Mohammad Abir Abbas aka uknowwhoab1r mdabir1203

🎯
Focusing
View GitHub Profile
@mdabir1203
mdabir1203 / gist:f307903698f327418bf7927388203521
Created August 16, 2025 22:56
"Rust Model Inference Example"
use ndarray::prelude::*;
use ndarray_rand::RandomExt;
use ndarray_rand::rand::distributions::Uniform;
fn sigmoid(x: &Array2<f64>) -> Array2<f64> {
x.mapv(|v| 1.0 / (1.0 + (-v).exp()))
}
// Pretrained weights
struct Model {