In this section, we discuss the implementation of the proposed algorithm. We use Pytorch version 1.7.1 for the implementation. The ID block of the algorithm uses the code from the implementation of ID [1]} available at
https://github.com/zhirongw/lemniscate.pytorch. The repository uses Pytorch version 0.3, and appropriate changes were made to use it with the latest version of Pytorch. We used ResNet-18 and ResNet-50 blocks during our experiments.
In the ID block, the ResNet architecture is modified as follows. The final fully connected layer consists of 128 dimensions instead of the usual 1000 dimensions. The output of the final fully connected layer proceeds to compute the NCE loss, and the feature representations (layer before the fully connected layer) are fed to the clustering part.
