Skip to content

Set generator to eval mode before sampling?  #309

Description

@prabaey

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    newLabel applied to new issuesquestionGeneral question about the software

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions