I am using below code to create the data
def get_data(sz):
tfms = tfms_from_model(f_model, sz, aug_tfms=transforms_top_down, max_zoom=1.05)
return ImageClassifierData.from_csv(PATH, ‘train-jpg’, label_csv, tfms=tfms,
suffix=’.jpg’, val_idxs=val_idxs, test_name=‘test-jpg’)
and I am using below code to find prediction probabilities for test:
multi_preds, y = learn.TTA(is_test = True)
preds = np.mean(multi_preds, 0)
I am using opt_th function from planet.py to obtain threshold and convert float value to integers:
pred1 = (preds > thr).astype(int)
Here my results are deteriorating.(F1 score of .54)
When I am using same process on valid data I am getting good f1 score.(.9+)