Conteúdo do Curso
PyTorch Essentials
PyTorch Essentials
Challenge: Initializing Model Weights and Biases
Tarefa
Swipe to begin your solution
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
3x4
tensor filled with random values from a uniform distribution between0
and1
(weights for the first layer). - Create a
1x4
tensor filled with zeros (biases for the first layer). - Create a
4x2
tensor with random integers between-5
and5
(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
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 6
Challenge: Initializing Model Weights and Biases
Tarefa
Swipe to begin your solution
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
3x4
tensor filled with random values from a uniform distribution between0
and1
(weights for the first layer). - Create a
1x4
tensor filled with zeros (biases for the first layer). - Create a
4x2
tensor with random integers between-5
and5
(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
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 6
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo