I have a problem with data types. My model is densenet169 for image classification in Histopathologic Cancer Detection Kaggle competition. I can’t use default accuracy metrics due to an error.
When I modify accuracy function problem with data type is gone but then my accuracy is always 0.5
What’s wrong? Just let me know if I should provide more info.
Are you sure your data has been properly interpreted by the fastai library? From this error it looks like it believes you are in a multi-class problem. Could you give us the code on how you create your
I didn’t even connect this error with categories!
Now when I look closer at data info I realize that it shouldn’t be multi category! My fault.
It’s working now! Thank you @sgugger for your help. After your suggestion that there’s something wrong with data, I checked it and found small error:
label_from_df(sep=','). Now I realize it’s from df not csv. I overlooked it.
I still don’t understand why this separator made my data multi-class. And how did you found this clue in my error?
Be careful with
sep, it’s meant to be used for multi-class problem only, so you shouldn’t pass it.