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 Freeze for SignatureDef
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