Hi guys, I’ve searched in the forums and online, with no solution.
I’m training a text classifier, it seems to randomly error with this message. I cannot figure out what is going wrong. The dataset is over 2,500 records.
Here’s the error:
TypeError Traceback (most recent call last)
<ipython-input-28-70ad27f71db1> in <module>()
1 learn = text_classifier_learner(dls, AWD_LSTM, drop_mult=0.5, metrics=accuracy)
2
----> 3 learn.fine_tune(12, 1e-2)
19 frames
/usr/local/lib/python3.7/dist-packages/fastai/learner.py in accumulate(self, learn)
415 def accumulate(self, learn):
416 bs = find_bs(learn.yb)
--> 417 self.total += learn.to_detach(self.func(learn.pred, *learn.yb))*bs
418 self.count += bs
419 @property
TypeError: 'int' object is not callable
Here’s the code:
dls = TextDataLoaders.from_df(df_train, text_col='CONTENT', label_col='CLASS', valid_pct=0.15)
learn = text_classifier_learner(dls, AWD_LSTM, drop_mult=0.5, metrics=accuracy)
learn.fine_tune(12, 1e-2)
Any help would be much appreciate, blocked