Struct tensorflow::SignatureDef
source · pub struct SignatureDef { /* private fields */ }
Expand description
SignatureDef defines the signature of a computation supported by a TensorFlow graph.
Implementations§
source§impl SignatureDef
impl SignatureDef
sourcepub fn new(method_name: String) -> SignatureDef
pub fn new(method_name: String) -> SignatureDef
Creates a SignatureDef with the given method name.
sourcepub fn add_input_info(&mut self, name: String, info: TensorInfo)
pub fn add_input_info(&mut self, name: String, info: TensorInfo)
Adds an input parameter.
sourcepub fn add_output_info(&mut self, name: String, info: TensorInfo)
pub fn add_output_info(&mut self, name: String, info: TensorInfo)
Adds an output parameter.
sourcepub fn method_name(&self) -> &str
pub fn method_name(&self) -> &str
Returns the method name.
sourcepub fn inputs(&self) -> &HashMap<String, TensorInfo>
pub fn inputs(&self) -> &HashMap<String, TensorInfo>
Returns the input parameters.
sourcepub fn outputs(&self) -> &HashMap<String, TensorInfo>
pub fn outputs(&self) -> &HashMap<String, TensorInfo>
Returns the output parameters.
sourcepub fn get_input(&self, name: &str) -> Result<&TensorInfo>
pub fn get_input(&self, name: &str) -> Result<&TensorInfo>
Returns the given input parameter.
sourcepub fn get_output(&self, name: &str) -> Result<&TensorInfo>
pub fn get_output(&self, name: &str) -> Result<&TensorInfo>
Returns the given output parameter.
Trait Implementations§
source§impl Clone for SignatureDef
impl Clone for SignatureDef
source§fn clone(&self) -> SignatureDef
fn clone(&self) -> SignatureDef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for SignatureDef
impl Send for SignatureDef
impl Sync for SignatureDef
impl Unpin for SignatureDef
impl UnwindSafe for SignatureDef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more