Traceback (most recent call last):


 "/home/nikola/code/pytorch-examples/examples/OpenNMT/translate.py", line 116, in <module>

main()


 "/home/nikola/code/pytorch-examples/examples/OpenNMT/translate.py", line 77, in main

predBatch, predScore, goldScore = translator.translate(srcBatch, tgtBatch)


 "/home/nikola/code/pytorch-examples/examples/OpenNMT/onmt/Translator.py", line 195, in translate

pred, predScore, attn, goldScore = self.translateBatch(batch)


 "/home/nikola/code/pytorch-examples/examples/OpenNMT/onmt/Translator.py", line 60, in translateBatch

encStates, context_t = self.model.encoder(srcBatch_t, hidden=encStates)


 "/home/nikola/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 235, in __getattr__

return object.__getattribute__(self, name)
AttributeError: 'DataParallel' object has no attribute 'encoder'

Traceback (most recent call last):


 "/podc/src/mmdet/tools/train.py", line 161, in <module>

main()


 "/podc/src/mmdet/tools/train.py", line 92, in main

cfg.optimizer['lr'] = cfg.optimizer['lr'] * len(cfg.gpu_ids) / 8


 "/usr/local/lib/python3.6/dist-packages/mmcv/utils/config.py", line 324, in __getattr__

return getattr(self._cfg_dict, name)


 "/usr/local/lib/python3.6/dist-packages/mmcv/utils/config.py", line 36, in __getattr__

raise ex
AttributeError: 'ConfigDict' object has no attribute 'optimizer'
