Deep learning for NeuroImaging in Python.
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.
- class surfify.nn.modules.IcoRePaConv(in_feats, out_feats, neighs)[source]¶
Define the convolutional layer on icosahedron discretized sphere using rectagular filter in tangent plane.
See also
Notes
Debuging messages can be displayed by changing the log level using
setup_logging(level='debug')
.Examples
>>> import torch >>> from surfify.nn import IcoRePaConv >>> from surfify.utils import icosahedron, neighbors_rec >>> ico2_vertices, ico2_triangles = icosahedron(order=2) >>> neighbors = neighbors_rec( ico2_vertices, ico2_triangles, size=5, zoom=5)[:2] >>> module = IcoRePaConv( in_feats=8, out_feats=8, neighs=neighbors) >>> ico2_x = torch.zeros((10, 8, len(ico2_vertices))) >>> ico2_x = module(ico2_x) >>> ico2_x.shape
Init IcoRePaConv.
- Parameters:
in_feats : int
input features/channels.
out_feats : int
output features/channels.
neighs : 2-uplet
neigh_indices: array (N, k, 3) - the neighbors indices. neigh_weights: array (N, k, 3) - the neighbors distances.
- forward(x)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Follow us