Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Initializing Model Weights and Biases | PyTorch-Einführung
PyTorch Essentials
Abschnitt 1. Kapitel 6
single

single

Challenge: Initializing Model Weights and Biases

Swipe um das Menü anzuzeigen

Note
Note

Initializing weights with random integers is not recommended in practice; this approach is used here solely for the purpose of this task.

Aufgabe

Wischen, um mit dem Codieren zu beginnen

You are tasked with creating random tensors to initialize weights and biases for a simple neural network.

  1. Ensure reproducibility by setting a manual seed to an arbitrary number before generating the tensors.
  2. Create a 3x4 tensor filled with random values from a uniform distribution between 0 and 1 (weights for the first layer).
  3. Create a 1x4 tensor filled with zeros (biases for the first layer).
  4. Create a 4x2 tensor with random integers between -5 and 5 (weights for the second layer).

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 6
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt