mammoth icon indicating copy to clipboard operation
mammoth copied to clipboard

iCARL method not working.

Open prateeky2806 opened this issue 1 year ago • 0 comments

Hi, I was using the library and it seems like the iCARL method is not working. I figured out the reason and it seems like while selecting the samples to store for the buffer, the normalization transformation is to be applied onto the whole batch of images. The transform.Normalize only work for a single image. An easy fix is to do replace this https://github.com/aimagelab/mammoth/blob/0b6f1434b06ed9e53a10c120d1efef8015184b1c/models/icarl.py#L70 with feats = self.net(torch.cat([norm_trans(aa).unsqueeze(0) for aa in not_norm_x]), returnt='features')

This might not be the most efficient way but it works. I hope this helps!

prateeky2806 avatar Sep 13 '22 18:09 prateeky2806