Implement L2 Normalization for a 2D tensor. L2 normalization is a technique where each row of the input tensor is normalized by the Euclidean (L2) norm of its elements.
The formula for L2 Normalization is:
where the sum of squared values is computed across the second dimension (D) for each element in the first dimension (B).
GPU Type
Language
Data Type
Loading editor...
CUDA C++ environment
Sample Run Results
Hit "Run" to test your code with sample inputs
For the best coding experience, please switch to a desktop device to write and submit your solution.