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 nidl.estimators.ssl.utils.projection_heads.YAwareProjectionHead(input_dim: int = 2048, hidden_dim: int = 512, output_dim: int = 128)[source]

Bases: ProjectionHead

Projection head used for yAware contrastive learning.

This module implements the projection head z_{\theta_2} as described in yAware [R20], which is a simple multilayer perceptron (MLP) similar to that used in SimCLR [R21]. It maps feature representations into a space where contrastive loss can be applied.

Typically, this MLP consists of one hidden layer followed by a non-linearity (ReLU) and a final linear projection.

References

[R20] (1,2)

Dufumier, B., et al., “Contrastive learning with continuous proxy meta-data for 3D MRI classification.” MICCAI, 2021. https://arxiv.org/abs/2106.08808

[R21] (1,2)

Chen, T., et al. “A Simple Framework for Contrastive Learning of Visual Representations.” ICML, 2020. https://arxiv.org/abs/2002.05709

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Follow us

© 2025, nidl developers