Função custo (Cost function)

Como foi visto nas seções anteriores, a função custo de uma rede neural tem como objetivo calcular o erro entre os valores de entrada a cada passo de tempo. A função custo está representada abaixo.

\[ \large{} \mathcal{L} _{\theta} (y, ŷ) = - \sum _{t+1} ^{T _y} \mathcal{L} _{\theta} (y ^{< t >} , ŷ ^{< t >}) \]

onde \( \mathcal{L} _{\theta} (y, ŷ) _t \) é a função custo definida. Geralmente essa função custo é a cross entropy loss.