Transformers-Tutorials icon indicating copy to clipboard operation
Transformers-Tutorials copied to clipboard

'transformers.models.vision_encoder_decoder.configuration_vision_encoder_decoder.VisionEncoderDecoderConfig'>

Open arain60gb opened this issue 2 years ago • 1 comments

kindly guide me how reslove this issue

loaded_model = VisionEncoderDecoderModel.from_pretrained('/content/drive/MyDrive/ocr_pth/checkpoint-5000') processor = TrOCRProcessor.from_pretrained("/content/drive/MyDrive/ocr_pth/checkpoint-5000")

KeyError Traceback (most recent call last) in 1 # loaded_preprocessor = TrOCRProcessor.from_pretrained('/content/drive/MyDrive/ocr_pth/checkpoint-5000') 2 loaded_model = VisionEncoderDecoderModel.from_pretrained('/content/drive/MyDrive/ocr_pth/checkpoint-5000') ----> 3 processor = TrOCRProcessor.from_pretrained("/content/drive/MyDrive/ocr_pth/checkpoint-5000")

3 frames /usr/local/lib/python3.7/dist-packages/transformers/models/auto/auto_factory.py in getitem(self, key) 570 model_name = self._model_mapping[mtype] 571 return self._load_attr_from_module(mtype, model_name) --> 572 raise KeyError(key) 573 574 def _load_attr_from_module(self, model_type, attr):

KeyError: <class 'transformers.models.vision_encoder_decoder.configuration_vision_encoder_decoder.VisionEncoderDecoderConfig'>

arain60gb avatar Sep 12 '22 07:09 arain60gb

Hi @zainali60 did you solve the problem? i am dealing with the same.

NithinJangid avatar Jun 27 '23 05:06 NithinJangid