from_numpy

dragon.vm.torch.from_numpy(ndarray)[source]

Create a tensor converting from the given numpy array.

Parameters:
  • ndarray (numpy.ndarray) – The numpy array data.
Returns:

dragon.vm.torch.Tensor – The torch tensor.