(self,d0,d1,eps=0.1)
| 126 | self.model = nn.Sequential(*layers) |
| 127 | |
| 128 | def forward(self,d0,d1,eps=0.1): |
| 129 | return self.model.forward(torch.cat((d0,d1,d0-d1,d0/(d1+eps),d1/(d0+eps)),dim=1)) |
| 130 | |
| 131 | class BCERankingLoss(nn.Module): |
| 132 | def __init__(self, chn_mid=32): |