public final class CollectionDef extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements CollectionDefOrBuilder
CollectionDef should cover most collections. To add a user-defined collection, do one of the following: 1. For simple data types, such as string, int, float: tf.add_to_collection("your_collection_name", your_simple_value) strings will be stored as bytes_list. 2. For Protobuf types, there are three ways to add them: 1) tf.add_to_collection("your_collection_name", your_proto.SerializeToString()) collection_def { key: "user_defined_bytes_collection" value { bytes_list { value: "queue_name: \"test_queue\"\n" } } } or 2) tf.add_to_collection("your_collection_name", str(your_proto)) collection_def { key: "user_defined_string_collection" value { bytes_list { value: "\n\ntest_queue" } } } or 3) any_buf = any_pb2.Any() tf.add_to_collection("your_collection_name", any_buf.Pack(your_proto)) collection_def { key: "user_defined_any_collection" value { any_list { value { type_url: "type.googleapis.com/tensorflow.QueueRunnerDef" value: "\n\ntest_queue" } } } } 3. For Python objects, implement to_proto() and from_proto(), and register them in the following manner: ops.register_proto_function("your_collection_name", proto_type, to_proto=YourPythonObject.to_proto, from_proto=YourPythonObject.from_proto) These functions will be invoked to serialize and de-serialize the collection. For example, ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES, proto_type=variable_pb2.VariableDef, to_proto=Variable.to_proto, from_proto=Variable.from_proto)Protobuf type
tensorflow.CollectionDef
Modifier and Type | Class and Description |
---|---|
static class |
CollectionDef.AnyList
AnyList is used for collecting Any protos.
|
static interface |
CollectionDef.AnyListOrBuilder |
static class |
CollectionDef.Builder
CollectionDef should cover most collections.
|
static class |
CollectionDef.BytesList
BytesList is used for collecting strings and serialized protobufs.
|
static interface |
CollectionDef.BytesListOrBuilder |
static class |
CollectionDef.FloatList
FloatList is used for collecting float values.
|
static interface |
CollectionDef.FloatListOrBuilder |
static class |
CollectionDef.Int64List
Int64List is used for collecting int, int64 and long values.
|
static interface |
CollectionDef.Int64ListOrBuilder |
static class |
CollectionDef.KindCase |
static class |
CollectionDef.NodeList
NodeList is used for collecting nodes in graph.
|
static interface |
CollectionDef.NodeListOrBuilder |
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable, org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
ANY_LIST_FIELD_NUMBER |
static int |
BYTES_LIST_FIELD_NUMBER |
static int |
FLOAT_LIST_FIELD_NUMBER |
static int |
INT64_LIST_FIELD_NUMBER |
static int |
NODE_LIST_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
CollectionDef.AnyList |
getAnyList()
.tensorflow.CollectionDef.AnyList any_list = 5; |
CollectionDef.AnyListOrBuilder |
getAnyListOrBuilder()
.tensorflow.CollectionDef.AnyList any_list = 5; |
CollectionDef.BytesList |
getBytesList()
.tensorflow.CollectionDef.BytesList bytes_list = 2; |
CollectionDef.BytesListOrBuilder |
getBytesListOrBuilder()
.tensorflow.CollectionDef.BytesList bytes_list = 2; |
static CollectionDef |
getDefaultInstance() |
CollectionDef |
getDefaultInstanceForType() |
static org.nd4j.shade.protobuf.Descriptors.Descriptor |
getDescriptor() |
CollectionDef.FloatList |
getFloatList()
.tensorflow.CollectionDef.FloatList float_list = 4; |
CollectionDef.FloatListOrBuilder |
getFloatListOrBuilder()
.tensorflow.CollectionDef.FloatList float_list = 4; |
CollectionDef.Int64List |
getInt64List()
.tensorflow.CollectionDef.Int64List int64_list = 3; |
CollectionDef.Int64ListOrBuilder |
getInt64ListOrBuilder()
.tensorflow.CollectionDef.Int64List int64_list = 3; |
CollectionDef.KindCase |
getKindCase() |
CollectionDef.NodeList |
getNodeList()
.tensorflow.CollectionDef.NodeList node_list = 1; |
CollectionDef.NodeListOrBuilder |
getNodeListOrBuilder()
.tensorflow.CollectionDef.NodeList node_list = 1; |
org.nd4j.shade.protobuf.Parser<CollectionDef> |
getParserForType() |
int |
getSerializedSize() |
org.nd4j.shade.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAnyList()
.tensorflow.CollectionDef.AnyList any_list = 5; |
boolean |
hasBytesList()
.tensorflow.CollectionDef.BytesList bytes_list = 2; |
boolean |
hasFloatList()
.tensorflow.CollectionDef.FloatList float_list = 4; |
int |
hashCode() |
boolean |
hasInt64List()
.tensorflow.CollectionDef.Int64List int64_list = 3; |
boolean |
hasNodeList()
.tensorflow.CollectionDef.NodeList node_list = 1; |
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static CollectionDef.Builder |
newBuilder() |
static CollectionDef.Builder |
newBuilder(CollectionDef prototype) |
CollectionDef.Builder |
newBuilderForType() |
protected CollectionDef.Builder |
newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) |
static CollectionDef |
parseDelimitedFrom(InputStream input) |
static CollectionDef |
parseDelimitedFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static CollectionDef |
parseFrom(byte[] data) |
static CollectionDef |
parseFrom(byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static CollectionDef |
parseFrom(ByteBuffer data) |
static CollectionDef |
parseFrom(ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static CollectionDef |
parseFrom(org.nd4j.shade.protobuf.ByteString data) |
static CollectionDef |
parseFrom(org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static CollectionDef |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) |
static CollectionDef |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static CollectionDef |
parseFrom(InputStream input) |
static CollectionDef |
parseFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static org.nd4j.shade.protobuf.Parser<CollectionDef> |
parser() |
CollectionDef.Builder |
toBuilder() |
void |
writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newInstance, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, getSerializedSizeInternal, isInitializedInternal, makeImmutableInternal, mergeFromInternal, toByteArray, toByteString, writeDelimitedTo, writeTo, writeToInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int NODE_LIST_FIELD_NUMBER
public static final int BYTES_LIST_FIELD_NUMBER
public static final int INT64_LIST_FIELD_NUMBER
public static final int FLOAT_LIST_FIELD_NUMBER
public static final int ANY_LIST_FIELD_NUMBER
public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface org.nd4j.shade.protobuf.MessageOrBuilder
getUnknownFields
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public CollectionDef.KindCase getKindCase()
getKindCase
in interface CollectionDefOrBuilder
public boolean hasNodeList()
.tensorflow.CollectionDef.NodeList node_list = 1;
hasNodeList
in interface CollectionDefOrBuilder
public CollectionDef.NodeList getNodeList()
.tensorflow.CollectionDef.NodeList node_list = 1;
getNodeList
in interface CollectionDefOrBuilder
public CollectionDef.NodeListOrBuilder getNodeListOrBuilder()
.tensorflow.CollectionDef.NodeList node_list = 1;
getNodeListOrBuilder
in interface CollectionDefOrBuilder
public boolean hasBytesList()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
hasBytesList
in interface CollectionDefOrBuilder
public CollectionDef.BytesList getBytesList()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
getBytesList
in interface CollectionDefOrBuilder
public CollectionDef.BytesListOrBuilder getBytesListOrBuilder()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
getBytesListOrBuilder
in interface CollectionDefOrBuilder
public boolean hasInt64List()
.tensorflow.CollectionDef.Int64List int64_list = 3;
hasInt64List
in interface CollectionDefOrBuilder
public CollectionDef.Int64List getInt64List()
.tensorflow.CollectionDef.Int64List int64_list = 3;
getInt64List
in interface CollectionDefOrBuilder
public CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder()
.tensorflow.CollectionDef.Int64List int64_list = 3;
getInt64ListOrBuilder
in interface CollectionDefOrBuilder
public boolean hasFloatList()
.tensorflow.CollectionDef.FloatList float_list = 4;
hasFloatList
in interface CollectionDefOrBuilder
public CollectionDef.FloatList getFloatList()
.tensorflow.CollectionDef.FloatList float_list = 4;
getFloatList
in interface CollectionDefOrBuilder
public CollectionDef.FloatListOrBuilder getFloatListOrBuilder()
.tensorflow.CollectionDef.FloatList float_list = 4;
getFloatListOrBuilder
in interface CollectionDefOrBuilder
public boolean hasAnyList()
.tensorflow.CollectionDef.AnyList any_list = 5;
hasAnyList
in interface CollectionDefOrBuilder
public CollectionDef.AnyList getAnyList()
.tensorflow.CollectionDef.AnyList any_list = 5;
getAnyList
in interface CollectionDefOrBuilder
public CollectionDef.AnyListOrBuilder getAnyListOrBuilder()
.tensorflow.CollectionDef.AnyList any_list = 5;
getAnyListOrBuilder
in interface CollectionDefOrBuilder
public final boolean isInitialized()
isInitialized
in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
isInitialized
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface org.nd4j.shade.protobuf.MessageLite
writeTo
in class org.nd4j.shade.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface org.nd4j.shade.protobuf.MessageLite
getSerializedSize
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface org.nd4j.shade.protobuf.Message
equals
in class org.nd4j.shade.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface org.nd4j.shade.protobuf.Message
hashCode
in class org.nd4j.shade.protobuf.AbstractMessage
public static CollectionDef parseFrom(ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static CollectionDef parseFrom(InputStream input) throws IOException
IOException
public static CollectionDef parseFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static CollectionDef parseDelimitedFrom(InputStream input) throws IOException
IOException
public static CollectionDef parseDelimitedFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static CollectionDef parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) throws IOException
IOException
public static CollectionDef parseFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public CollectionDef.Builder newBuilderForType()
newBuilderForType
in interface org.nd4j.shade.protobuf.Message
newBuilderForType
in interface org.nd4j.shade.protobuf.MessageLite
public static CollectionDef.Builder newBuilder()
public static CollectionDef.Builder newBuilder(CollectionDef prototype)
public CollectionDef.Builder toBuilder()
toBuilder
in interface org.nd4j.shade.protobuf.Message
toBuilder
in interface org.nd4j.shade.protobuf.MessageLite
protected CollectionDef.Builder newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public static CollectionDef getDefaultInstance()
public static org.nd4j.shade.protobuf.Parser<CollectionDef> parser()
public org.nd4j.shade.protobuf.Parser<CollectionDef> getParserForType()
getParserForType
in interface org.nd4j.shade.protobuf.Message
getParserForType
in interface org.nd4j.shade.protobuf.MessageLite
getParserForType
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public CollectionDef getDefaultInstanceForType()
getDefaultInstanceForType
in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface org.nd4j.shade.protobuf.MessageOrBuilder
Copyright © 2019. All rights reserved.