1
$\begingroup$

I need to classify pictures into 2 categories: approved and rejected. Rejected category has different type of images which are not allowed (subcategories), for example nude or gore or anime etc.

What approach in training the CNN will be better or they are equal for the CNN:

  1. To have output final layer with 2 categories (neurons) - approved and rejected

  2. To have a lot of neurons in the final layer, one for each "subcategory" (and feed NN with corresponding labels), and later when doing actual inference just manually aggregate them to rejected category?

I'm not sure if using the first approach CNN can easily apply OR operation for such a different subcategories, thus that training will be effective. Just feel that multi-categories approach is easier for NN. Is there any approved science behind it?

$\endgroup$
0
$\begingroup$

Okay, so I used the custom loss function to optimize both ways simultaneously: - binary rejected vs approved - multiple categories And using the coefficient argument to balance between two losses. Thats it

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.