Documentation ¶
Index ¶
- Variables
- type OpDef
- func (*OpDef) Descriptor() ([]byte, []int)deprecated
- func (x *OpDef) GetAllowsUninitializedInput() bool
- func (x *OpDef) GetAttr() []*OpDef_AttrDef
- func (x *OpDef) GetControlOutput() []string
- func (x *OpDef) GetDeprecation() *OpDeprecation
- func (x *OpDef) GetDescription() string
- func (x *OpDef) GetInputArg() []*OpDef_ArgDef
- func (x *OpDef) GetIsAggregate() bool
- func (x *OpDef) GetIsCommutative() bool
- func (x *OpDef) GetIsStateful() bool
- func (x *OpDef) GetName() string
- func (x *OpDef) GetOutputArg() []*OpDef_ArgDef
- func (x *OpDef) GetSummary() string
- func (*OpDef) ProtoMessage()
- func (x *OpDef) ProtoReflect() protoreflect.Message
- func (x *OpDef) Reset()
- func (x *OpDef) String() string
- type OpDef_ArgDef
- func (*OpDef_ArgDef) Descriptor() ([]byte, []int)deprecated
- func (x *OpDef_ArgDef) GetDescription() string
- func (x *OpDef_ArgDef) GetHandleData() []*resource_handle_go_proto.ResourceHandleProto_DtypeAndShape
- func (x *OpDef_ArgDef) GetIsRef() bool
- func (x *OpDef_ArgDef) GetName() string
- func (x *OpDef_ArgDef) GetNumberAttr() string
- func (x *OpDef_ArgDef) GetType() types_go_proto.DataType
- func (x *OpDef_ArgDef) GetTypeAttr() string
- func (x *OpDef_ArgDef) GetTypeListAttr() string
- func (*OpDef_ArgDef) ProtoMessage()
- func (x *OpDef_ArgDef) ProtoReflect() protoreflect.Message
- func (x *OpDef_ArgDef) Reset()
- func (x *OpDef_ArgDef) String() string
- type OpDef_AttrDef
- func (*OpDef_AttrDef) Descriptor() ([]byte, []int)deprecated
- func (x *OpDef_AttrDef) GetAllowedValues() *attr_value_go_proto.AttrValue
- func (x *OpDef_AttrDef) GetDefaultValue() *attr_value_go_proto.AttrValue
- func (x *OpDef_AttrDef) GetDescription() string
- func (x *OpDef_AttrDef) GetHasMinimum() bool
- func (x *OpDef_AttrDef) GetMinimum() int64
- func (x *OpDef_AttrDef) GetName() string
- func (x *OpDef_AttrDef) GetType() string
- func (*OpDef_AttrDef) ProtoMessage()
- func (x *OpDef_AttrDef) ProtoReflect() protoreflect.Message
- func (x *OpDef_AttrDef) Reset()
- func (x *OpDef_AttrDef) String() string
- type OpDeprecation
- func (*OpDeprecation) Descriptor() ([]byte, []int)deprecated
- func (x *OpDeprecation) GetExplanation() string
- func (x *OpDeprecation) GetVersion() int32
- func (*OpDeprecation) ProtoMessage()
- func (x *OpDeprecation) ProtoReflect() protoreflect.Message
- func (x *OpDeprecation) Reset()
- func (x *OpDeprecation) String() string
- type OpList
Constants ¶
This section is empty.
Variables ¶
View Source
var File_tensorflow_core_framework_op_def_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type OpDef ¶
type OpDef struct { // Op names starting with an underscore are reserved for internal use. // Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Description of the input(s). InputArg []*OpDef_ArgDef `protobuf:"bytes,2,rep,name=input_arg,json=inputArg,proto3" json:"input_arg,omitempty"` // Description of the output(s). OutputArg []*OpDef_ArgDef `protobuf:"bytes,3,rep,name=output_arg,json=outputArg,proto3" json:"output_arg,omitempty"` // Named control outputs for this operation. Useful only for composite // operations (i.e. functions) which want to name different control outputs. ControlOutput []string `protobuf:"bytes,20,rep,name=control_output,json=controlOutput,proto3" json:"control_output,omitempty"` Attr []*OpDef_AttrDef `protobuf:"bytes,4,rep,name=attr,proto3" json:"attr,omitempty"` // Optional deprecation based on GraphDef versions. Deprecation *OpDeprecation `protobuf:"bytes,8,opt,name=deprecation,proto3" json:"deprecation,omitempty"` // One-line human-readable description of what the Op does. Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` // Additional, longer human-readable description of what the Op does. Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` // True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs) IsCommutative bool `protobuf:"varint,18,opt,name=is_commutative,json=isCommutative,proto3" json:"is_commutative,omitempty"` // If is_aggregate is true, then this operation accepts N >= 2 // inputs and produces 1 output all of the same type. Should be // associative and commutative, and produce output with the same // shape as the input. The optimizer may replace an aggregate op // taking input from multiple devices with a tree of aggregate ops // that aggregate locally within each device (and possibly within // groups of nearby devices) before communicating. // TODO(josh11b): Implement that optimization. IsAggregate bool `protobuf:"varint,16,opt,name=is_aggregate,json=isAggregate,proto3" json:"is_aggregate,omitempty"` // for things like add // Ops are marked as stateful if their behavior depends on some state beyond // their input tensors (e.g. variable reading op) or if they have // a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops // must always produce the same output for the same input and have // no side-effects. // // By default Ops may be moved between devices. Stateful ops should // either not be moved, or should only be moved if that state can also // be moved (e.g. via some sort of save / restore). // Stateful ops are guaranteed to never be optimized away by Common // Subexpression Elimination (CSE). IsStateful bool `protobuf:"varint,17,opt,name=is_stateful,json=isStateful,proto3" json:"is_stateful,omitempty"` // for things like variables, queue // By default, all inputs to an Op must be initialized Tensors. Ops // that may initialize tensors for the first time should set this // field to true, to allow the Op to take an uninitialized Tensor as // input. AllowsUninitializedInput bool `` // for Assign, etc. /* 137-byte string literal not displayed */ // contains filtered or unexported fields }
Defines an operation. A NodeDef in a GraphDef specifies an Op by using the "op" field which should match the name of a OpDef. LINT.IfChange
func (*OpDef) Descriptor
deprecated
func (*OpDef) GetAllowsUninitializedInput ¶
func (*OpDef) GetAttr ¶
func (x *OpDef) GetAttr() []*OpDef_AttrDef
func (*OpDef) GetControlOutput ¶
func (*OpDef) GetDeprecation ¶
func (x *OpDef) GetDeprecation() *OpDeprecation
func (*OpDef) GetDescription ¶
func (*OpDef) GetInputArg ¶
func (x *OpDef) GetInputArg() []*OpDef_ArgDef
func (*OpDef) GetIsAggregate ¶
func (*OpDef) GetIsCommutative ¶
func (*OpDef) GetIsStateful ¶
func (*OpDef) GetOutputArg ¶
func (x *OpDef) GetOutputArg() []*OpDef_ArgDef
func (*OpDef) GetSummary ¶
func (*OpDef) ProtoMessage ¶
func (*OpDef) ProtoMessage()
func (*OpDef) ProtoReflect ¶
func (x *OpDef) ProtoReflect() protoreflect.Message
type OpDef_ArgDef ¶
type OpDef_ArgDef struct { // Name for the input/output. Should match the regexp "[a-z][a-z0-9_]*". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Human readable description. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // 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 types_go_proto.DataType `protobuf:"varint,3,opt,name=type,proto3,enum=tensorflow.DataType" json:"type,omitempty"` TypeAttr string `protobuf:"bytes,4,opt,name=type_attr,json=typeAttr,proto3" json:"type_attr,omitempty"` // if specified, attr must have type "type" NumberAttr string `protobuf:"bytes,5,opt,name=number_attr,json=numberAttr,proto3" json:"number_attr,omitempty"` // if specified, attr must have type "int" // If specified, attr must have type "list(type)", and none of // type, type_attr, and number_attr may be specified. TypeListAttr string `protobuf:"bytes,6,opt,name=type_list_attr,json=typeListAttr,proto3" json:"type_list_attr,omitempty"` // The handle data for resource inputs. HandleData []*resource_handle_go_proto.ResourceHandleProto_DtypeAndShape `protobuf:"bytes,7,rep,name=handle_data,json=handleData,proto3" json:"handle_data,omitempty"` // 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. IsRef bool `protobuf:"varint,16,opt,name=is_ref,json=isRef,proto3" json:"is_ref,omitempty"` // contains filtered or unexported fields }
For describing inputs and outputs.
func (*OpDef_ArgDef) Descriptor
deprecated
func (*OpDef_ArgDef) Descriptor() ([]byte, []int)
Deprecated: Use OpDef_ArgDef.ProtoReflect.Descriptor instead.
func (*OpDef_ArgDef) GetDescription ¶
func (x *OpDef_ArgDef) GetDescription() string
func (*OpDef_ArgDef) GetHandleData ¶
func (x *OpDef_ArgDef) GetHandleData() []*resource_handle_go_proto.ResourceHandleProto_DtypeAndShape
func (*OpDef_ArgDef) GetIsRef ¶
func (x *OpDef_ArgDef) GetIsRef() bool
func (*OpDef_ArgDef) GetName ¶
func (x *OpDef_ArgDef) GetName() string
func (*OpDef_ArgDef) GetNumberAttr ¶
func (x *OpDef_ArgDef) GetNumberAttr() string
func (*OpDef_ArgDef) GetType ¶
func (x *OpDef_ArgDef) GetType() types_go_proto.DataType
func (*OpDef_ArgDef) GetTypeAttr ¶
func (x *OpDef_ArgDef) GetTypeAttr() string
func (*OpDef_ArgDef) GetTypeListAttr ¶
func (x *OpDef_ArgDef) GetTypeListAttr() string
func (*OpDef_ArgDef) ProtoMessage ¶
func (*OpDef_ArgDef) ProtoMessage()
func (*OpDef_ArgDef) ProtoReflect ¶
func (x *OpDef_ArgDef) ProtoReflect() protoreflect.Message
func (*OpDef_ArgDef) Reset ¶
func (x *OpDef_ArgDef) Reset()
func (*OpDef_ArgDef) String ¶
func (x *OpDef_ArgDef) String() string
type OpDef_AttrDef ¶
type OpDef_AttrDef struct { // A descriptive name for the argument. May be used, e.g. by the // Python client, as a keyword argument name, and so should match // the regexp "[a-z][a-z0-9_]+". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // One of the type names from attr_value.proto ("string", "list(string)", // "int", etc.). Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // A reasonable default for this attribute if the user does not supply // a value. If not specified, the user must supply a value. DefaultValue *attr_value_go_proto.AttrValue `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` // Human-readable description. Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // For type == "int", this is a minimum value. For "list(___)" // types, this is the minimum length. HasMinimum bool `protobuf:"varint,5,opt,name=has_minimum,json=hasMinimum,proto3" json:"has_minimum,omitempty"` Minimum int64 `protobuf:"varint,6,opt,name=minimum,proto3" json:"minimum,omitempty"` // The set of allowed values. Has type that is the "list" version // of the "type" field above (uses the "list" field of AttrValue). // If type == "type" or "list(type)" above, then the "type" field // of "allowed_values.list" has the set of allowed DataTypes. // If type == "string" or "list(string)", then the "s" field of // "allowed_values.list" has the set of allowed strings. AllowedValues *attr_value_go_proto.AttrValue `protobuf:"bytes,7,opt,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"` // contains filtered or unexported fields }
Description of the graph-construction-time configuration of this Op. That is to say, this describes the attr fields that will be specified in the NodeDef.
func (*OpDef_AttrDef) Descriptor
deprecated
func (*OpDef_AttrDef) Descriptor() ([]byte, []int)
Deprecated: Use OpDef_AttrDef.ProtoReflect.Descriptor instead.
func (*OpDef_AttrDef) GetAllowedValues ¶
func (x *OpDef_AttrDef) GetAllowedValues() *attr_value_go_proto.AttrValue
func (*OpDef_AttrDef) GetDefaultValue ¶
func (x *OpDef_AttrDef) GetDefaultValue() *attr_value_go_proto.AttrValue
func (*OpDef_AttrDef) GetDescription ¶
func (x *OpDef_AttrDef) GetDescription() string
func (*OpDef_AttrDef) GetHasMinimum ¶
func (x *OpDef_AttrDef) GetHasMinimum() bool
func (*OpDef_AttrDef) GetMinimum ¶
func (x *OpDef_AttrDef) GetMinimum() int64
func (*OpDef_AttrDef) GetName ¶
func (x *OpDef_AttrDef) GetName() string
func (*OpDef_AttrDef) GetType ¶
func (x *OpDef_AttrDef) GetType() string
func (*OpDef_AttrDef) ProtoMessage ¶
func (*OpDef_AttrDef) ProtoMessage()
func (*OpDef_AttrDef) ProtoReflect ¶
func (x *OpDef_AttrDef) ProtoReflect() protoreflect.Message
func (*OpDef_AttrDef) Reset ¶
func (x *OpDef_AttrDef) Reset()
func (*OpDef_AttrDef) String ¶
func (x *OpDef_AttrDef) String() string
type OpDeprecation ¶
type OpDeprecation struct { // First GraphDef version at which the op is disallowed. Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Explanation of why it was deprecated and what to use instead. Explanation string `protobuf:"bytes,2,opt,name=explanation,proto3" json:"explanation,omitempty"` // contains filtered or unexported fields }
Information about version-dependent deprecation of an op
func (*OpDeprecation) Descriptor
deprecated
func (*OpDeprecation) Descriptor() ([]byte, []int)
Deprecated: Use OpDeprecation.ProtoReflect.Descriptor instead.
func (*OpDeprecation) GetExplanation ¶
func (x *OpDeprecation) GetExplanation() string
func (*OpDeprecation) GetVersion ¶
func (x *OpDeprecation) GetVersion() int32
func (*OpDeprecation) ProtoMessage ¶
func (*OpDeprecation) ProtoMessage()
func (*OpDeprecation) ProtoReflect ¶
func (x *OpDeprecation) ProtoReflect() protoreflect.Message
func (*OpDeprecation) Reset ¶
func (x *OpDeprecation) Reset()
func (*OpDeprecation) String ¶
func (x *OpDeprecation) String() string
type OpList ¶
type OpList struct { Op []*OpDef `protobuf:"bytes,1,rep,name=op,proto3" json:"op,omitempty"` // contains filtered or unexported fields }
A collection of OpDefs
func (*OpList) Descriptor
deprecated
func (*OpList) ProtoMessage ¶
func (*OpList) ProtoMessage()
func (*OpList) ProtoReflect ¶
func (x *OpList) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.