Creating Ones Tensor in PyTorch with torch.ones and torch.ones_like

tensor([[[0.5540, 0.2965, 0.7656, 0.0864, 0.4719],
         [0.1797, 0.8056, 0.5731, 0.3665, 0.7524],
         [0.7091, 0.5366, 0.6332, 0.8776, 0.0760],
         [0.1010, 0.5353, 0.9416, 0.2458, 0.8791]],

        [[0.8621, 0.0030, 0.5289, 0.6757, 0.2340],
         [0.5413, 0.6108, 0.5478, 0.5954, 0.1434],
         [0.6445, 0.6780, 0.4488, 0.3309, 0.0727],
         [0.2652, 0.6528, 0.6589, 0.6072, 0.5976]]])

 

 

 

To finish reading, please visit source site

Leave a Reply