Use GAN discrimator for single-class classification

4 次查看(过去 30 天)
Hello,
i try to implement a neural network for classifying different defects for quality inspection. I want to use a single-class classification.
To accomplish this, i want to train a generative adversarial networks and use the discriminator for classification.
So i used the sunflower-example for implementing my first GAN.
In this example, there is a line which "classifies" the generated outputs with the help of the discriminator network:
dlYPredGenerated = forward(dlnetDiscriminator, dlXGenerated);
I expected the output to consist of 2 labels: "Original" or "Fake". Instead, i get a long list of numbers:
(:,:,1,1) =
5.9427
(:,:,1,2) =
7.5930
(:,:,1,3) =
9.3393
etc.
How can i use the resulting discriminator after training a GAN with a set of images? I just want to have a 2 - label classification, consisting of "original" and "fake".

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Deep Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by