Did you have a look at https://github.com/layumi/2016_GAN_Matlab
Matlab does not currently support Generative Adversarial Neural Networks
8 views (last 30 days)
Show older comments
I searched a lot to see if Matlab supports GAN but unfortunately it does not. I just found deconvolution layer. does anybody know how I can use that for designing a GAN. I am gonna integrate a GAN block within a DAG network and I am not sure if it is possible. I found also another open source lib 'MatConvNet'. is is possible to use it within DAG? Thank you very much I hope it is not wasting time working on deep learning with Matlab.
web address of DAG : https://blogs.mathworks.com/deep-learning/2018/03/19/creating-a-dag-network-from-dag-parts/
9 Comments
Kenta
on 15 May 2020
As of now, some kinds of GAN such as conditional GAN are available.
For example, https://jp.mathworks.com/matlabcentral/fileexchange/75441-conditional-gan-and-cnn-classification-with-fashion-mnist

Accepted Answer
Yui Chun Leung
on 4 Apr 2020
I implemented different types of GANs with Matlab, including DCGAN, cGAN, CycleGAN and more.
2 Comments
Yui Chun Leung
on 4 Apr 2020
Atallah,
Here is the code used for transforming jpg and png to mat.
https://github.com/zcemycl/Matlab-GAN/blob/master/CycleGAN/LoadAppleOrangeDatabase.m https://github.com/zcemycl/Matlab-GAN/blob/master/Pix2Pix/LoadFacadeDatabase.m
But if you want a dataloader like in pytorch, you have to rewrite the for loop and put the jpg loader in it.
More Answers (5)
Shounak Mitra
on 6 Jun 2019
In the next release, we're going to provide some flexbilities to design advanced networks such as GANs, Siamese Networks etc. Hang on :)
2 Comments
KH TOHIDUL ISLAM
on 19 Sep 2019
It is avilabel now, please check this out. Train Generative Adversarial Network (GAN)
2 Comments
Atallah Baydoun
on 7 Jun 2019
Thanks Mitra for the info.
But when is the next release going to be ?
5 Comments
Atallah Baydoun
on 10 Jun 2019
Hopefully then Matlab will include an example on GAN generation also.
Wonho Song
on 28 May 2020
Hello.
Thanks for these nice codes.
Normally we do have checkpoints and model to save to a file.
- I want to know how to save the model.Is it good to save the paramGen and paramDis? and if it is then how to use as a model.
- 2 .And also I want to know how to test pix2pix.m to a specific image file.Thanks in advance.
1 Comment
Atallah Baydoun
on 28 May 2020
Hey Wonho,
I ended up by using pix2pix from this link.
https://www.mathworks.com/matlabcentral/fileexchange/74779-pix2pix
It automatically saves the model. You can se from the link that many troubleshooting issues were resolved.
David Willingham
on 27 Aug 2020
Since R2019b, MATLAB has supported the implementation of GAN's.
Regards,
David Willingham
Deep Learning Product Manager, MathWorks
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!