Comments (4)
Hi,
-
If you print the shape of the output of the last downsample layer in the generator you will see that the output has the shape
(?, 2, 2, 512)
. You can do this by addingprint (d7.shape)
inPix2Pix.build_generator
. By settingpadding='same'
padding will be applied to preserve the spatial resolution of the input given thatstrides=1
. If you use the same setting for padding and setstrides=2
padding will be applied in the same way as in the previous case, but as stride is set to 2 the spatial resolution of the output is downsampled by a factor of two. -
As the input image is propogated through four downsample layers the output shape of the discriminator will be
(batch_size, img_height // 2**4, img_width // 2**4, 1) = (batch_size, 256 // 2**4, 256 // 2**4, 1) = (batch_size, 16, 16, 1)
.
from keras-gan.
Thanks for these answers!!
- All these years I've thought "same" was ensuring spatial resolution regardless of stride by automatically padding the the input feature maps with zeros...
But I just checked deeper and you are absolutely right "same" is ONLY maintains spatial when stride=1. Since I always use stride equals one, i was confused! Thanks for clarifying this...
- Your answer to number one answers this question of mine as well...
Thanks so much!!!!!!!
from keras-gan.
Awesome. No problem!
from keras-gan.
I think I answered my own question about the Patch GAN idea by the way. Is the idea that rather than just letting D output a single number for the entire image as in the traditional sense, you instead force smaller sub patches of the image to be "believable" by D and as a result produce higher quality images from G. This seems to make a lot of sense to me. What is your recommendation for tuning the ouptut spatial resolution of D, is higher better or worse?
It looks like you make use of MSE losses as well is this due to the insights from Least Squares GANs paper (which I thought was fantastic by the way)? I agree with your choice of loss functions just wondering what your rationale is...
THIS CODE IS AMAZING and thanks to your efforts I think I have a 90%+ understanding of what is going with pix2pix.
Concerning this Mode Collapse we always observe is there anything explicit in the code that I am missing that explicitly combats that? Ive heard of this term "mean distance between batch" but I dont know if that actually works well in practice.
Im closing this now but I would love your thoughts still!!
THANKS AGAIN!!!!!!!!!!!!!
EDIT: Just noticed you closed this already.
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.