op_def_go_proto

package
v2.8.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2022 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

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 */
	// Indicates whether the op implementation uses distributed communication.
	// If True, the op is allowed to return errors for network disconnection and
	// trigger TF network failure handling logics.
	IsDistributedCommunication bool `` /* 143-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) Descriptor() ([]byte, []int)

Deprecated: Use OpDef.ProtoReflect.Descriptor instead.

func (*OpDef) GetAllowsUninitializedInput

func (x *OpDef) GetAllowsUninitializedInput() bool

func (*OpDef) GetAttr

func (x *OpDef) GetAttr() []*OpDef_AttrDef

func (*OpDef) GetControlOutput

func (x *OpDef) GetControlOutput() []string

func (*OpDef) GetDeprecation

func (x *OpDef) GetDeprecation() *OpDeprecation

func (*OpDef) GetDescription

func (x *OpDef) GetDescription() string

func (*OpDef) GetInputArg

func (x *OpDef) GetInputArg() []*OpDef_ArgDef

func (*OpDef) GetIsAggregate

func (x *OpDef) GetIsAggregate() bool

func (*OpDef) GetIsCommutative

func (x *OpDef) GetIsCommutative() bool

func (*OpDef) GetIsDistributedCommunication

func (x *OpDef) GetIsDistributedCommunication() bool

func (*OpDef) GetIsStateful

func (x *OpDef) GetIsStateful() bool

func (*OpDef) GetName

func (x *OpDef) GetName() string

func (*OpDef) GetOutputArg

func (x *OpDef) GetOutputArg() []*OpDef_ArgDef

func (*OpDef) GetSummary

func (x *OpDef) GetSummary() string

func (*OpDef) ProtoMessage

func (*OpDef) ProtoMessage()

func (*OpDef) ProtoReflect

func (x *OpDef) ProtoReflect() protoreflect.Message

func (*OpDef) Reset

func (x *OpDef) Reset()

func (*OpDef) String

func (x *OpDef) String() string

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"`
	// Experimental. Full type declaration for this argument.
	// The full type specification combines type, type_attr, type_list_attr,
	// etc. into a unified representation.
	// This declaration may contain non-concrete types (for example,
	// Tensor<TypeVar<'T'>> is a valid type declaration.
	//
	// Note: this is a transient field. The long-term aim is to represent the
	// entire OpDef as a single type: a callable. In that context, this field is
	// just the type of a single argument.
	ExperimentalFullType *full_type_go_proto.FullTypeDef `protobuf:"bytes,17,opt,name=experimental_full_type,json=experimentalFullType,proto3" json:"experimental_full_type,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) GetExperimentalFullType

func (x *OpDef_ArgDef) GetExperimentalFullType() *full_type_go_proto.FullTypeDef

func (*OpDef_ArgDef) GetHandleData

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) Descriptor() ([]byte, []int)

Deprecated: Use OpList.ProtoReflect.Descriptor instead.

func (*OpList) GetOp

func (x *OpList) GetOp() []*OpDef

func (*OpList) ProtoMessage

func (*OpList) ProtoMessage()

func (*OpList) ProtoReflect

func (x *OpList) ProtoReflect() protoreflect.Message

func (*OpList) Reset

func (x *OpList) Reset()

func (*OpList) String

func (x *OpList) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL