Skip to content
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

[FEA] Add Normalize function #693

Open
tylera-nvidia opened this issue Aug 5, 2024 · 0 comments
Open

[FEA] Add Normalize function #693

tylera-nvidia opened this issue Aug 5, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tylera-nvidia
Copy link
Collaborator

tylera-nvidia commented Aug 5, 2024

Is your feature request related to a problem? Please describe.
add the ability to normalize all values in a tensor to some range, equivalent to MATLAB's implementation

Describe the solution you'd like

auto A = [0, 1 , 2, 3, 4 , 5 ]

auto normA = matx::normalize(A, matx::NORMALIZE_RANGE);

normA = [0, 0.2, 0.4, 0.6, 0.8, 1]

matlab equivalent:

>> A = [0, 1, 2, 3, 4, 5]

A =

     0     1     2     3     4     5

>> aNorm = normalize(A, "range")

aNorm =

         0    0.2000    0.4000    0.6000    0.8000    1.0000

Describe alternatives you've considered
This is trivial to implement by-hand today, but is a common-enough process that we should have an API for it. we could also better optimize for the various normalize methods described by the matlab implementations.

@tylera-nvidia tylera-nvidia added enhancement New feature or request good first issue Good for newcomers labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant