Hi,
I am using a network having a siamese architecture that takes as input pairs of images and compute a loss value.
I have trained the network using contrastive loss. While testing, the loss is calculated in batch mode and the output loss for each batch
is an average per batch. For my purpose though I require the loss output for each instance of my test data. The way I am doing this is by modifying the
batch size to be 1 in the network definition so that the log file contains the loss values for each instance.
But I have around a million test instances and the this is very slow as opposed to using large batches.
Is there a way to compute the loss value in large batches yet retrieve the loss for each individual instance ?
What would be the fastest way to do this ?