def forward(self, x0: torch.Tensor, x1: torch.Tensor = None):
        """Embeds and projects the input images."""

        # forward pass of first input x0
        f0 = self.backbone(x0).flatten(start_dim=1)
        out0 = self.projection_head(f0)

        # return out0 if x1 is None
        if x1 is None:
            return out0

        # forward pass of second input x1
        f1 = self.backbone(x1).flatten(start_dim=1)
        out1 = self.projection_head(f1)

        # return both outputs
        return out0, out1
Embeds and projects the input images.
lightly/cli/_cli_simclr.py