Train an encoder to encode raw data into a feature space.
Data points belonging to the same/different classes should be closer/further to each other in the feature space.
When a new class shows up, even with only one labeled data point for the new class, we can start predicting whether data points belong to the new class based on distances in the feature space.
https://towardsdatascience.com/deep-metric-learning-76fa0a5a415f
Similar to k-nearest neighbor: