shlogg · Early preview
Super Kai (Kazuya Ito) @superkai_kazuya

Understanding At Least 2D Tensors In PyTorch

atleast_2d() in PyTorch: Converts 0D or 1D tensors to 2D tensors. Returns a tuple of tensors if multiple inputs, otherwise returns a single tensor.

Buy Me a Coffee☕
*Memos:

My post explains atleast_1d().
My post explains atleast_3d().

atleast_2d() can get the view of the one or more 2D or more D tensors of zero or more elements by only changing one or more 0D or 1D tensors to one or more 2D tensors from the one or more 0D or more D tensors of zero or more elements as shown below:
*Memos:

atleast_2d() can be used with torch but not with a tensor.
The 1st or more arguments with torch are *tensors(Required-Type:tensor of int, float, complex or bool or tuple or list of tensor of int, float, complex or bool):
*Memos:

If setting more than...