I am trying out Text Classification using Transfer Learning of NLP.
I have been able to train both the Language Model and Classifier and have exported the trained model using learn.export()
.
Now, I am trying to perform Metric Evaluation after importing this model i am getting following error -
learn = load_learner('/content/drive/My Drive/Projects/AnalyticsHackathon', 'learned_classifer_14112019.pkl')
learn.get_preds()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-9-d0be1d9a8327> in <module>()
----> 1 learn.get_preds()
11 frames
/usr/local/lib/python3.6/dist-packages/fastai/text/data.py in __iter__(self)
103 def __len__(self) -> int: return len(self.data_source)
104 def __iter__(self):
--> 105 return iter(sorted(range_of(self.data_source), key=self.key, reverse=True))
106
107 class SortishSampler(Sampler):
IndexError: list index out of range
I am not able to understand why am I getting this error. Can someone help me out with this?