When deploying or just running my model on inference mode, I use learn.validate(trn_data.train_dl, metrics=[error_rate, m_pre, m_rec, m_f1]), where m_x are custom metrics using the fastai configurable metrics.
I get an error like: AttributeError: ‘Precision’ object has no attribute ‘n_classes’
The only way around this is to train the model using learn.fit before calling learn.validate. Is there a better workaround for this?