how to fulfill GAN (Generative Adversarial Networks ) or DCGAN in matlab?
8 ビュー (過去 30 日間)
古いコメントを表示
Jack Xiao
2018 年 7 月 13 日
コメント済み: Walter Roberson
2020 年 4 月 13 日
I find that there is no example demo for GAN (Generative Adversarial Networks ) or DCGAN. I wonder how to fulfill GAN in matlab? if for GAN, is the last output of the generator RegressionOutputLayer or others?
1 件のコメント
採用された回答
Muhammad Usama Sharaf SAAFI
2020 年 1 月 7 日
編集済み: Muhammad Usama Sharaf SAAFI
2020 年 1 月 7 日
Only MATLAB 2019b has demo example of GAN.Example code also works on GPU but you should have CUDA 10.1 driver installed in your system However you can also look below link if you donot have Matlab 2019b.
0 件のコメント
その他の回答 (6 件)
Walter Roberson
2018 年 7 月 13 日
Generative Adversarial Neural Networks are not available in any Mathworks product. They are not supported by the Neural Network toolbox.
2 件のコメント
Niklas
2019 年 7 月 7 日
In our team we realize GANs with regression layers as output layer. Works fine in our cases.
You also have the possibility to define own layers: See this doc https://de.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layers.html for further Informations.
Best wishes, Niklas
2 件のコメント
Niklas
2019 年 7 月 8 日
Unfortunately I can not upload the code.
We use a RBM for our generator model. This we pretrain with own code but this part is very similar to the code snippets from Geoffrey Hinton. We also train a CNN for the descriminator part before we stick both models together. So after pretraining the CNN is very good in decisions whether an image is generated or a real one.
Afterwards we use some tricks. First we created a custom layer for the input where we are able to insert the seed for the generator and a real image. We pass the real image around the RBM. (Please note that you need a custom Sigmoid Activation Layer for RBMs). Afterwards we use custom layers in the CNN to identify both images simultaneously with the same weights as from the pretraining. You can just copy the Matlab Layers for that and modify them a bit. Finally we created an output layer for this custom CNN. There we track the differences between both classification probabilities. Note that you have to think about a correct Loss Function there. We train the whole model by inserting real images with different random seeds and a final result of 0 difference between both classifications.
Just a note on "easyness". We only do that because we need MATLAB Code at the end to export them on our embedded systems. If you just want to discover what GANs can do, you should for now stick to TensorFlow as its much easier. They have a good example on their website. But maybe Mathworks add native support for GANs in a future release?!
Jony Castagna
2019 年 9 月 27 日
編集済み: Jony Castagna
2019 年 9 月 27 日
Just looked at version 2019b: they support GANs now! If only the Matlab base + NN toolbox was free...
1 件のコメント
Walter Roberson
2020 年 4 月 13 日
If only food and rent and property taxes were all free so that Mathworks employees didn't need to be paid... ?
Yui Chun Leung
2020 年 4 月 4 日
I implemented different types of GANs with Matlab, including DCGAN, CycleGAN and more.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!