deepsphere.layers package¶
Subpackages¶
Submodules¶
deepsphere.layers.chebyshev module¶
Chebyshev convolution layer. For the moment taking as-is from Michaël Defferrard’s implementation. For v0.15 we will rewrite parts of this layer.
-
class
deepsphere.layers.chebyshev.
ChebConv
(in_channels, out_channels, kernel_size=1, bias=True, conv=<function cheb_conv>)[source]¶ Bases:
torch.nn.modules.module.Module
Graph convolutional layer.
-
forward
(laplacian, inputs)[source]¶ Forward graph convolution.
Parameters: - laplacian (
torch.sparse.Tensor
) – The laplacian corresponding to the current sampling of the sphere. - inputs (
torch.Tensor
) – The current input data being forwarded.
Returns: The convoluted inputs.
Return type: - laplacian (
-
-
class
deepsphere.layers.chebyshev.
SphericalChebConv
(in_channels, out_channels, lap, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block with a Chebyshev Convolution.
-
forward
(x)[source]¶ Forward pass.
Parameters: x ( torch.tensor
) – input [batch x vertices x channels/features]Returns: output [batch x vertices x channels/features] Return type: torch.tensor
-
-
deepsphere.layers.chebyshev.
cheb_conv
(laplacian, inputs, weight)[source]¶ Chebyshev convolution.
Parameters: - laplacian (
torch.sparse.Tensor
) – The laplacian corresponding to the current sampling of the sphere. - inputs (
torch.Tensor
) – The current input data being forwarded. - weight (
torch.Tensor
) – The weights of the current layer.
Returns: Inputs after applying Chebyshev convolution.
Return type: - laplacian (