Formatting

* Adding black as dev dependency
* Formatting pina code
* Formatting tests
This commit is contained in:
Dario Coscia
2025-02-24 11:26:49 +01:00
committed by Nicola Demo
parent 4c4482b155
commit 42ab1a666b
77 changed files with 1170 additions and 924 deletions

View File

@@ -1,4 +1,4 @@
""" Module for Loss Interface """
"""Module for Loss Interface"""
from abc import ABCMeta, abstractmethod
from torch.nn.modules.loss import _Loss
@@ -58,4 +58,4 @@ class LossInterface(_Loss, metaclass=ABCMeta):
ret = torch.sum(loss, keepdim=True, dim=-1)
else:
raise ValueError(self.reduction + " is not valid")
return ret
return ret