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).
Sample Run Results
Hit "Run" to test your code with sample inputs
Loading editor...
CUDA C++ environment
For the best coding experience, please switch to a desktop device to write and submit your solution.