tristandeleu / ntm-one-shot

One-shot Learning with Memory-Augmented Neural Networks
MIT License
421 stars 94 forks source link

how to test an input with unknown class? #13

Open Greenleaf88 opened 7 years ago

Greenleaf88 commented 7 years ago

We train the network to make it classify a sample with unknown class, however, the network need label itself as part of input, In real applications, only those samples with unknown labels need to be classified, if the label is known, the classification becomes unnecenssary, then how to set the label part in the input if the label is unknown?

buaa-luzhi commented 6 years ago

@Greenleaf88 i have the same question

sheetalreddy commented 6 years ago

@Greenleaf88 : Hi, I had the same doubt but the only solution I found was to give the test sample at the end of each episode as the system aims at modelling the predictive distribution p(yt|xt, D1:t−1; θ)

tristandeleu commented 6 years ago

More than simply one-shot learning, the setup for this model is what is called meta learning. One good visualization of how meta learning works is Figure 1 of this paper.

If I understand your question correctly, for each meta training set (ie. for each episode here), you want to only make a prediction for the elements in the "test" part of the set (D_test in the figure). Unfortunately, as far as I know, you can't do that with this model. There is no definite separation between D_train and D_test in an episode. As @sheetalreddy suggested, you could have extra test samples (corresponding to D_test) at the end of your episodes (which now corresponds to the whole D_train) to work around this limitation.