Skip to main content
22 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 ...
timchap's user avatar
  • 461
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(): ...
Manish P's user avatar
  • 326
11 votes
Accepted

Find optimal P(X|Y) given I have a model that has good performance when trained on P(Y|X)

This response has been significantly modified from its original form. The flaws of my original response will be discussed below, but if you would like to see roughly what this response looked like ...
David Marx's user avatar
  • 3,268
11 votes

When to use Stateful LSTM?

As for stateful LSTM and its understanding, refer to here. Quoting an answer from there: "I’m given a big sequence (e.g. Time Series) and I split it into smaller sequences to construct my input ...
pcko1's user avatar
  • 3,970
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 ...
Kyle's user avatar
  • 181
7 votes

Is it possible to use a generative model to "share" private data?

Unfortunately I don't think a generative model could prevent from leaking private information from the original dataset. Like any other kind of model, the generative model is based on the values ...
Erwan's user avatar
  • 25.7k
7 votes

Is it possible to use a generative model to "share" private data?

Yes it is. That is, in theory atleast. So we already have mathematical tools to prove whether privacy (and how much-thats the parameter epsilon) is perserved. Its called differential privacy. I highly ...
Noah Weber's user avatar
  • 5,739
6 votes
Accepted

Which type of models generalize better, generative or discriminative models?

My answer is not limited to NLP and I think NLP is no different in this aspect than other types of learning. An interesting technical look is offered by: On Discriminative vs. Generative Classifiers - ...
rapaio's user avatar
  • 4,783
5 votes

Latent loss in variational autoencoder drowns generative loss

I don't like the reduce_sum version of the kl-loss because it depends on the size of your latent vector. My advise is to use the mean instead. Moreover it is a ...
Adrien D's user avatar
  • 1,113
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 ...
Yash Khare's user avatar
5 votes

How to supress previous results in a generative network?

I need a way to supress previous answers. The answer to the question depends on the particular network that you are using. What kind of generative model is it? GAN? Autoencoder? Seq2Seq RNN? Having ...
pcko1's user avatar
  • 3,970
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 ...
Noah Weber's user avatar
  • 5,739
5 votes
Accepted

LLMs for text generation

Yes, there are open multimodal LLMs that you can fine-tune yourself, like LlaVa, NextGPT, IDEFICS or SPHINX. Closed multimodal LLMs like GPT-4v don't offer a way to fine-tune them yet.
noe's user avatar
  • 27.2k
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 ...
noe's user avatar
  • 27.2k
4 votes

Real world example of Generative model & Discriminative model

A generative model is able to generate instances from a given distribution. So let's try to get our model to generate instance from the distribution of all hand written digits. This includes numbers 0 ...
JahKnows's user avatar
  • 8,986
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 ...
user3658307's user avatar
  • 1,020
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 ...
user3658307's user avatar
  • 1,020
3 votes
Accepted

GAN for inpainting an image

I would doubt there's a single correct answer for best available architecture, but the current best results come from this paper by NVIDIA and this technical report by Adobe. The latter paper is the ...
Tom M.'s user avatar
  • 671
3 votes

How can both generator and discriminator losses decrease?

In the subsection of the figure, they compute the average loss across 100 iterations, which is why the loss is monotonically decreasing because on average the loss does decrease with the training. You ...
PSub's user avatar
  • 712
3 votes

When to use Stateful LSTM?

See this post: https://stackoverflow.com/questions/47594861/predicting-a-multiple-time-step-forward-of-a-time-series-using-lstm You should be training on a shifted X for your Y. Then passing through ...
hisairnessag3's user avatar
3 votes
Accepted

Using machine learning to evaluate a random number generator

are there "machine learning" ways to evaluate a pseudorandom number generator? No it is the wrong tool for the job. Statistical tests, like those you mention monobit, runs, poker test etc, are a way ...
Neil Slater's user avatar
  • 29.1k
3 votes
Accepted

Evaluating performance of Generative Adverserial Network?

I think it depends on what exactly you're doing with the GANs. If you're generating images, the two most popular (to my knowledge) are the Inception Score [1] and Frechet Inception Distance [2]. GANs ...
Matthew's user avatar
  • 1,284
3 votes

What is the interpretation of the expectation notation in the GAN formulation?

The functions $$ L_a(x) = \log(D(x))\;\;\;\;\&\;\;\;\; L_b(z) = \log(1-D(G(z))) $$ are defined for one value (either $x$ or $z$). We don't want to optimize $L_a$ or $L_b$ for one input, we want ...
user3658307's user avatar
  • 1,020
3 votes
Accepted

What does this symbol means, what operator is it?

$\mathbb{E}$ means expected value. The subscript is there to clarify which random variable is the expected value taken.
Siong Thye Goh's user avatar
3 votes
Accepted

Transformer masking during training or inference?

The trick is that you do not need masking at inference time. The purpose of masking is that you prevent the decoder state from attending to positions that correspond to tokens "in the future"...
Jindřich's user avatar
  • 1,771
3 votes
Accepted

RCNN to predict sequence of images (video frames)?

The authors provide this image in their supplemental information: There, you can see their explanation. The convolutional layers encode the image into some latent space representation. The RNN ...
Ceph's user avatar
  • 161
2 votes
Accepted

Text generation using Tensor Factorization

Tensor Factorization would not work for text generation as a stand-alone technique. There is no way for the decomposition to model long-term dependencies in language. Without modeling long-term ...
Brian Spiering's user avatar
2 votes

Strange patterns from GAN

The deconv layers are probably to blame. Check out this distill article for a fairly in depth discussion about how deconv layers create checkerboard artifacts. The gist is that deconv striding creates ...
David Marx's user avatar
  • 3,268
2 votes

How to convert night image to day image?

One problem with this is that dark images simply contain less information. Anyone with a background in photography will tell you it’s easier to decrease exposure on a bright image than increase ...
HEITZ's user avatar
  • 911
2 votes

Common Techniques to Generate from a Regression Neural Network Model

Let $E_\phi : D\rightarrow \mathbb{R}$ be your trained differentiable regression model, where $D$ is the data space, e.g. images. Let $G : \mathbb{R}^d\rightarrow D$ be some generative model or ...
user3658307's user avatar
  • 1,020

Only top scored, non community-wiki answers of a minimum length are eligible