Comments (9)
Hi, thanks! I'm assuming you're referring to DCGAN? If so hopefully all you need to do is change:
model.add(Conv2D(1, kernel_size=3, padding="same"))
to
model.add(Conv2D(self.channels, kernel_size=3, padding="same"))
on line 67.
from keras-gan.
oh yeah dcgan, yes the network works, thanks a lot for your help~~
from keras-gan.
the input dimension for cifar (32) is different from mnist (28), how can it be changed to generate that size?
from keras-gan.
Change
self.img_rows = 28
self.img_cols = 28
self.channels = 1
to
self.img_rows = 32
self.img_rows = 32
self.channels = 3
and also make the changes I suggested in my answer above.
from keras-gan.
thanks for the reply.
i think i also need to modify 'model.add(Dense(128 * 8 * 8))' to make the generator produce 32x32 image, otherwise it produces 28x28. is that expected?
from keras-gan.
Yeah, that is correct. Change these lines:
model.add(Dense(128 * 7 * 7, activation="relu", input_shape=noise_shape))
model.add(Reshape((7, 7, 128)))
to
model.add(Dense(128 * 8 * 8, activation="relu", input_shape=noise_shape))
model.add(Reshape((8, 8, 128)))
from keras-gan.
is there a formula to calculate the layer dimension given an arbitrary input image size? what reference/paper do you use to implement the network?
from keras-gan.
A suggestion I often see is to start with a shallow network, get something that works and then expand on that. There is no recipe when it comes to building the network's architecture that guarantees good results though, and it's extra tricky when it comes to GANs. For this example I build the network based of the architecture in the paper and some experimentation. I can recommend this page: https://github.com/soumith/ganhacks (from one of the authors of DCGAN).
from keras-gan.
thanks for the guide, very helpful. agree on starting with shallow ones that could fit the data first.
excellent work on the implementation!
from keras-gan.
Related Issues (20)
- when training CGAN, raise AttributeError: 'list' object has no attribute 'keys' in the following code HOT 5
- About pix2pix cannot be executed
- [Pix2Pix] Use fit_generator to speed up training process
- Why d_loss = 0.5 * np.add(d_loss_real, d_loss_fake) ? HOT 7
- cGAN: Using Multi label with different number of classes
- DCGAN can only generate noise images HOT 5
- (WGAN_GP)BatchNormalization in critic
- Adversarial Autoencoder training procedure does not correspond to procedure described in paper
- SRGAN - Generated image got PINK overlay all the time ? How to solve this ? HOT 1
- StarGAN & StyleGAN any chance ?
- Cannot import 'Adam' for keras optimizers while testing acgan HOT 1
- ACGAN: Difference multiplication and concatenation of embedding and noise
- pix2pix download dataset
- ImportError: cannot import name 'DataLoader' from 'data_loader'
- Where can I find and download some pre-trained model?
- Project dependencies may have API risk issues
- SRGAN dataset is not available
- when training SGAN for cifar10 and mnist dataset, raised the "AttributeError: 'list' object has no attribute 'keys' "in the following code lones
- cGAN with multi-labels of multi-classes HOT 1
- Keras GAN
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-gan.