edited utils to take list (#115)

* enhanced difference domain
* refactored utils
* fixed typo
* added tests
---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
This commit is contained in:
Kush
2023-06-19 18:47:52 +02:00
committed by Nicola Demo
parent aaf2bed732
commit 62ec69ccac
9 changed files with 73 additions and 47 deletions

View File

@@ -108,9 +108,9 @@ class LpLoss(LossInterface):
super().__init__(reduction=reduction)
# check consistency
check_consistency(p, (str,int,float), 'degree p')
check_consistency(p, (str,int,float))
self.p = p
check_consistency(relative, bool, 'relative')
check_consistency(relative, bool)
self.relative = relative
def forward(self, input, target):