Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do you use math.exp? #4

Open
KazutoshiShinoda opened this issue Jun 27, 2018 · 2 comments
Open

Why do you use math.exp? #4

KazutoshiShinoda opened this issue Jun 27, 2018 · 2 comments

Comments

@KazutoshiShinoda
Copy link

https://github.com/ZiJianZhao/SeqGAN-PyTorch/blob/master/main.py#L87

why?

In the original implementation by LantaoYu, exp is not used for loss values.

@ShengleiH
Copy link

@Shinochin hello, because 'NLLLoss' is used which is 'NLLLoss(x) = log(softmax(x))'. Therefore, to get the softmax results, you need to do this: 'softmax(x) = exp(NLLLoss(x))'

@deepylt
Copy link

deepylt commented Aug 25, 2018

But total_loss / total_words seems weird since the discriminator loss is not related to the sequence length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants