kimiyoung / transformer-xl

Apache License 2.0
3.61k stars 763 forks source link

hotfix for ParameterList in AdaptiveEmb, ProjAdaptiveSoftmax with DataParallel #144

Closed yurakuratov closed 2 years ago

yurakuratov commented 2 years ago

sorry, missed with target branch to merge.

but still, commit ed431111ea51a274eab235de732eb57c5d38eb20 might be useful for someone trying to run run_wt103_large.sh with pytorch 1.7.1.

DataParallel does not support ParameterList broadcasting, this commit explicitly adds all parameters to the pytorch module.

these two commits fix initialization of emb_projs, out_projs: https://github.com/booydar/transformer-xl/commit/52703082bcbabf4143fc4b91aeb327f50e072a4a & https://github.com/booydar/transformer-xl/commit/58cf5ef9a3249daddb65370b17a776541e5a1d21