nnclr_loss
NNCLRLoss
Bases: NTXentLoss
A class representing the NNCLRLoss.
This class extends the NTXentLoss class and implements a symmetric loss function for NNCLR.
Attributes:
Name | Type | Description |
---|---|---|
temperature |
float
|
The temperature for the loss function. Default is 0.1. |
gather_distributed |
bool
|
A flag indicating whether the distributed gathering is used. Default is False. |
Source code in fmcib/ssl/losses/nnclr_loss.py
__init__(temperature=0.1, gather_distributed=False)
Initialize a new instance of the class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temperature
|
float
|
The temperature to use for initialization. Default value is 0.1. |
0.1
|
gather_distributed
|
bool
|
Whether to use gather distributed mode. Default value is False. |
False
|