Concatenate PyTorch Tensors Along A Given Dimension
We print out the PyTorch version we are using. We see that we are using PyTorch version 0.2.0_4. The first thing we're going to do is we're going to define a PyTorch tensor and we're going to initialize it using the random functionality which pulls a random number between 0 to 1. Then we're going to multiply it by 100 so that we have a number between 0 to 100 and we cast it to an Int PyTorch tensor just so it's cleaner when we go to look at the numbers. Then we can see that it is a PyTorch IntTensor of size 2x3x4. Cast this one to an Int as well.
Apr-23-2018, 04:04:36 GMT
- Technology: