Open dhirendrapal opened 2 years ago
same
The installed version of fairseq
using the requirements it's old and doesn't have the TransformerDecoderLayerBase
installed. To fix this issue you have to uninstall the current version and then follow the installing instruction on the official GitHub repository of fairseq
.
What you have to do:
pip uninstall fairseq
git clone https://github.com/pytorch/fairseq
cd fairseq
pip install --editable ./
Describe I have taken checkout of commit 65f15af and used model (trocr-large-stage1.pt) for text recognition. Getting the below error: ImportError: cannot import name 'TransformerDecoderLayerBase' from 'fairseq.modules.transformer_layer' (unilm/.venv/lib/python3.8/site-packages/fairseq/modules/transformer_layer.py)