21
votes
Accepted
How to calculate the output shape of conv2d_transpose?
Here is the correct formula for computing the size of the output with tf.layers.conv2d_transpose():
...
21
votes
Accepted
what is the main difference between GAN and autoencoder?
The main differences are the philosophy that drives the loss metric, and consequently the architecture (the latter goes without saying, obviously).
Autoencoders
The job of an autoencoder is to ...
19
votes
Accepted
GANs (generative adversarial networks) possible for text as well?
Yes, GANs can be used for text. However, there is a problem in the combination of how GANs work and how text is normally generated by neural networks:
GANs work by propagating gradients through the ...
14
votes
Accepted
What is the difference between ImageNet and ImageNet1k? How to download it?
The ImageNet dataset consists of more than 14M images, divided into approximately 22k different labels/classes. However the ImageNet challenge is conducted on just 1k high-level categories (probably ...
10
votes
Accepted
Can we generate huge dataset with Generative Adversarial Networks
This is unlikely to add much beyond your direct data collection efforts.
The quality of current GAN outputs (as of 2017) will not be high enough. The images produced by a GAN are typically small and ...
9
votes
Why is my generator loss function increasing with iterations?
I think that there are several issues with your model:
First of all - Your generator's loss is not the generator's loss. You have on binary cross-entropy loss function for the discriminator, and you ...
8
votes
How to calculate the output shape of conv2d_transpose?
Take a look at the source code for tf.keras.Conv2DTranspose, which calls the function deconv_output_length when calculating its ...
8
votes
Accepted
GAN vs DCGAN difference
A Generative Adversarial Network (GAN) takes the idea of using a generator model to generate fake examples and discrimator model that tries to decide if the image it receives is a fake (i.e. from the ...
7
votes
Accepted
Is a multi-layer perceptron exactly the same as a simple fully connected neural network?
Yes, a multilayer perceptron is just a collection of interleaved fully connected layers and non-linearities.
The usual non-linearity nowadays is ReLU, but in the past sigmoid and tanh non-linearities ...
6
votes
Accepted
GAN to generate a custom image does not work
Generating text as an image is extremely difficult and I have never seen a GAN applied in the image space to generate pages of text. The reason this is so hard is because of the way in which text is ...
5
votes
How to calculate the output shape of conv2d_transpose?
Instead of using tf.nn.conv2d_transpose you can use tf.layers.conv2d_transpose
It is a wrapper layer and there is no need to ...
5
votes
How to use GAN for unsupervised feature extraction from images?
Typically to extract features, you can use the top layer of the network before the output. The intuition is that these features are linearly separable because the top layer is just a logistic ...
5
votes
Accepted
GAN discriminator converging to one output
What you are experiencing is called mode collapse, which can occur in GAN Training and is one of its "training instability problems". If you are using Vanilla GAN one effective way is to implement ...
5
votes
Accepted
Why do I get an OOM error although my model is not that large?
Why I am getting OOM error on the large batch size although my dataset and model are not that big?
Yes, the batch size is probably the reason.
Also, another the reason is that you don't use the ...
5
votes
Accepted
Why Gaussian latent variable (noise) for GAN?
Why people often choose the input to a GAN (z)
to be samples from a Gaussian?
Generally, for two reasons: (1) mathematical simplicity, (2) working well enough in practice. However, as we explain, ...
5
votes
Inception Score (IS) and Fréchet Inception Distance (FID), which one is better for GAN evaluation?
Here is the original paper proposing FID.
Here is an excerpt from
Jason Brownlee's https://machinelearningmastery.com/how-to-implement-the-frechet-inception-distance-fid-from-scratch/ along with a ...
5
votes
Train a GAN on "before and after" images of dental surgeries
It's a very specific problem and there's no right or wrong solution. I'll just write what I'd do in your position and hope that it is useful.
How many "before and after" images will I need?
You'...
4
votes
Accepted
What does discriminator of a GAN should do?
The discriminator must classify individual elements as being fake (i.e. created by the generator) or real (i.e. taken from the training dataset). The discriminator generates labels (real/fake) for ...
4
votes
Accepted
Loss function in GAN
In algorithm 1 of the original GAN article (https://arxiv.org/pdf/1406.2661.pdf), the discriminator is said to be updated by "ascending its stochastic gradient". This is referring to equation 1:
$$
\...
4
votes
High level understanding of residual blocks
Suppose we want to fit a function $f(x)$. We can either try to learn a neural network model $F(\cdot)$ so that $F(x) \approx f(x)$. Or, in the residual network approach, we try to learn a neural ...
4
votes
Accepted
What are "VGG54" and "VGG22" derived from the VGG19 CNN?
Reading the article, it seems like they define VGG54 as the loss calculated from the euclidean distance between the $\phi_{5,4}$ feature maps derived from both the high and low resolution images using ...
4
votes
Accepted
Could someone explain to me how back-prop is done for the generator in a GAN?
There is really nothing special about the backpropagation algorithm in a generative adversarial network (GAN). It is the same as that of a convolutional neural network (CNN), as CNNs are usually what ...
4
votes
Value Function of Generative Adversarial Network
Your notation is a little confusing, but I suspect this is because you're not reading the original equation exactly right. $\mathbb{E}_{x \sim p_{data}(x)}$ means "the expectation over $x$ drawn ...
4
votes
Accepted
Understanding notation of Goodfellow's GAN objective function
You are thinking of it backwards :) i.e. don't ask "How do we get these expectation parts?" or "how he got from" sum to expectation, ask where we got the sums!
The expectations are what we actually ...
4
votes
Accepted
Are mainstream pre-trained models useful as discriminators?
Using a standard network architecture is perfectly reasonable. Most discriminator architectures are trivially different variants of well-known architectures anyway.
Depending on the GAN loss, starting ...
4
votes
Accepted
DC GAN with Batch Normalization not working
Golden Rule: In Keras, if using Batch Normalization layer, train the discriminator on real and fake images separately. Don't combine them.
I was able to solve it by changing the discriminator ...
4
votes
Accepted
Does it make sense to do train test split when trainning GANS?
Training GANs is only a partially unsupervised task, IMHO. It's certainly unsupervised for the Generator, but it's supervised for the Adversarial Network. So it might be useful to test the ...
3
votes
Accepted
Perform several different torchvision.transforms on ImageFolder object
I've just found out about the class torch.utils.data.ConcatDataset([datasets]) . Its easy to use and documentation is here : http://pytorch.org/docs/master/data.html
3
votes
Accepted
Why does TFLearn DCGAN not run on my GPU (on Windows)?
The parts of your code that need to be inside the with tf.device('/gpu:0'): context is the actual computation graph, where the neural network lives. All the ...
3
votes
GANs (generative adversarial networks) possible for text as well?
There is even more specific research on this topic:
The trained generator is capable of producing sentences with certain level of grammar and logic.
Xuerong Xiao, "Text Generation using Generative ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gan × 237deep-learning × 90
generative-models × 62
machine-learning × 57
neural-network × 45
tensorflow × 32
keras × 29
python × 20
pytorch × 15
cnn × 13
training × 13
loss-function × 11
convolution × 10
computer-vision × 9
optimization × 9
unsupervised-learning × 8
convolutional-neural-network × 7
autoencoder × 7
image × 7
classification × 5
nlp × 5
time-series × 5
backpropagation × 5
image-preprocessing × 5
mnist × 5