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

Set generator to eval mode before sampling? #309

Open
prabaey opened this issue Aug 7, 2023 · 0 comments
Open

Set generator to eval mode before sampling? #309

prabaey opened this issue Aug 7, 2023 · 0 comments
Labels
new Label applied to new issues question General question about the software

Comments

@prabaey
Copy link

prabaey commented Aug 7, 2023

Environment details

If you are already running CTGAN, please indicate the following details about the environment in
which you are running it:

  • CTGAN version: 0.7.4
  • Python version: 3.10.12
  • Operating System: Linux

Problem description

I noticed there is no line of code that sets the self._generator module in evaluation mode before sampling. I would expect this to be necessary, since there's Batchnorm layers in the generator that operate differently under training mode vs. evaluation mode. Something like this at the start of the CTGAN.sample() method:

self._generator.eval()

Why is this not needed? Am I missing something here? Thanks!

@prabaey prabaey added new Label applied to new issues question General question about the software labels Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Label applied to new issues question General question about the software
Projects
None yet
Development

No branches or pull requests

1 participant