Struct tfrecord::protos::ApiDef[][src]

pub struct ApiDef {
    pub graph_op_name: String,
    pub deprecation_message: String,
    pub deprecation_version: i32,
    pub visibility: i32,
    pub endpoint: Vec<Endpoint>,
    pub in_arg: Vec<Arg>,
    pub out_arg: Vec<Arg>,
    pub arg_order: Vec<String>,
    pub attr: Vec<Attr>,
    pub summary: String,
    pub description: String,
    pub description_prefix: String,
    pub description_suffix: String,
}

Used to specify and override the default API & behavior in the generated code for client languages, from what you would get from the OpDef alone. There will be a set of ApiDefs that are common to all client languages, and another set per client language. The per-client-language ApiDefs will inherit values from the common ApiDefs which it can either replace or modify.

We separate the API definition from the OpDef so we can evolve the API while remaining backwards compatible when interpretting old graphs. Overrides go in an “api_def.pbtxt” file with a text-format ApiDefs message.

WARNING: Be very careful changing the API for any existing op – you can change the semantics of existing code. These changes may need to wait until a major release of TensorFlow to avoid breaking our compatibility promises.

Fields

graph_op_name: String

Name of the op (in the OpDef) to specify the API for.

deprecation_message: String

If this op is deprecated, set deprecation message to the message that should be logged when this op is used. The message should indicate alternative op to use, if any.

deprecation_version: i32

Major version when the op will be deleted. For e.g. set this value to 2 if op API should be removed in TensorFlow 2.0 and deprecated in versions before that.

visibility: i32endpoint: Vec<Endpoint>in_arg: Vec<Arg>out_arg: Vec<Arg>arg_order: Vec<String>

List of original in_arg names to specify new argument order. Length of arg_order should be either empty to keep current order or match size of in_arg.

attr: Vec<Attr>summary: String

One-line human-readable description of what the Op does.

description: String

Additional, longer human-readable description of what the Op does.

description_prefix: String

Modify an existing/inherited description by adding text to the beginning or end.

description_suffix: String

Implementations

impl ApiDef[src]

pub fn visibility(&self) -> Visibility[src]

Returns the enum value of visibility, or the default if the field is set to an invalid enum value.

pub fn set_visibility(&mut self, value: Visibility)[src]

Sets visibility to the provided enum value.

Trait Implementations

impl Clone for ApiDef[src]

impl Debug for ApiDef[src]

impl Default for ApiDef[src]

impl<'de> Deserialize<'de> for ApiDef[src]

impl Message for ApiDef[src]

impl PartialEq<ApiDef> for ApiDef[src]

impl Serialize for ApiDef[src]

impl StructuralPartialEq for ApiDef[src]

Auto Trait Implementations

impl RefUnwindSafe for ApiDef

impl Send for ApiDef

impl Sync for ApiDef

impl Unpin for ApiDef

impl UnwindSafe for ApiDef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,