microsoft / ProphetNet

A research project for natural language generation, containing the official implementations by MSRA NLC team.
MIT License
654 stars 105 forks source link

Update fix for ngram_criterions.py and bert_dictionary.py #17

Open amiyamandal-dev opened 4 years ago

amiyamandal-dev commented 4 years ago

_File bertdictionary.py fix :- Since BertDictionary is inheriting Dictionary from fairseq.data just passing args to super will create problem cause there is * in Dictionary class so have to pass args with specific keys

_File ngramcriterions.py fix :- after facing error for _NotImplementedError: Unable to infer Criterion arguments, please implement NgramLmLoss.buildcriterion and checking this pr I have update code as per this pr https://github.com/pytorch/fairseq/commit/f26c8ff69fc1f4c5c4091964439d1bdec7431acd

ghost commented 4 years ago

CLA assistant check
All CLA requirements met.