from_numpy

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

Create a tensor from the given numpy array.

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

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