0

I am working on image dataset, where i have one hot encoded labels. Shape of label vector is (3500,8). When i try categorical cross entropy and softmax function in output layer my accuracy is very low. But when i use binary cross entropy and sigmoid my accuracy improves.
Previosuly I believe for multi class classification, we should use softmax and categorical cross entropy.
But in a kaggle competetion, i see use of sigmoid and binary cross entropy.

I want to know is it a right approach?

Can any one give me an insight to this concept.

Community
  • 1
  • 1
Talha Anwar
  • 2,699
  • 4
  • 23
  • 62
  • No, its not the right approach, the accuracies are different because what is being measured is different. Sigmod + binary cross-entropy is used for multi-label settings, while you only have multi-class but not multi-label. – Dr. Snoopy Dec 13 '19 at 15:33

1 Answers1

0

This question probably duplicated this. Basically, by using binary cross entropy and 'accuracy' argument. You implicitly tell keras to use binary accuracy instead of categorical accuracy. Hence, the the problem changed to multilabel problem and not multiclass problem.

RootOnChair
  • 137
  • 10