Menu

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.IcoUpSample(in_feats, out_feats, up_neigh_indices)[source]

The upsampling layer on icosahedron discretized sphere using interpolation.

Notes

Debuging messages can be displayed by changing the log level using setup_logging(level='debug').

Examples

>>> import torch
>>> from surfify.nn import IcoUpSample
>>> 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 = IcoUpSample(
        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 IcoUpSample.

Parameters:

in_feats : int

input features/channels.

out_feats : int

output features/channels.

up_neigh_indices : array

upsampling neighborhood indices.

forward(x)[source]

Forward method.

Follow us

© 2025, nidl developers