pub fn to_vec1<T>(tensor: &Tensor) -> Result<Vec<T>, Error>where T: Element,
Helper to convert tensor to vec