-
Notifications
You must be signed in to change notification settings - Fork 175
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
[WIP] added cycleGAN notebook! #175
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -0,0 +1,956 @@ | |||
{ |
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.
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.
Sure, doing it now. Sorry for delay.
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.
I think this is unaddressed
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.
Done!
@@ -0,0 +1,956 @@ | |||
{ |
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.
Would you like to upload this dataset from Hub and load it from there? so when the link is broken this notebook doesn't break as well.
Reply via ReviewNB
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.
On it.
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.
Would be nice if you could use load_dataset
https://huggingface.co/docs/datasets/en/loading
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.
+1 to using load_dataset
@@ -0,0 +1,956 @@ | |||
{ |
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.
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.
Got it.
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.
I wasn't able to figure out how to make this work with loading as Huggingface dataset, so this section is still needed. The best I could do was to download the dataset from Huggingface as a .zip
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.
I think if you don't put the dataset to zip format (any other format works), it will automatically, converting it to parquet and you'd be able to load it
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.
I've tried this with load_dataset
as suggested but ran into issues - it fails in the train
function.
Can you help take a look at my implementation / suggest changes I can try? https://colab.research.google.com/drive/1f328yVbuZmBjQRQhfOnC2QtrDFtCrXe_?usp=sharing
@@ -0,0 +1,956 @@ | |||
{ |
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.
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.
Thank you, Merve!
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.
Can you add some context for the image? Explain what it illustrates? Also, it comes right after you define the function to plot images, which doesn't make sense to me. It would be better to place in the introduction to the tutorial.
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.
Moved the image and added context to it!
@@ -0,0 +1,956 @@ | |||
{ |
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.
Not super sure but I felt like you could decouple many of the layers in forward into another function so in forward you just call that and return last activation (completely up to you)
Reply via ReviewNB
@@ -0,0 +1,956 @@ | |||
{ |
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.
@@ -0,0 +1,956 @@ | |||
{ |
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 @merveenoyan :) I think you accidently tagged hwaseem04 😅 |
ah sorry, removed. |
@merveenoyan no problem at all. 🤗 |
@merveenoyan It's been a week for this PR. Also, suggested changes are committed as well. Should I assign myself as the reviewer and do a community review for this? |
@sitamgithub-MSIT hello, I don't see the changes incorporated unfortunately :/ |
@sitamgithub-MSIT I have yet to make changes. |
no worries @charchit7, health definitely goes first |
@@ -0,0 +1,956 @@ | |||
{ |
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.
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 calling out that there were 2 versions of the Generator class. Deleted the unused one!
@@ -0,0 +1,956 @@ | |||
{ |
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.
@@ -0,0 +1,956 @@ | |||
{ |
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.
Line #60. train()
After the training is finished, it would be nice to upload the model to Hub, and then show a quick inference example.
Reply via ReviewNB
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.
I added a section below that uploads to Hub, but I wasn't able to figure out how to use the model for inference!
- Using Huggingface hosted dataset and push model to Hub - Use markdown instead of docstring
Hi! I'm helping @charchit7 out with wrapping up this PR and addressing review comments! |
Thank you so much @klyap :) |
View / edit / reply to this conversation on ReviewNB merveenoyan commented on 2024-02-01T07:43:33Z just a small nit, can you also take the param names into single backtick to format them as code? |
View / edit / reply to this conversation on ReviewNB merveenoyan commented on 2024-02-01T07:43:34Z If you put a gap between the # and the word it will be rendered properly |
View / edit / reply to this conversation on ReviewNB merveenoyan commented on 2024-02-01T07:43:35Z Same here (for header rendering) |
View / edit / reply to this conversation on ReviewNB merveenoyan commented on 2024-02-01T07:43:35Z you could do single |
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 a lot @klyap for taking over this! 🦸♀️
Made formatting changes and also changed the upload step to just upload folder and not individual files! |
lmk if you have other suggestions, @merveenoyan ! |
View / edit / reply to this conversation on ReviewNB MKhalusova commented on 2024-02-14T13:51:55Z "The below code downloads the zebra2horses dataset and places it in the same folder." |
View / edit / reply to this conversation on ReviewNB MKhalusova commented on 2024-02-14T13:51:56Z Line #4. # basic transforms Is this comment really needed? |
View / edit / reply to this conversation on ReviewNB MKhalusova commented on 2024-02-14T13:51:57Z Since you explain briefly what a residual block does, maybe also add a sentence or two about these other blocks. |
View / edit / reply to this conversation on ReviewNB MKhalusova commented on 2024-02-14T13:51:59Z Line #73. class FeatureMapBlock(nn.Module): What does this type of block do? |
Hey @klyap, thanks for all the work you put in. It seems like the only thing that actually needs to be adressed now, is loading the dataset from the huggingface hub. |
@klyap and @charchit7 I created a PR to the branch in the repo you have been working on it -> hwaseem04#7 |
Hey @johko looks good to me :) |
use HF dataset
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 @charchit7 , so from my side this one is finally ready to merge 🚀
Just need one last approval from @merveenoyan I guess
Hey everyone!
This PR adds CycleGAN Notebook!
Currently training the model is left.
Part of #28
Also, discussed in #158
Please take a look!
@johko @MKhalusova @merveenoyan