Algorithm 1.
Input: Unlabeled data set , the few-shot feature embedding , the training iteration T. |
Output: Trained few-shot embedding |
1: t = 0 |
2: repeat |
3: Clustering: |
4: Extracting features {zi} of {xi} using the feature extractor . |
5: Calculating KRJD Jij based on the K-reciprocal nearest neighbors of any data pairs zi and zj. |
6: Clustering data using DBSCAN and generating pseudo labels {yi}. |
7: Removing outliers and obtaining the pseudo labeled data set . |
8: Episodic Training: |
9: Constructing a set of episodic tasks ; for each task, randomly sampling M classes with K+Q examples per class from . |
10: Updating model parameters θt by training the few-shot learner on the series of episodic tasks . |
11: t = t + 1 |
12: until t = T |