pub fn vec_to_tensor<T1, T2>(v: Vec<T1>, add_batch_dim: bool) -> Tensorwhere T1: AsPrimitive<T2>, T2: Copy + 'static + Element,