Forward outputs from discriminator of GAN vary with the number of inputs.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joon Jang
am 30 Dez. 2019
Beantwortet: Sourav Bairagya
am 7 Jan. 2020
I'm using MATLAB R2019b, and deep learning toolbox.
I wanna see sigmoid value of outputs from discriminator, but it vary with the number of inputs in dlarray.
For example,
I assigned input data X (size 1024,1,1,3) to dlX which is dlarray(X, 'SSCB')
--- dlX=dlarray(X,'SSCB');
so prediction can be extracted by calling function dlYPred=forward(dlnetDiscriminator, dlX), and out=sigmoid(dlYPred)
--- dlYPred=forward(dlnetDiscriminator, dlX);
--- out=sigmoid(dlYPred);
I got output from this process. -> (0.1, 0.3, 0.5)
But if i assign input data X (size 1024,1,1,5) that includes previous three data, results is changed.
like (0.2 0.4 0.7 0.3 0.1) although first three output should not be changed.
I wanna get data like (0.1 0.3 0.5 0.2 0.02)
How can i solve it?
0 Kommentare
Akzeptierte Antwort
Sourav Bairagya
am 7 Jan. 2020
It seems that the discriminator layer weights get chnaged during second time calling of "forward" function. Make sure that the discriminator layer weights are kept fixed while running "foward" function for second time.
You can also use "predict" function to compute the responses out of the trained network.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!