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

not an issue: what is the function of the 10 in get_sample_image(G, n_noise) #2

Open
prismspecs opened this issue Jul 28, 2020 · 1 comment

Comments

@prismspecs
Copy link

def get_sample_image(G, n_noise):
    """
        save sample 100 images
    """
    z = torch.randn(10, n_noise).to(DEVICE)
    y_hat = G(z).view(10, 3, 28, 28).permute(0, 2, 3, 1) # (100, 28, 28)
    result = (y_hat.detach().cpu().numpy()+1)/2.
    return result

What is the deal with the 10? I understand the 100 is random noise as an input, but what about the 10? Thank you so much for your repo btw, very helpful to me.

@whgreate
Copy link

whgreate commented Dec 8, 2020

got same issue: RuntimeError: shape '[10, 3, 28, 28]' is invalid for input of size 30720 site:stackoverflow.com

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