# Tag Info

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(): ...
• 316
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 ...
• 15.4k
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 ...
• 421
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 ...
• 2,100
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 ...
• 27.3k

### 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 ...
• 181

### 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 ...
• 2,100
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 ...
• 13.9k
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 ...
• 8,488

### 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 ...

### 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 ...
• 435
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 ...
• 346
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 ...
• 1,019
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, ...
• 8,559

### 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'...
• 7,498
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 ...
• 15.4k
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:  \...
• 15.4k

### 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 ...
• 2,988
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 ...

### 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 ...
• 1,154
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 ...
• 910
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 ...
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 ...
• 5,687
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 ...
• 15.4k
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
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 ...
• 8,998

### 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 ...
Accepted

### Using Generative Adversarial Networks for a generation of image layer

In terms of generating an image "layer", that is just the same as generating an output image that can be overlaid on the input using standard graphics software. If you want pixel-level accuracy in the ...
• 27.3k