Hi guys
I am working on a Image Regression task. The model is working fine and now I would like to test this on some real life sample cases. However, I am unable to use learn.predict and getting errors:
-
Here is my model:
learn = Learner(data, model, loss_func = F.l1_loss, model_dir = “/temp/model/”)
I used Learner approach because I customized cnn_learner model to add few linear layers in the end for my regression task.
Now I am using following method to predict on a single image:
img = open_image('../input/pic.jpg')
learn.predict(img.data)
But this is giving me following error:
’Tensor’ object has no attribute 'apply_tfms’
Can anyone please tell me how to resolve this issue?
Best Regards
Abhik