-
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
L1 normalization added. #14717
L1 normalization added. #14717
Conversation
Hi @Suraj520, |
Hi @zaeemansari70 : I'm not implementing anything as of now. Can you please review 😃 |
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.
@Suraj520 , as this is a fundamental function this has to be a primary implementation which means it has to be implemented in all the backends separately, also you have to add the tests for the function as well, I'd suggest you to see the docs for this. https://lets-unify.ai/docs/ivy/overview/deep_dive/function_types.html
One more thing, your PR also not linked to an issue, kindly link the PR to the issue as well 🙂
Thanks! 🙂
Sure, I will check the deep-dive again. I'll try to update you on this by weekend. |
@zaeemansari70 - I have implemented L1 normalization across all backends, Migrated it to experimental and written the unit tests. Kindly review 😄 |
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.
Awesome @Suraj520 !
I've requested some more changes 🙂
- As this is a backend implementation, you should also add the
array
andcontainer
instance methods, kindly add those. - Please resolve the merge conflicts too 🙂
Thanks! 🙂
Hey @zaeemansari70 I've resolved the merge conflicts but I am not sure how and where to add the array and container instance methods. Can you please elaborate upon how and where it should be implemented with a reference example ? Thanks ! |
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.
Hi @Suraj520 ,
So there is a folder known as data_classes
inside ivy, the path is ivy/data_classes
You will see the array
and container
folders there, you have to add these in the experimental folder for the respective files, you'll get an idea how to add them by looking at other implementations.
It's fairly simple 🙂
@zaeemansari70 : Done ! Please review 😄 |
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.
lgtm!
Thanks for contributing to Ivy! 🙂
@Suraj520 |
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.
One last change 🙂
|
||
# local | ||
import ivy_tests.test_ivy.helpers as helpers | ||
from ivy_tests.test_ivy.helpers import handle_test | ||
|
||
@handle_test( | ||
fn_tree="functional.ivy.l1_normalize", |
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.
Sorry I missed this, this should be called from experimental Ivy
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 pointing this out ! Fixed it 😄 ! Kindly check
Sure ! Noted 😊 |
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.
As the tests are also passing, the changes lgtm! 👍
Thanks ! |
Added L1 normalization and migrated it to experimental.
Closes #15824