docment GAN#72
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
This PR would finish #20. |
|
Finished the changes based on @warner-benjamin's and @muellerzr's suggestions. I will note this very weird issue we discussed on Discord voice channel. In the code there is the following function: I have added some docmenting but not type annotations. However, once I specifically add a type annotation to size, the full notebook doesn't run without error anymore: What happens is that This is a little concerning if code breaks due to the type annotations, so as a side note, we should all be making sure the tests pass for all of these PRs (must be enabled for first-time contributors). |
warner-benjamin
left a comment
There was a problem hiding this comment.
Noticed one formatting error. Made a couple suggestions to make the doc strings more concise. Please replicate those in the other doc strings. Also, I think the loss_crit doc string had an error, but am not 100% sure.
Co-authored-by: Benjamin Warner <me@benjaminwarner.dev>
Co-authored-by: Benjamin Warner <me@benjaminwarner.dev>
Co-authored-by: Benjamin Warner <me@benjaminwarner.dev>
…int into docment_gan
|
@warner-benjamin updated, let me know if there's anything else that needs to be updated... |
warner-benjamin
left a comment
There was a problem hiding this comment.
I don't think we need to add a None type hint for args with a default of None. I provided an example.
Remove the None type hints and it looks good.
| @@ -121,23 +160,33 @@ def forward(self, output, target): | |||
|
|
|||
There was a problem hiding this comment.
Add types to AdaptiveLoss
| @@ -259,7 +316,12 @@ class InvisibleTensor(TensorBase): | |||
| def show(self, ctx=None, **kwargs): return ctx | |||
There was a problem hiding this comment.
Maybe add doc string to explain InvisibleTensor. What is Invisible about it?
| switch_eval:bool=False, # Whether the model should be set to eval mode when calculating loss | ||
| **kwargs | ||
| ): | ||
| "Create a WGAN from `dls`, `generator` and `critic`." |
There was a problem hiding this comment.
What is a WGAN? Is there a paper link or anything for this
|
One other thought, maybe the model training should be behind a nbdev |
Co-authored-by: Kevin Bird <kevinbird15@gmail.com>
Co-authored-by: Kevin Bird <kevinbird15@gmail.com>
Co-authored-by: Kevin Bird <kevinbird15@gmail.com>
Co-authored-by: Kevin Bird <kevinbird15@gmail.com>
Co-authored-by: Kevin Bird <kevinbird15@gmail.com>
There is an |
|
Alright. Resolve the CI errors and then it looks good to me. |
|
@warner-benjamin updated... |
Okay here's my first docment PR, let me know if there are any issues and I would appreciate any feedback you have.
I'll note I did take out the
after_epochandshow_imgarguments since they weren't doing anything. I will take a little time to debug and get them working. Shall I make an issue in the main fastai repo? I can work on fixing that after the docment sprint.