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

The transposed convolution layer on icosahedron discretized sphere using n-ring filter (slow).

Notes

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

Examples

>>> import torch
>>> from surfify.nn import IcoGenericUpConv
>>> from surfify.utils import downsample, icosahedron, neighbors
>>> ico2_vertices, ico2_triangles = icosahedron(order=2)
>>> ico3_vertices, ico3_triangles = icosahedron(order=3)
>>> neighbor_indices = neighbors(
        ico3_vertices, ico3_triangles, depth=1, direct_neighbor=True)
>>> neighbor_indices = np.asarray(list(neighbor_indices.values()))
>>> down_indices = downsample(ico3_vertices, ico2_vertices)
>>> module = IcoGenericUpConv(
        in_feats=8, out_feats=4, up_neigh_indices=neighbor_indices,
        down_indices=down_indices)
>>> ico2_x = torch.zeros((10, 8, len(ico2_vertices)))
>>> ico3_x = module(ico2_x)
>>> ico2_x.shape, ico3_x.shape

Init IcoGenericUpConv.

Parameters:

in_feats : int

input features/channels.

out_feats : int

output features/channels.

up_neigh_indices : array

upsampling neighborhood indices at sampling i + 1.

down_indices : array

downsampling indices at sampling i

forward(x)[source]

Forward method.

Follow us

© 2025, nidl developers