Closed Kunlun-Zhu closed 2 years ago
I Currently fixed this by
self.rel_embed.weight.div_(torch.norm(self.rel_embed.weight, p=self.p_norm, dim=-1)[:, None])
This is probably incorrect. self.rel_embed.weight
is not changed inplace by using div_.
Due to the BMTrain implementation, self.rel_embed.weight
does not return the parameter itself, but an "intermediate result".
Thanks a lot for the responding, 'self.rel_embed' is generated from the class 'Embedding' in the 'example/layer/embedding.py' file, it seems a direct reference from the class? Or may I ask how should we successfully change the value of the 'embedding.weight', thanks a lot!
This is probably incorrect.
self.rel_embed.weight
is not changed inplace by using div_. Due to the BMTrain implementation,self.rel_embed.weight
does not return the parameter itself, but an "intermediate result".
There is currently no proper way to update the parameters during training. You can normalize " self.rel_embed" before each use.
Hi developer, when I tried to use 'gather()' method from the 'Distributedparameter', I received the following error:
I coundn't find any information about this set of arguments required, any idea why this may occur or how may I solve this issue? Thanks a lot.