Creating Zero Tensor in PyTorch with torch.zeros and torch.zeros_like
tensor([[[0.0702, 0.4700, 0.8626, 0.5981, 0.2569], [0.5060, 0.4742, 0.7492, 0.3597, 0.8754], [0.7581, 0.8954, 0.3205, 0.7038, 0.3167], [0.1799, 0.9890, 0.9624, 0.2595, 0.6935]], [[0.0338, 0.9996, 0.2049, 0.0127, 0.1300], [0.6330, 0.4086, 0.6630, 0.0960, 0.5759], [0.1510, 0.3219, 0.5052, 0.5823, 0.8093], [0.1546, 0.9815, 0.6459, 0.1247, 0.1438]]])
Read more