This pull request introduces a comprehensive update to the unit tests for various loss functions within the fedot_ind.core.models.nn.network_modules.losses module. It adds tests for a variety of loss functions including ExpWeightedLoss, HuberLoss, LogCoshLoss, MaskedLossWrapper, CenterLoss, CenterPlusLoss, FocalLoss, TweedieLoss, SMAPELoss, and RMSELoss. Additionally, it includes tests for the lambda_prepare function with different types of inputs.
Summary
Added unit tests for multiple loss functions to ensure correctness and stability.
Tests cover different scenarios and input types for the lambda_prepare function.
Introduced tests for ExpWeightedLoss focusing on its behavior over multiple time steps.
Implemented tests for HuberLoss, LogCoshLoss, and their behavior with different reduction methods (mean, sum, none).
Added a test for MaskedLossWrapper to verify its functionality with NaN values in the target tensor.
Included tests for CenterLoss and CenterPlusLoss to validate loss calculation with respect to class centers.
Provided tests for FocalLoss with different configurations of alpha, gamma, and reduction methods.
Tested TweedieLoss with different power values to ensure correct loss computation.
Added tests for SMAPELoss and RMSELoss to verify their accuracy in calculating respective losses.
This update ensures that the loss functions work as expected across a variety of conditions and input types, enhancing the reliability of the neural network module's loss computation capabilities.
Fixes #148.
đŸ’¡ To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
This is an automated message generated by Sweep AI.
Description
This pull request introduces a comprehensive update to the unit tests for various loss functions within the
fedot_ind.core.models.nn.network_modules.losses
module. It adds tests for a variety of loss functions includingExpWeightedLoss
,HuberLoss
,LogCoshLoss
,MaskedLossWrapper
,CenterLoss
,CenterPlusLoss
,FocalLoss
,TweedieLoss
,SMAPELoss
, andRMSELoss
. Additionally, it includes tests for thelambda_prepare
function with different types of inputs.Summary
lambda_prepare
function.ExpWeightedLoss
focusing on its behavior over multiple time steps.HuberLoss
,LogCoshLoss
, and their behavior with different reduction methods (mean
,sum
,none
).MaskedLossWrapper
to verify its functionality with NaN values in the target tensor.CenterLoss
andCenterPlusLoss
to validate loss calculation with respect to class centers.FocalLoss
with different configurations of alpha, gamma, and reduction methods.TweedieLoss
with different power values to ensure correct loss computation.SMAPELoss
andRMSELoss
to verify their accuracy in calculating respective losses.This update ensures that the loss functions work as expected across a variety of conditions and input types, enhancing the reliability of the neural network module's loss computation capabilities.
Fixes #148.
đŸ’¡ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.