Struct tfrecord::protos::op_def::ArgDef[][src]

pub struct ArgDef {
    pub name: String,
    pub description: String,
    pub type: i32,
    pub type_attr: String,
    pub number_attr: String,
    pub type_list_attr: String,
    pub is_ref: bool,
}

For describing inputs and outputs.

Fields

name: String

Name for the input/output. Should match the regexp “[a-z][a-z0-9_]*”.

description: String

Human readable description.

type: i32

Describes the type of one or more tensors that are accepted/produced by this input/output arg. The only legal combinations are:

  • For a single tensor: either the “type” field is set or the “type_attr” field is set to the name of an attr with type “type”.
  • For a sequence of tensors with the same type: the “number_attr” field will be set to the name of an attr with type “int”, and either the “type” or “type_attr” field will be set as for single tensors.
  • For a sequence of tensors, the “type_list_attr” field will be set to the name of an attr with type “list(type)”.
type_attr: String

if specified, attr must have type “type”

number_attr: String

if specified, attr must have type “int”

type_list_attr: String

If specified, attr must have type “list(type)”, and none of type, type_attr, and number_attr may be specified.

is_ref: bool

For inputs: if true, the inputs are required to be refs. By default, inputs can be either refs or non-refs. For outputs: if true, outputs are refs, otherwise they are not.

Implementations

impl ArgDef[src]

pub fn type(&self) -> DataType[src]

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

pub fn set_type(&mut self, value: DataType)[src]

Sets type to the provided enum value.

Trait Implementations

impl Clone for ArgDef[src]

impl Debug for ArgDef[src]

impl Default for ArgDef[src]

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

impl Message for ArgDef[src]

impl PartialEq<ArgDef> for ArgDef[src]

impl Serialize for ArgDef[src]

impl StructuralPartialEq for ArgDef[src]

Auto Trait Implementations

impl RefUnwindSafe for ArgDef

impl Send for ArgDef

impl Sync for ArgDef

impl Unpin for ArgDef

impl UnwindSafe for ArgDef

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>,