deepsphere.models.spherical_unet package¶
Submodules¶
deepsphere.models.spherical_unet.decoder module¶
Decoder for Spherical UNet.
-
class
deepsphere.models.spherical_unet.decoder.
Decoder
(unpooling, laps)[source]¶ Bases:
torch.nn.modules.module.Module
The decoder of the Spherical UNet.
-
forward
(x_enc0, x_enc1, x_enc2, x_enc3, x_enc4)[source]¶ Forward Pass.
Parameters: x_enc* ( torch.Tensor
) – input tensors.Returns: output after forward pass. Return type: torch.Tensor
-
-
class
deepsphere.models.spherical_unet.decoder.
SphericalChebBNPoolCheb
(in_channels, middle_channels, out_channels, lap, pooling, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block calling a SphericalChebBNPool block then a SphericalCheb.
-
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
-
-
class
deepsphere.models.spherical_unet.decoder.
SphericalChebBNPoolConcat
(in_channels, out_channels, lap, pooling, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block calling a SphericalChebBNPool Block then concatenating the output with another tensor and calling a SphericalChebBN block.
-
forward
(x, concat_data)[source]¶ Forward Pass.
Parameters: - x (
torch.Tensor
) – input [batch x vertices x channels/features] - concat_data (
torch.Tensor
) – encoder layer output [batch x vertices x channels/features]
Returns: output [batch x vertices x channels/features]
Return type: - x (
-
deepsphere.models.spherical_unet.encoder module¶
Encoder for Spherical UNet.
-
class
deepsphere.models.spherical_unet.encoder.
Encoder
(pooling, laps)[source]¶ Bases:
torch.nn.modules.module.Module
Encoder for the Spherical UNet.
-
forward
(x)[source]¶ Forward Pass.
Parameters: x ( torch.Tensor
) – input [batch x vertices x channels/features]Returns: obj: torch.Tensor: output [batch x vertices x channels/features] Return type: x_enc*
-
-
class
deepsphere.models.spherical_unet.encoder.
SphericalChebBN2
(in_channels, middle_channels, out_channels, lap, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block made of 2 Building Blocks (convolution, batchnorm, activation).
-
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
-
-
class
deepsphere.models.spherical_unet.encoder.
SphericalChebPool
(in_channels, out_channels, lap, pooling, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block with a pooling/unpooling and 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.models.spherical_unet.unet_model module¶
Spherical Graph Convolutional Neural Network with UNet autoencoder architecture.
-
class
deepsphere.models.spherical_unet.unet_model.
SphericalUNet
(pooling_class, N, depth, laplacian_type, ratio=1)[source]¶ Bases:
torch.nn.modules.module.Module
Spherical GCNN Autoencoder.
-
forward
(x)[source]¶ Forward Pass.
Parameters: x ( torch.Tensor
) – input to be forwarded.Returns: output Return type: torch.Tensor
-
deepsphere.models.spherical_unet.utils module¶
Layers used in both Encoder and Decoder.
-
class
deepsphere.models.spherical_unet.utils.
SphericalChebBN
(in_channels, out_channels, lap, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block with a Chebyshev Convolution, Batchnormalization, and ReLu activation.
-
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
-
-
class
deepsphere.models.spherical_unet.utils.
SphericalChebBNPool
(in_channels, out_channels, lap, pooling, kernel_size=3)[source]¶ Bases:
torch.nn.modules.module.Module
Building Block with a pooling/unpooling, a calling the SphericalChebBN block.
-
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
-