Hi, I am trying to implement a crf model like this tutorial 3. However, when I wrap the model with DDP, it raises the error “AttributeError: ‘DistributedDataParallel’ object has no attribute ‘neg_log_likelihood’.” One possible way is to extract the crf loss calculation out, but that seems not a good approach since: (1) The crf contains viterbi which will also be extracted out from my model; (2) I will have problems when converting my model to JIT.
Could someone help? Thank you in advance.