MSE Loss
neuralpy.loss_functions.MSELoss(reduction='mean')
info
MSE Loss is mostly stable and can be used for any project. In the future, any chance of breaking changes is very low.
Applies a Mean Squared Error loss function to the model.
For more information, check this page.
Supported Arguments
reduction='mean'
: (String) Specifies the reduction that is to be applied to the output.
Code Example
from neuralpy.models import Sequential
from neuralpy.optimizer import Adam
from neuralpy.loss_functions import MSELoss
...
# Rest of the imports
...
model = Sequential()
...
# Rest of the architecture
...
# Compiling the model
model.compile(optimizer=Adam(), loss_function=MSELoss(reduction='mean'))