Fix rendering and codacy
This commit is contained in:
@@ -15,7 +15,7 @@ class FourierIntegralKernel(torch.nn.Module):
|
||||
"""
|
||||
Fourier Integral Kernel model class.
|
||||
|
||||
This class implements the Fourier Integral Kernel network, which
|
||||
This class implements the Fourier Integral Kernel network, which
|
||||
performs global convolution in the Fourier space.
|
||||
|
||||
.. seealso::
|
||||
@@ -109,9 +109,7 @@ class FourierIntegralKernel(torch.nn.Module):
|
||||
if all(isinstance(i, list) for i in n_modes) and len(layers) != len(
|
||||
n_modes
|
||||
):
|
||||
raise RuntimeError(
|
||||
"Inconsistent number of layers and modes."
|
||||
)
|
||||
raise RuntimeError("Inconsistent number of layers and modes.")
|
||||
if all(isinstance(i, int) for i in n_modes):
|
||||
n_modes = [n_modes] * len(layers)
|
||||
else:
|
||||
@@ -322,22 +320,22 @@ class FNO(KernelNeuralOperator):
|
||||
|
||||
def forward(self, x):
|
||||
"""
|
||||
Forward pass for the :class:`FourierNeuralOperator` model.
|
||||
Forward pass for the :class:`FourierNeuralOperator` model.
|
||||
|
||||
The ``lifting_net`` maps the input to the hidden dimension.
|
||||
Then, several layers of Fourier blocks are applied. Finally, the
|
||||
``projection_net`` maps the hidden representation to the output
|
||||
function.
|
||||
The ``lifting_net`` maps the input to the hidden dimension.
|
||||
Then, several layers of Fourier blocks are applied. Finally, the
|
||||
``projection_net`` maps the hidden representation to the output
|
||||
function.
|
||||
|
||||
: param x: The input tensor for performing the computation. Depending
|
||||
on the ``dimensions`` in the initialization, it expects a tensor
|
||||
with the following shapes:
|
||||
* 1D tensors: ``[batch, X, channels]``
|
||||
* 2D tensors: ``[batch, X, Y, channels]``
|
||||
* 3D tensors: ``[batch, X, Y, Z, channels]``
|
||||
:type x: torch.Tensor | LabelTensor
|
||||
:return: The output tensor.
|
||||
:rtype: torch.Tensor
|
||||
: param x: The input tensor for performing the computation. Depending
|
||||
on the ``dimensions`` in the initialization, it expects a tensor
|
||||
with the following shapes:
|
||||
* 1D tensors: ``[batch, X, channels]``
|
||||
* 2D tensors: ``[batch, X, Y, channels]``
|
||||
* 3D tensors: ``[batch, X, Y, Z, channels]``
|
||||
:type x: torch.Tensor | LabelTensor
|
||||
:return: The output tensor.
|
||||
:rtype: torch.Tensor
|
||||
"""
|
||||
|
||||
if isinstance(x, LabelTensor):
|
||||
|
||||
Reference in New Issue
Block a user