I've added some testing and cleaned up the contrastive loss code. I think the tests show that the function is doing as we expect.
To actually use contrastive learning in anger this way, the datasets needed to be stratified by class per batch. I'll likely add some code in as an example
@afoix
I've added some testing and cleaned up the contrastive loss code. I think the tests show that the function is doing as we expect.
To actually use contrastive learning in anger this way, the datasets needed to be stratified by class per batch. I'll likely add some code in as an example