How to change last layer from sigmoid to binomial

In image classification, I would like my model to predict if there are either multiple category in single image or if it’s an image it has not seen at all.

I had this idea from lesson 10 (Part 2) but wondering how to change lesson 2 notebook to make it happen.

What is the process to change just the last layer to binomial and will it give low probability for all categories if it seems something it is not trained on?

Any help / tips appreciated.

1 Like

Maybe try binary cross entropy loss as mentioned here in Lesson 9: Deep Learning Part 2 2018.

1 Like

Lesson 3 (Part 1 2019) covers Multi-label Classification using the version 1.0.x of fastai.


Hi @yogendrajoshi did you figure out how to do this? Am exactly in the same situation.