[−][src]Struct tract_tensorflow::tfpb::tensorflow::GraphDef
Represents the graph of operations
Fields
node: Vec<NodeDef>
versions: Option<VersionDef>
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
version: i32
Deprecated single version field; use versions above instead. Since all GraphDef changes before "versions" was introduced were forward compatible, this field is entirely ignored.
library: Option<FunctionDefLibrary>
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
"library" provides user-defined functions.
Naming:
- library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib;
- If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime.
Function call semantics:
-
The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time.
-
The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready.
Implementations
impl GraphDef
[src]
pub fn node(self, n: NodeDef) -> Self
[src]
pub fn write_to_bytes(&self) -> TractResult<Vec<u8>>
[src]
pub fn save_to<P: AsRef<Path>>(self, p: P) -> TractResult<()>
[src]
Trait Implementations
impl Clone for GraphDef
[src]
impl Debug for GraphDef
[src]
impl Default for GraphDef
[src]
impl Framework<GraphDef, Graph<InferenceFact, Box<dyn InferenceOp + 'static>>> for Tensorflow
[src]
fn proto_model_for_path(&self, r: impl AsRef<Path>) -> TractResult<GraphDef>
[src]
This method will try to read as frozen model, then as a saved model.
fn proto_model_for_read(&self, r: &mut dyn Read) -> TractResult<GraphDef>
[src]
This method expects a frozen model, use open_saved_model for TF2 saved model format.
fn model_for_proto_model(&self, graph: &GraphDef) -> TractResult<InferenceModel>
[src]
fn model_for_read(&self, r: &mut dyn Read) -> Result<Model, TractError>
fn model_for_path(&self, p: impl AsRef<Path>) -> Result<Model, TractError>
impl Message for GraphDef
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
fn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
[src]
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
[src]
B: Buf,
Self: Default,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<GraphDef> for GraphDef
[src]
impl StructuralPartialEq for GraphDef
[src]
Auto Trait Implementations
impl RefUnwindSafe for GraphDef
impl Send for GraphDef
impl Sync for GraphDef
impl Unpin for GraphDef
impl UnwindSafe for GraphDef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>ⓘ
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,