Is this a way to ignore some specific user warnings?


#1

UserWarning: somelayer.weight was not registered in the param store because requires_grad=False

I got this warning again and again during training my model. Is it possible to just ignore this type of warning?

In my case, it is an Embedding layer and I want to freeze the weights.

nn.Embedding.from_pretrained(self.z_one_hot_embedding, freeze=True)

#2

you can try one of these solutions


#3

Thank you very much for your kind reply! :blush: