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.IcoFixIndexUpSample(in_feats, out_feats, up_neigh_indices)[source]¶
The upsampling layer on icosahedron discretized sphere using fixed zero indices (padding new vertices with 0).
Notes
Debuging messages can be displayed by changing the log level using
setup_logging(level='debug')
.Examples
>>> import torch >>> from surfify.nn import IcoFixIndexUpSample >>> from surfify.utils import interpolate, icosahedron >>> ico2_vertices, ico2_triangles = icosahedron(order=2) >>> ico3_vertices, ico3_triangles = icosahedron(order=3) >>> up_indices = interpolate( ico2_vertices, ico3_vertices, ico3_triangles) >>> up_indices = np.asarray(list(up_indices.values())) >>> module = IcoFixIndexUpSample( in_feats=8, out_feats=4, up_neigh_indices=up_indices) >>> ico2_x = torch.zeros((10, 8, len(ico2_vertices))) >>> ico3_x = module(ico2_x) >>> ico2_x.shape, ico3_x.shape
Init IcoFixIndexUpSample.
- Parameters:
in_feats : int
input features/channels.
out_feats : int
output features/channels.
up_neigh_indices : array
upsampling neighborhood indices.
Follow us