Hi,
I am loading the exported learner and trying to predict
learn = load_learner(path, fname='trained_model.pkl')
but I am getting the below error when using
Learn.predict("Some text")
C:\Users\mannegow\AppData\Local\Continuum\anaconda3\envs\ForFastai2\lib\site-packages\fastai\torch_core.py:73: UserWarning: Tensor is int32: upgrading to int64; for better performance use int64 input
warn('Tensor is int32: upgrading to int64; for better performance use int64 input')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-8-1c491a584317> in <module>
----> 1 learn.predict('RELAY INTERMENT START. UNIT FAILED')
~\AppData\Local\Continuum\anaconda3\envs\ForFastai2\lib\site-packages\fastai\basic_train.py in predict(self, item, **kwargs)
312 ds = self.data.single_ds
313 pred = ds.y.analyze_pred(pred, **kwargs)
--> 314 out = ds.y.reconstruct(pred, ds.x.reconstruct(x[0])) if has_arg(ds.y.reconstruct, 'x') else ds.y.reconstruct(pred)
315 return out, pred, res[0]
316
~\AppData\Local\Continuum\anaconda3\envs\ForFastai2\lib\site-packages\fastai\data_block.py in reconstruct(self, t)
333
334 def reconstruct(self, t):
--> 335 return Category(t, self.classes[t])
336
337 class MultiCategoryProcessor(CategoryProcessor):
TypeError: 'NoneType' object is not subscriptable
Please advise