Skip to content

Instantly share code, notes, and snippets.

@dvgodoy
Last active April 30, 2022 08:46
Show Gist options
  • Save dvgodoy/2efd3cea037a4dea58a943af8f3e0d12 to your computer and use it in GitHub Desktop.
Save dvgodoy/2efd3cea037a4dea58a943af8f3e0d12 to your computer and use it in GitHub Desktop.
decoder = nn.Sequential(
# z_size -> 2048
nn.Linear(z_size, 2048),
nn.LeakyReLU(),
# 2048 -> 2048
nn.Linear(2048, 2048),
nn.LeakyReLU(),
# 2048 -> C*H*W
nn.Linear(2048, np.prod(input_shape)),
# C*H*W -> (C, H, W)
nn.Unflatten(1, input_shape)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment