fn eval_t<T: Copy + Datum>(&self, inputs: TVec<Arc<Tensor>>) -> TractResult<TVec<Arc<Tensor>>> {
        use ndarray::Axis;
        let arrays =
            inputs.iter().map(|m| Ok(m.cast_to::<T>()?)).collect::<TractResult<Vec<_>>>()?;
        let views: Vec<_> = arrays
            .iter()
            .map(|v| v.to_array_view::<T>().unwrap().insert_axis(Axis(self.axis)))
            .collect();
        let array = ::ndarray::stack(Axis(self.axis), &*views)?;
        Ok(tvec![array.into_arc_tensor()])
    }
/// Evaluates the operation given the input tensors.
Evaluates the operation given the input tensors.
Evaluates the operation given the input tensors .
fn eval_t<T: Copy + Datum>(&self, inputs: TVec<Arc<Tensor>>) -> TractResult<TVec<Arc<Tensor>>> {
        use ndarray::Axis;
        let arrays =
            inputs.iter().map(|m| Ok(m.cast_to::<T>()?)).collect::<TractResult<Vec<_>>>()?;
        let views: Vec<_> = arrays
            .iter()
            .map(|v| v.to_array_view::<T>().unwrap().insert_axis(Axis(self.axis)))
            .collect();
        let array = ::ndarray::stack(Axis(self.axis), &*views)?;
        Ok(tvec![array.into_arc_tensor()])
    }
fn eval_t < T : Copy + Datum > ( & self , inputs : TVec < Arc < Tensor > > ) -> TractResult < TVec < Arc < Tensor > > > { use ndarray :: Axis ; let arrays = inputs . iter ( ) . map ( | m | Ok ( m . cast_to :: < T > ( ) ? ) ) . collect :: < TractResult < Vec < _ > > > ( ) ? ; let views : Vec < _ > = arrays . iter ( ) . map ( | v | v . to_array_view :: < T > ( ) . unwrap ( ) . insert_axis ( Axis ( self . axis ) ) ) . collect ( ) ; let array = :: ndarray :: stack ( Axis ( self . axis ) , & * views ) ? ; Ok ( tvec ! [ array into_arc_tensor ( ) ] ) }
Evaluates the operation given the input tensors.
Evaluates the operation given the input tensors .
&self
inputs
TVec<Arc<Tensor>>
&self
inputs
TVec<Arc<Tensor>>