Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Initializing Model Weights and Biases | PyTorch Basics
PyTorch Essentials
course content

Conteúdo do Curso

PyTorch Essentials

PyTorch Essentials

1. PyTorch Basics
2. Preparing for Neural Networks
3. Neural Networks

book
Challenge: Initializing Model Weights and Biases

Tarefa
test

Swipe to begin your solution

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).

Note

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

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
toggle bottom row

book
Challenge: Initializing Model Weights and Biases

Tarefa
test

Swipe to begin your solution

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).

Note

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

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt