graphnet-team / graphnet

A Deep learning library for neutrino telescopes
https://graphnet-team.github.io/graphnet/
Apache License 2.0
85 stars 85 forks source link

FourierEncoder unused parameters. #722

Open Aske-Rosted opened 1 month ago

Aske-Rosted commented 1 month ago

Bug The bug happens if less than 6 features is used in the FourierEncoder class. The script will terminate with the following error

RuntimeError: It looks like your LightningModule has parameters that were not used in producing the loss returned by training_step. If this is intentional, you must enable the detection of unused parameters in DDP, either by setting the string value strategy='ddp_find_unused_parameters_true' or by setting the flag in the strategy with strategy=DDPStrategy(find_unused_parameters=True)

This happens because self.aux_emb is initialized whether or not it is used.