Skip to content

Instantly share code, notes, and snippets.

@hietalajulius
Created July 28, 2023 12:12
Show Gist options
  • Save hietalajulius/734bfc96c0941cc49e3c9583934732ab to your computer and use it in GitHub Desktop.
Save hietalajulius/734bfc96c0941cc49e3c9583934732ab to your computer and use it in GitHub Desktop.
// Create a new neural network with 2 input features, 8 hidden units in each of the two hidden layers, and 1 output feature
let mut nn = NN::new(2, 8, 8, 1, &mut rng);
// ...
// Perform a forward pass through the neural network to compute the predicted output
let y = nn.forward(&x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment