(self)
| 94 | |
| 95 | class pairwiseloss_global(torch.nn.Module): |
| 96 | def __init__(self): |
| 97 | super(pairwiseloss_global, self).__init__() |
| 98 | |
| 99 | def forward(self, embed, target, chunk_size, global_center=None, beta=2.0, Expand=10): |
| 100 | # Expand=10 equals to the temperature=0.1 in a commonly used temperature based formula. |