Skip to main content
. 2020 Oct 14;14:83. doi: 10.3389/fncom.2020.00083

Algorithm 1.

Unsupervised Few-shot Feature Learning via Self-supervised Training (UFLST)

Input: Unlabeled data set X={xi}, the few-shot feature embedding fθ0, the training iteration T.
Output: Trained few-shot embedding fθT
    1: t = 0
    2: repeat
    3:     Clustering:
    4:     Extracting features {zi} of {xi} using the feature extractor fθt.
    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 {(xi~,yi~)}.
    8:     Episodic Training:
    9:     Constructing a set of episodic tasks {Ts}; for each task, randomly sampling M classes with K+Q examples per class from {(xi~,yi~)}.
  10:       Updating model parameters θt by training the few-shot learner on the series of episodic tasks {Ts}.
  11:       t = t + 1
  12: until t = T