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§

source

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

source§

fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>

source§

impl<'a, T: TensorType> ToTensorHandle<'a> for [T]

source§

fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>

source§

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

source§

fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>

source§

impl<'a, T: TensorType, const N: usize> ToTensorHandle<'a> for [T; N]

source§

fn to_handle(&self, ctx: &'a Context) -> Result<TensorHandle<'a>>

Implementors§

source§

impl<'a> ToTensorHandle<'a> for TensorHandle<'a>

source§

impl<'a, T> ToTensorHandle<'a> for ReadonlyTensor<T>where T: TensorType,

source§

impl<'a, T: TensorType> ToTensorHandle<'a> for T