Dropout: Descarte Neurônios Aleatoriamente
Force redundância para obter generalização
Dropout: Descarte Neurônios Aleatoriamente é uma aula grátis de Deep Learning Academy no CoddyKit. Esta é a aula 2 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Deep Learning Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Deep Learning Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
What Dropout Does
Dropout randomly turns off some neurons during each training step, so the network cannot lean on any single unit too heavily. 🎲
Why Random Drops Help
By dropping neurons at random, dropout forces the network to build redundant paths, which spreads knowledge and improves generalization.
The Dropout Rate
The dropout rate p is the chance each neuron is dropped. A value like 0.5 means roughly half the units are silenced each step.
Add It in PyTorch
You add dropout with one layer. Place nn.Dropout between linear layers to regularize the activations flowing through.
self.drop = nn.Dropout(p=0.5)
x = self.drop(torch.relu(self.fc1(x)))Drops Change Every Step
Each forward pass drops a different random set of neurons, so the model effectively trains a huge ensemble of thinner networks.
Scaling Keeps It Fair
To keep the average signal steady, PyTorch scales the surviving activations up during training, so test-time outputs stay balanced.
Turn It Off at Eval
Dropout must be disabled during evaluation. Calling model.eval() switches it off so every neuron contributes to the prediction.
model.eval()
with torch.no_grad():
preds = model(x_val)Choosing a Rate
Common rates sit between 0.2 and 0.5. Higher values regularize more but can starve the network of signal if pushed too far.
Where to Place It
Put dropout on wide hidden layers where overfitting bites hardest. It is rarely applied right before the final output.
Dropout and CNNs
For convolutional features, plain dropout helps less. Many vision nets prefer Dropout2d or rely on batch norm instead.
A Cheap, Strong Tool
Dropout adds no extra parameters and costs almost nothing, yet it is one of the most reliable ways to shrink the train/val gap.
Quick Check
Think about what dropout should do when you evaluate the model.
Recap
You met dropout: randomly silencing neurons in training to force redundancy, then turning it off at eval for full, stable predictions. ✅
Perguntas Frequentes
A aula “Dropout: Descarte Neurônios Aleatoriamente” é grátis?
Sim — o texto completo de “Dropout: Descarte Neurônios Aleatoriamente” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Deep Learning Academy, atualize para CoddyKit PRO. O curso de Deep Learning Academy inclui 4 aulas no total.
O que vou aprender em “Dropout: Descarte Neurônios Aleatoriamente”?
Force redundância para obter generalização Você pratica Deep Learning Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Deep Learning Academy?
Nenhuma experiência prévia é necessária. Deep Learning Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 2 de 4.
Quanto tempo leva a aula “Dropout: Descarte Neurônios Aleatoriamente”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Deep Learning Academy?
Sim. Cada aula de Deep Learning Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Entenda a Diferença entre Treinamento e Validação
- Dropout: Descarte Neurônios Aleatoriamente
- Normalização de Lote e Normalização de Camada
- Aumento de Dados como Dados Gratuitos