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 with torch.no_grad() when i == 0: #46

Open
fido20160817 opened this issue Aug 19, 2022 · 1 comment
Open

why with torch.no_grad() when i == 0: #46

fido20160817 opened this issue Aug 19, 2022 · 1 comment

Comments

@fido20160817
Copy link

 if i == 0:
    with torch.no_grad():
        log_p, logdet, _ = model.module(
            image + torch.rand_like(image) / n_bins
        )

        continue

else:
    log_p, logdet, _ = model(image + torch.rand_like(image) / n_bins)
@davitpapikyan
Copy link

This is for data dependent initialization of Actnorm.

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

2 participants