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.models.unet.GraphicalUNet(in_channels, out_channels, depth=5, hidden_channels=32, pool_ratios=0.5, sum_res=False, act=<function relu>)[source]

The Graph U-Net model: implements a U-Net like architecture with graph pooling and unpooling operations.

Notes

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

References

Hongyang Gao, and Shuiwang Ji, Graph U-Nets, arXiv, 2019.

Init GraphicalUNet.

Parameters:

in_channels : int

input features/channels.

out_channels : int

output features/channels.

depth : int, default 5

number of layers in the UNet.

hidden_channels : int, default 32

number of convolutional filters for the convs.

pool_ratios : float or list of float, default 0.5

graph pooling ratio for each depth.

sum_res : bool,default True

if set to False, will use concatenation for integration of skip connections instead summation.

act : torch.nn.functional, default relu

the nonlinearity to use.

forward(x, edge_index, batch=None)[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

© 2025, nidl developers