Fix Codacy Warnings (#477)

---------

Co-authored-by: Dario Coscia <dariocos99@gmail.com>
This commit is contained in:
Filippo Olivo
2025-03-10 15:38:45 +01:00
committed by Nicola Demo
parent e3790e049a
commit 4177bfbb50
157 changed files with 3473 additions and 3839 deletions

View File

@@ -1,6 +1,7 @@
"""Module for Averaging Neural Operator Layer class."""
from torch import nn, mean
import torch
from torch import nn
from ...utils import check_consistency
@@ -64,4 +65,4 @@ class AVNOBlock(nn.Module):
:return: The output tensor obtained from Average Neural Operator Block.
:rtype: torch.Tensor
"""
return self._func(self._nn(x) + mean(x, dim=1, keepdim=True))
return self._func(self._nn(x) + torch.mean(x, dim=1, keepdim=True))