Standardize Each Column of a 2D Tensor

Asked at Bridgewater · Coding Questions · Difficulty: Medium

Using PyTorch or NumPy, write a function to perform specified operations on a given dataset. The dataset is a 2D tensor, and you need to **standardize each column**. Return the standardized 2D tensor. The dataset size can be up to 1000x1000, so ensure efficiency. Input is a 2D tensor, output should be the standardized tensor.

Loading the problem…