Sektion 1. Kapitel 6
single
Challenge: Initializing Model Weights and Biases
Stryg for at vise menuen
Opgave
Swipe to start coding
You are tasked with creating random tensors to initialize weights and biases for a simple neural network.
- Ensure reproducibility by setting a manual seed to an arbitrary number before generating the tensors.
- Create a
3x4tensor filled with random values from a uniform distribution between0and1(weights for the first layer). - Create a
1x4tensor filled with zeros (biases for the first layer). - Create a
4x2tensor with random integers between-5and5(weights for the second layer).
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 6
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat