Dropout:ニューロンをランダムに無効化する
汎化のために冗長性を持たせます
「Dropout:ニューロンをランダムに無効化する」はCoddyKit上の無料Deep Learning Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはDeep Learning Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Deep Learning Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
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. ✅
AI チューターと学ぶ Python — 無料
ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。
- コース
- 30
- レッスン
- 120
よくある質問
「Dropout:ニューロンをランダムに無効化する」レッスンは無料ですか?
はい。「Dropout:ニューロンをランダムに無効化する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Deep Learning Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Deep Learning Academyコースには全4レッスンが含まれています。
「Dropout:ニューロンをランダムに無効化する」で何を学びますか?
汎化のために冗長性を持たせます ブラウザで直接実行するハンズオンコードでDeep Learning Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Deep Learning Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのDeep Learning Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「Dropout:ニューロンをランダムに無効化する」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このDeep Learning Academyレッスンでコードを書いて実行できますか?
はい。すべてのDeep Learning Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 学習用と検証用の差を読み取る
- Dropout:ニューロンをランダムに無効化する
- Batch NormとLayer Norm
- 無料でデータを増やすデータ拡張