Trait tensorflow::eager::ToTensorHandle
source · pub trait ToTensorHandle<'a> {
// Required method
fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>;
}
Expand description
A helper trait to convert a Tensor or some other types into a TensorHandle for use in eager execution.
Required Methods§
sourcefn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>
fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>
Convert a Tensor or values into a new TensorHandle.
Implementations on Foreign Types§
source§impl<'a> ToTensorHandle<'a> for str
impl<'a> ToTensorHandle<'a> for str
source§impl<'a, T: TensorType> ToTensorHandle<'a> for [T]
impl<'a, T: TensorType> ToTensorHandle<'a> for [T]
source§impl<'a, T, S, D> ToTensorHandle<'a> for ArrayBase<S, D>where
T: TensorType,
S: Data<Elem = T>,
D: Dimension,
impl<'a, T, S, D> ToTensorHandle<'a> for ArrayBase<S, D>where T: TensorType, S: Data<Elem = T>, D: Dimension,
Convert any ndarray::ArrayBase type into a tensorflow::Tensor