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, bias=True, conv=<function cheb_conv>)[source]¶ Bases:
torch.nn.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
-
-
class
deepsphere.layers.chebyshev.
SphericalChebConv
(in_channels, out_channels, lap, kernel_size)[source]¶ Bases:
torch.nn.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
-
-
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