PetPen-project / PetPen

4 stars 3 forks source link

categorical crossentropy usage #29

Open MercSaturn opened 6 years ago

MercSaturn commented 6 years ago

For mnist, the original output label is a number between 0 to 9, to use "categorical crossentropy" properly, the output labels need to be converted into one-hot vectors. Therefore, additional processing is needed on the dataset for mnist. Older version automatically loads dataset as one-hot vector if the model uses categorical crossentropy as loss, should we add it back?

CorcovadoMing commented 6 years ago

The PetPen assumes the data is preprocessed ready to feed the network. Even if the one-hot encoding is needed to include in PetPen, it should be explicit applied by user, not automatically. It is worth to discuss further with the team.

MercSaturn commented 6 years ago

this issue can be solved by adding sparse categorical crossentropy