0Pricing
Deep Learning Academy · Aula

Gradientes Apontam para Cima — Então Avance na Direção Oposta

Use a inclinação para melhorar os pesos

Gradientes Apontam para Cima — Então Avance na Direção Oposta é 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.

Reading the Slope

To walk downhill you first need to know which way is down. The gradient is the tool that tells you the slope of the loss at your current spot.

Gradient Points Uphill

Here is the surprise: the gradient points in the direction where loss increases fastest. It shows you the steepest way up, not down.

So Step the Other Way

Since the gradient aims uphill, you move in the opposite direction to go down. Subtracting the gradient takes you toward lower loss.

w = w - grad

The Update Rule

This one line is the heart of training. You scale the gradient by a small step size, then subtract it from each weight. Repeat and loss drops.

w = w - lr * grad

Gradient Is a Vector

With many weights, the gradient is a whole vector: one slope per weight. Each weight gets nudged by its own piece of that vector.

Magnitude Means Steepness

A large gradient value means the loss is very steep in that direction, so that weight needs a bigger correction. Small values mean you are nearly flat there.

Where Gradient Is Zero

At the very bottom of a valley the slope flattens and the gradient becomes zero. With nothing to subtract, the weights stop moving. You have converged.

One Step at a Time

You almost never reach the bottom in one jump. Each step only improves things a little, so descent is a long series of tiny downhill moves.

Following the Negative Gradient

The path you trace by always heading along the negative gradient is the route of steepest descent. It is the greedy shortcut toward lower loss.

step = -grad

Why Subtraction Works

Subtracting moves you against the increase, so loss must fall for a small enough step. That simple sign flip is what turns a slope into progress.

Toward Automatic Gradients

You will rarely compute these slopes by hand. PyTorch's autograd finds the gradient for you, but the rule stays the same: subtract it to descend.

Quick Check

Which direction does the gradient point?

Recap

The gradient points uphill toward higher loss, so you subtract a scaled version of it to step down. Repeat that update and the model rolls toward the valley. ⬇️

Perguntas Frequentes

A aula “Gradientes Apontam para Cima — Então Avance na Direção Oposta” é grátis?

Sim — o texto completo de “Gradientes Apontam para Cima — Então Avance na Direção Oposta” é 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 “Gradientes Apontam para Cima — Então Avance na Direção Oposta”?

Use a inclinação para melhorar os pesos 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 “Gradientes Apontam para Cima — Então Avance na Direção Oposta”?

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

  1. A Perda como uma Paisagem a Percorrer
  2. Gradientes Apontam para Cima — Então Avance na Direção Oposta
  3. Taxa de Aprendizado: Grande Demais, Pequena Demais ou Ideal
  4. Minimize uma Função Manualmente em Python
← Voltar para Deep Learning Academy