def training_step(self, batch, batch_idx):
    ((x0, x1), _, _) = batch
    (z0, p0) = self.forward(x0)
    (z1, p1) = self.forward(x1)
    z0 = self.memory_bank(z0, update=False)
    z1 = self.memory_bank(z1, update=True)
    loss = (0.5 * (self.criterion(z0, p1) + self.criterion(z1, p0)))
    return loss
def training_step(self, batch, batch_idx):
    ((x0, x1), _, _) = batch
    (z0, p0) = self.forward(x0)
    (z1, p1) = self.forward(x1)
    z0 = self.memory_bank(z0, update=False)
    z1 = self.memory_bank(z1, update=True)
    loss = (0.5 * (self.criterion(z0, p1) + self.criterion(z1, p0)))
    return loss