# Example 1 ip_tensor=torch.randn(2,1,3) print(ip_tensor) print(f"Input Tensor shape:{ip_tensor.shape}\n") op_tensor=torch.squeeze(ip_tensor) print(op_tensor) print(f"Output Tensor shape:{op_tensor.shape}\n") # Output tensor([[[ 0.2819, 0.3406, -1.8031]], [[-0.9314, 1.0048, -0.3198]]]) Input Tensor shape:torch.Size([2, 1, 3]) tensor([[ 0.2819, 0.3406, -1.8031], [-0.9314, 1.0048, -0.3198]]) Output Tensor shape:torch.Size([2, 3])