I haven’t tackled this problem myself, but here are some resources that I’ve found in the forums:
- A notebook example which uses
MultiCategoryBlock
andBCEWithLogitsLossFlat
to create a model which does not return a label for data of a class that’s not in the training set. - This and this forum topic where folks are discussing this issue.