similarity icon indicating copy to clipboard operation
similarity copied to clipboard

VicReg implementation gives "nan" loss

Open ManafMukred opened this issue 1 year ago • 3 comments

I was trying to explore other algorithms like vicreg using LAMB & LARS optimizer, but in both cases the loss is "nan"

`Epoch 1/200 175/175 - 49s - loss: nan - proj_std: nan - val_loss: nan - val_proj_std: nan - binary_accuracy: 0.1000 - 49s/epoch - 281ms/step

Epoch 2/200 175/175 - 36s - loss: nan - proj_std: nan - val_loss: nan - val_proj_std: nan - binary_accuracy: 0.1000 - 36s/epoch - 203ms/step

Epoch 3/200 175/175 - 36s - loss: nan - proj_std: nan - val_loss: nan - val_proj_std: nan - binary_accuracy: 0.1000 - 36s/epoch - 204ms/step `

any suggestions?

ManafMukred avatar Jun 21 '23 07:06 ManafMukred

Hi @ManafMukred, can you share some more details about the model architecture, hyperparameters, and dataset?

owenvallis avatar Jun 24 '23 18:06 owenvallis

@owenvallis I used the same notebook here , and I tried to use the LARS optimizer also with lr = 0.2 * int(BATCH_SIZE / 256) same as the paper says. but I get the same error

ManafMukred avatar Jun 24 '23 19:06 ManafMukred

Thanks for the details, I'll take a look and see if I can repro the issue on my side.

owenvallis avatar Jun 24 '23 20:06 owenvallis