-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Addition of SPADE Network + tests and modification of SPADE normalisation #7775
Conversation
- spade_network, and SPADENet (VAE-GAN) - test_spade_vaegan (to test previously mentioned model) Modification of: - spade_diffusion_model_unet.py to change namings. - SPADE normalisation layer, to use get_norm_layer function instead of defining such layers directly.
… before, an argument, but it wasn't being used, set instead to LeakyRelu. Now, activation is a parameter that is passed. It can't be None. In addition, removal of the KLD loss object. Instead, if network is VAE, it outputs the mu and log variance in the forward so that the KLD can be calculated externally.
The quick tests are failing for some weird issue with Matplotlib that may go away if they're rerun anyway, it isn't related to this PR. The DCO can be fixed as well by following the remediation instructions. |
This is the final piece of #7227 The need for the addition of the spade network here is my fault - I missed it out in the initial port, and @virginiafdez spotted it. The matplotlib errors have been popping up on other PRs too, recently. Will do a review in a moment. I can help with the mypy errors too |
Signed-off-by: Mark Graham <[email protected]>
Signed-off-by: Mark Graham <[email protected]>
I, virginiafdez <[email protected]>, hereby add my Signed-off-by to this commit: 5e3a3aa I, virginiafdez <[email protected]>, hereby add my Signed-off-by to this commit: a4547fa I, virginiafdez <[email protected]>, hereby add my Signed-off-by to this commit: c5834de I, virginiafdez <[email protected]>, hereby add my Signed-off-by to this commit: 0261386 Signed-off-by: virginiafdez <[email protected]>
Signed-off-by: virginiafdez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, overall looks good to me.
Minor comments inline.
Perhaps rename this PR to |
…e informative errors when z_dim is None and network is not GAN, addition of docstrings in forward method and __all__. - Modification of flag is_gan in the Decoder, to change it to opposite flag is_vae, to make it match with the flag of the SPADE network. - Modification of functionality on NOT is_vae mode. Initially, a random Gaussian noise vector was drawn and passed to an input Linear layer. Nonetheless, the original SPADE code starts from an interpolated version of the semantic map (deterministically) and passes it to a conv layer. self.fc is changed to a Conv layer when is_vae is False. Because mypy does not allow for self.fc to be Linear or Convolution under different attribute values, self.fc > self.conv_init when is_vae is False. - Modification of tests to incorporate suggestions: name of the tests were unsuitable, there were missing scenarios for when is_vae = False. Signed-off-by: virginiafdez <[email protected]>
/build |
Signed-off-by: virginiafdez <[email protected]>
/build |
1 similar comment
/build |
Fixes # .
Description
A few sentences describing the changes proposed in this pull request.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.