PyTorch toolbox to work with spherical surfaces.
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.IcoDiNeConv(in_feats, out_feats, neigh_indices)[source]¶ The convolutional layer on icosahedron discretized sphere using n-ring filter (based on the Direct Neighbor (DiNe) formulation).
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 IcoDiNeConv >>> from surfify.utils import icosahedron, neighbors >>> ico2_vertices, ico2_triangles = icosahedron(order=2) >>> neighbor_indices = neighbors( ico2_vertices, ico2_triangles, depth=1, direct_neighbor=True) >>> neighbor_indices = np.asarray(list(neighbor_indices.values())) >>> module = IcoUpConv( in_feats=8, out_feats=8, neigh_indices=neighbor_indices) >>> ico2_x = torch.zeros((10, 8, len(ico2_vertices))) >>> ico2_x = module(ico2_x) >>> ico2_x.shape
-
__init__(in_feats, out_feats, neigh_indices)[source]¶ Init IcoDiNeConv.
- Parameters
in_feats : int
input features/channels.
out_feats : int
output features/channels.
neigh_indices : array (N, k)
conv layer’s filters’ neighborhood indices, where N is the ico number of vertices and k the considered nodes neighbors.
-
Follow us