Stability-AI / api-interfaces

Interface definitions for API interactions between components
140 stars 78 forks source link

adds an optional classifier_mode argument #9

Closed dmarx closed 2 years ago

dmarx commented 2 years ago
dmarx commented 2 years ago

So, my understanding of this is that each ClassifierCategory has its own mode? So we can have different categories with different modes?

my reading of the code was that each "category" is functionally what I would want to call a classifier. So yes, each 'category' can have its own mode, but i would say that logical classification categories don't need to be restricted that way. the "category" is really just a name for the classifier, so we could use the current nsfw classifier as is, and then add a "nsfw2" 'category' or however many additional nsfw classifiers we want to run in parallel.

I had to attach this operating mode to the "category" abstraction because that's where the concepts live, and the softmax thing is just a normalization over the different classification options (the concepts).

each classifier should have an identifier attribute that is distinct from some sort of categorization, so we could then e.g. group multiple distinct classifiers under a single "nsfw" classifier category.