DGI icon indicating copy to clipboard operation
DGI copied to clipboard

Error in AvgReadout

Open MarcCote opened this issue 4 years ago • 0 comments

Hi, I think there's an error in AvgReadout with a mask. The mask summation should be performed along the first dimension only. https://github.com/PetarV-/DGI/blob/0afce4e36b5edbe1e735536d15b748d0381e4083/layers/readout.py#L15

It is return torch.sum(seq * msk, 1) / torch.sum(msk) but should be return torch.sum(seq * msk, 1) / torch.sum(msk, 1) # Note the dimension here.

MarcCote avatar Nov 07 '19 14:11 MarcCote