api_def_go_proto

package
v1.12.2-0...-1b6f133 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiDef_Visibility_name = map[int32]string{
	0: "DEFAULT_VISIBILITY",
	1: "VISIBLE",
	2: "SKIP",
	3: "HIDDEN",
}
View Source
var ApiDef_Visibility_value = map[string]int32{
	"DEFAULT_VISIBILITY": 0,
	"VISIBLE":            1,
	"SKIP":               2,
	"HIDDEN":             3,
}

Functions

This section is empty.

Types

type ApiDef

type ApiDef struct {
	// Name of the op (in the OpDef) to specify the API for.
	GraphOpName string `protobuf:"bytes,1,opt,name=graph_op_name,json=graphOpName,proto3" json:"graph_op_name,omitempty"`
	// 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.
	DeprecationMessage string `protobuf:"bytes,12,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
	// 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.
	DeprecationVersion int32              `protobuf:"varint,13,opt,name=deprecation_version,json=deprecationVersion,proto3" json:"deprecation_version,omitempty"`
	Visibility         ApiDef_Visibility  `protobuf:"varint,2,opt,name=visibility,proto3,enum=tensorflow.ApiDef_Visibility" json:"visibility,omitempty"`
	Endpoint           []*ApiDef_Endpoint `protobuf:"bytes,3,rep,name=endpoint,proto3" json:"endpoint,omitempty"`
	InArg              []*ApiDef_Arg      `protobuf:"bytes,4,rep,name=in_arg,json=inArg,proto3" json:"in_arg,omitempty"`
	OutArg             []*ApiDef_Arg      `protobuf:"bytes,5,rep,name=out_arg,json=outArg,proto3" json:"out_arg,omitempty"`
	// 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.
	ArgOrder []string       `protobuf:"bytes,11,rep,name=arg_order,json=argOrder,proto3" json:"arg_order,omitempty"`
	Attr     []*ApiDef_Attr `protobuf:"bytes,6,rep,name=attr,proto3" json:"attr,omitempty"`
	// One-line human-readable description of what the Op does.
	Summary string `protobuf:"bytes,7,opt,name=summary,proto3" json:"summary,omitempty"`
	// Additional, longer human-readable description of what the Op does.
	Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	// Modify an existing/inherited description by adding text to the beginning
	// or end.
	DescriptionPrefix    string   `protobuf:"bytes,9,opt,name=description_prefix,json=descriptionPrefix,proto3" json:"description_prefix,omitempty"`
	DescriptionSuffix    string   `protobuf:"bytes,10,opt,name=description_suffix,json=descriptionSuffix,proto3" json:"description_suffix,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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.

func (*ApiDef) Descriptor

func (*ApiDef) Descriptor() ([]byte, []int)

func (*ApiDef) GetArgOrder

func (m *ApiDef) GetArgOrder() []string

func (*ApiDef) GetAttr

func (m *ApiDef) GetAttr() []*ApiDef_Attr

func (*ApiDef) GetDeprecationMessage

func (m *ApiDef) GetDeprecationMessage() string

func (*ApiDef) GetDeprecationVersion

func (m *ApiDef) GetDeprecationVersion() int32

func (*ApiDef) GetDescription

func (m *ApiDef) GetDescription() string

func (*ApiDef) GetDescriptionPrefix

func (m *ApiDef) GetDescriptionPrefix() string

func (*ApiDef) GetDescriptionSuffix

func (m *ApiDef) GetDescriptionSuffix() string

func (*ApiDef) GetEndpoint

func (m *ApiDef) GetEndpoint() []*ApiDef_Endpoint

func (*ApiDef) GetGraphOpName

func (m *ApiDef) GetGraphOpName() string

func (*ApiDef) GetInArg

func (m *ApiDef) GetInArg() []*ApiDef_Arg

func (*ApiDef) GetOutArg

func (m *ApiDef) GetOutArg() []*ApiDef_Arg

func (*ApiDef) GetSummary

func (m *ApiDef) GetSummary() string

func (*ApiDef) GetVisibility

func (m *ApiDef) GetVisibility() ApiDef_Visibility

func (*ApiDef) ProtoMessage

func (*ApiDef) ProtoMessage()

func (*ApiDef) Reset

func (m *ApiDef) Reset()

func (*ApiDef) String

func (m *ApiDef) String() string

func (*ApiDef) XXX_DiscardUnknown

func (m *ApiDef) XXX_DiscardUnknown()

func (*ApiDef) XXX_Marshal

func (m *ApiDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ApiDef) XXX_Merge

func (m *ApiDef) XXX_Merge(src proto.Message)

func (*ApiDef) XXX_Size

func (m *ApiDef) XXX_Size() int

func (*ApiDef) XXX_Unmarshal

func (m *ApiDef) XXX_Unmarshal(b []byte) error

type ApiDef_Arg

type ApiDef_Arg struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Change the name used to access this arg in the API from what
	// is used in the GraphDef.  Note that these names in `backticks`
	// will also be replaced in the summary & description fields.
	RenameTo string `protobuf:"bytes,2,opt,name=rename_to,json=renameTo,proto3" json:"rename_to,omitempty"`
	// Note: this will replace any inherited arg doc. There is no
	// current way of modifying arg descriptions (other than replacing
	// them entirely) as can be done with op descriptions.
	Description          string   `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ApiDef_Arg) Descriptor

func (*ApiDef_Arg) Descriptor() ([]byte, []int)

func (*ApiDef_Arg) GetDescription

func (m *ApiDef_Arg) GetDescription() string

func (*ApiDef_Arg) GetName

func (m *ApiDef_Arg) GetName() string

func (*ApiDef_Arg) GetRenameTo

func (m *ApiDef_Arg) GetRenameTo() string

func (*ApiDef_Arg) ProtoMessage

func (*ApiDef_Arg) ProtoMessage()

func (*ApiDef_Arg) Reset

func (m *ApiDef_Arg) Reset()

func (*ApiDef_Arg) String

func (m *ApiDef_Arg) String() string

func (*ApiDef_Arg) XXX_DiscardUnknown

func (m *ApiDef_Arg) XXX_DiscardUnknown()

func (*ApiDef_Arg) XXX_Marshal

func (m *ApiDef_Arg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ApiDef_Arg) XXX_Merge

func (m *ApiDef_Arg) XXX_Merge(src proto.Message)

func (*ApiDef_Arg) XXX_Size

func (m *ApiDef_Arg) XXX_Size() int

func (*ApiDef_Arg) XXX_Unmarshal

func (m *ApiDef_Arg) XXX_Unmarshal(b []byte) error

type ApiDef_Attr

type ApiDef_Attr struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Change the name used to access this attr in the API from what
	// is used in the GraphDef.  Note that these names in `backticks`
	// will also be replaced in the summary & description fields.
	RenameTo string `protobuf:"bytes,2,opt,name=rename_to,json=renameTo,proto3" json:"rename_to,omitempty"`
	// Specify a new default value to use for this attr.  This default
	// will be used when creating new graphs, as opposed to the
	// default in the OpDef, which will be used when interpreting old
	// GraphDefs.
	DefaultValue *attr_value_go_proto.AttrValue `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	// Note: this will replace any inherited attr doc, there is no current
	// way of modifying attr descriptions as can be done with op descriptions.
	Description          string   `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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 (*ApiDef_Attr) Descriptor

func (*ApiDef_Attr) Descriptor() ([]byte, []int)

func (*ApiDef_Attr) GetDefaultValue

func (m *ApiDef_Attr) GetDefaultValue() *attr_value_go_proto.AttrValue

func (*ApiDef_Attr) GetDescription

func (m *ApiDef_Attr) GetDescription() string

func (*ApiDef_Attr) GetName

func (m *ApiDef_Attr) GetName() string

func (*ApiDef_Attr) GetRenameTo

func (m *ApiDef_Attr) GetRenameTo() string

func (*ApiDef_Attr) ProtoMessage

func (*ApiDef_Attr) ProtoMessage()

func (*ApiDef_Attr) Reset

func (m *ApiDef_Attr) Reset()

func (*ApiDef_Attr) String

func (m *ApiDef_Attr) String() string

func (*ApiDef_Attr) XXX_DiscardUnknown

func (m *ApiDef_Attr) XXX_DiscardUnknown()

func (*ApiDef_Attr) XXX_Marshal

func (m *ApiDef_Attr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ApiDef_Attr) XXX_Merge

func (m *ApiDef_Attr) XXX_Merge(src proto.Message)

func (*ApiDef_Attr) XXX_Size

func (m *ApiDef_Attr) XXX_Size() int

func (*ApiDef_Attr) XXX_Unmarshal

func (m *ApiDef_Attr) XXX_Unmarshal(b []byte) error

type ApiDef_Endpoint

type ApiDef_Endpoint struct {
	// Name should be either like "CamelCaseName" or
	// "Package.CamelCaseName". Client-language-specific ApiDefs may
	// use a snake_case convention instead of CamelCase.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Set if this endpoint is deprecated. If set to true, a message suggesting
	// to use a non-deprecated endpoint instead will be printed. If all
	// endpoints are deprecated, set deprecation_message in ApiDef instead.
	Deprecated bool `protobuf:"varint,3,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
	// Major version when an endpoint will be deleted. For e.g. set this
	// value to 2 if endpoint should be removed in TensorFlow 2.0 and
	// deprecated in versions before that.
	DeprecationVersion   int32    `protobuf:"varint,4,opt,name=deprecation_version,json=deprecationVersion,proto3" json:"deprecation_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

If you specify any endpoint, this will replace all of the inherited endpoints. The first endpoint should be the "canonical" endpoint, and should not be deprecated (unless all endpoints are deprecated).

func (*ApiDef_Endpoint) Descriptor

func (*ApiDef_Endpoint) Descriptor() ([]byte, []int)

func (*ApiDef_Endpoint) GetDeprecated

func (m *ApiDef_Endpoint) GetDeprecated() bool

func (*ApiDef_Endpoint) GetDeprecationVersion

func (m *ApiDef_Endpoint) GetDeprecationVersion() int32

func (*ApiDef_Endpoint) GetName

func (m *ApiDef_Endpoint) GetName() string

func (*ApiDef_Endpoint) ProtoMessage

func (*ApiDef_Endpoint) ProtoMessage()

func (*ApiDef_Endpoint) Reset

func (m *ApiDef_Endpoint) Reset()

func (*ApiDef_Endpoint) String

func (m *ApiDef_Endpoint) String() string

func (*ApiDef_Endpoint) XXX_DiscardUnknown

func (m *ApiDef_Endpoint) XXX_DiscardUnknown()

func (*ApiDef_Endpoint) XXX_Marshal

func (m *ApiDef_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ApiDef_Endpoint) XXX_Merge

func (m *ApiDef_Endpoint) XXX_Merge(src proto.Message)

func (*ApiDef_Endpoint) XXX_Size

func (m *ApiDef_Endpoint) XXX_Size() int

func (*ApiDef_Endpoint) XXX_Unmarshal

func (m *ApiDef_Endpoint) XXX_Unmarshal(b []byte) error

type ApiDef_Visibility

type ApiDef_Visibility int32
const (
	// Normally this is "VISIBLE" unless you are inheriting a
	// different value from another ApiDef.
	ApiDef_DEFAULT_VISIBILITY ApiDef_Visibility = 0
	// Publicly visible in the API.
	ApiDef_VISIBLE ApiDef_Visibility = 1
	// Do not include this op in the generated API. If visibility is
	// set to 'SKIP', other fields are ignored for this op.
	ApiDef_SKIP ApiDef_Visibility = 2
	// Hide this op by putting it into an internal namespace (or whatever
	// is appropriate in the target language).
	ApiDef_HIDDEN ApiDef_Visibility = 3
)

func (ApiDef_Visibility) EnumDescriptor

func (ApiDef_Visibility) EnumDescriptor() ([]byte, []int)

func (ApiDef_Visibility) String

func (x ApiDef_Visibility) String() string

type ApiDefs

type ApiDefs struct {
	Op                   []*ApiDef `protobuf:"bytes,1,rep,name=op,proto3" json:"op,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ApiDefs) Descriptor

func (*ApiDefs) Descriptor() ([]byte, []int)

func (*ApiDefs) GetOp

func (m *ApiDefs) GetOp() []*ApiDef

func (*ApiDefs) ProtoMessage

func (*ApiDefs) ProtoMessage()

func (*ApiDefs) Reset

func (m *ApiDefs) Reset()

func (*ApiDefs) String

func (m *ApiDefs) String() string

func (*ApiDefs) XXX_DiscardUnknown

func (m *ApiDefs) XXX_DiscardUnknown()

func (*ApiDefs) XXX_Marshal

func (m *ApiDefs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ApiDefs) XXX_Merge

func (m *ApiDefs) XXX_Merge(src proto.Message)

func (*ApiDefs) XXX_Size

func (m *ApiDefs) XXX_Size() int

func (*ApiDefs) XXX_Unmarshal

func (m *ApiDefs) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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