-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
refactored l1_loss and margin_ranking_loss in paddle frontend #22940
Conversation
Thanks for contributing to Ivy! 😊👏 |
hi @lucasalavapena can you please review the pr? |
hi @lucasalavapena it would be much helpful if you could review the pr |
Hi @zeus2x7 . Thanks for your PR 😄 . Sorry for the wait, it was the weekend. Could you please split your PR into 2? It is the commended approach per https://unify.ai/docs/ivy/overview/contributing/the_basics.html#small-commits-often . Ideally you could make one PR for the refactor and one into adding the normal function? You can assign me to both if you want as I will anyways now comment on both. |
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
Outdated
Show resolved
Hide resolved
If you are working on an open task, please edit the PR description to link to the issue you've created. For more information, please check ToDo List Issues Guide. Thank you 🤗 |
hi @lucasalavapena can you please review the pr again? |
@lucasalavapena could you please review this pr also |
Please have some patience. |
Btw a general comment, something like nll_loss should ideally be calling the ivy functional api, but that function has not been implemented yet and of course you are simply completing/refactoring it! |
hi @lucasalavapena can you please give it a look now? |
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.
Please ensure that all tests related to this PR pass, test_paddle_nll_loss
is failing (see the combined test results section of display test results). I first realised this when I ran it in codespaces because I was confused how it would be passing given that log or log_softmax is applied here.
if weight is None: | ||
weight = ivy.ones(ivy.shape(input[0])) | ||
input = ivy.log(input) | ||
input = ivy.log_softmax(input) |
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.
Also in general please name input something else if you transform it, that could be a bit confusing if not read in a linear manner
refactored l1_loss,nll_loss and margin_ranking_loss in paddle frontend