[−][src]Struct tensorflow::Function
Function is a grouping of operations with defined inputs and outputs. Once created and added to graphs, functions can be invoked by creating an operation whose operation type matches the function name.
Methods
impl Function
[src]
impl Function
pub fn to_function_def(&self) -> Result<Vec<u8>>
[src]
pub fn to_function_def(&self) -> Result<Vec<u8>>
Returns a serialized representation of the function (as a FunctionDef protocol message).
May fail on very large graphs in the future.
pub fn import_function_def(proto: &[u8]) -> Result<Function>
[src]
pub fn import_function_def(proto: &[u8]) -> Result<Function>
Construct and return the function whose FunctionDef representation is
serialized in proto
. Returns a newly created Function
instance.
pub fn set_attr_value_proto(
&mut self,
attr_name: &str,
proto: &[u8]
) -> Result<()>
[src]
pub fn set_attr_value_proto(
&mut self,
attr_name: &str,
proto: &[u8]
) -> Result<()>
Sets function attribute named attr_name
to value stored in proto
. If
this attribute is already set to another value, it is overriden. proto
should be a sequence of bytes representing a binary serialization of an
AttrValue protocol buffer.
pub fn get_attr_value_proto(&self, attr_name: &str) -> Result<Vec<u8>>
[src]
pub fn get_attr_value_proto(&self, attr_name: &str) -> Result<Vec<u8>>
Returns the binary-serialized AttrValue proto representation of the
value of the attr_name
attr of the function. If attr_name
attribute
is not present, returns an error.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more