Package org.platanios.tensorflow.proto
Class CollectionDef
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- org.platanios.tensorflow.proto.CollectionDef
-
- All Implemented Interfaces:
com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.io.Serializable
,CollectionDefOrBuilder
public final class CollectionDef extends com.google.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 typeorg.platanios.tensorflow.proto.CollectionDef
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
CollectionDef.AnyList
getAnyList()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
CollectionDef.AnyListOrBuilder
getAnyListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
CollectionDef.BytesList
getBytesList()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
CollectionDef.BytesListOrBuilder
getBytesListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
static CollectionDef
getDefaultInstance()
CollectionDef
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
CollectionDef.FloatList
getFloatList()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
CollectionDef.FloatListOrBuilder
getFloatListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
CollectionDef.Int64List
getInt64List()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
CollectionDef.Int64ListOrBuilder
getInt64ListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
CollectionDef.KindCase
getKindCase()
CollectionDef.NodeList
getNodeList()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
CollectionDef.NodeListOrBuilder
getNodeListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
com.google.protobuf.Parser<CollectionDef>
getParserForType()
int
getSerializedSize()
com.google.protobuf.UnknownFieldSet
getUnknownFields()
boolean
hasAnyList()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
boolean
hasBytesList()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
boolean
hasFloatList()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
int
hashCode()
boolean
hasInt64List()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
boolean
hasNodeList()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static CollectionDef.Builder
newBuilder()
static CollectionDef.Builder
newBuilder(CollectionDef prototype)
CollectionDef.Builder
newBuilderForType()
protected CollectionDef.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected java.lang.Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static CollectionDef
parseDelimitedFrom(java.io.InputStream input)
static CollectionDef
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CollectionDef
parseFrom(byte[] data)
static CollectionDef
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CollectionDef
parseFrom(com.google.protobuf.ByteString data)
static CollectionDef
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CollectionDef
parseFrom(com.google.protobuf.CodedInputStream input)
static CollectionDef
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CollectionDef
parseFrom(java.io.InputStream input)
static CollectionDef
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CollectionDef
parseFrom(java.nio.ByteBuffer data)
static CollectionDef
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<CollectionDef>
parser()
CollectionDef.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NODE_LIST_FIELD_NUMBER
public static final int NODE_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BYTES_LIST_FIELD_NUMBER
public static final int BYTES_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INT64_LIST_FIELD_NUMBER
public static final int INT64_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FLOAT_LIST_FIELD_NUMBER
public static final int FLOAT_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ANY_LIST_FIELD_NUMBER
public static final int ANY_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getKindCase
public CollectionDef.KindCase getKindCase()
- Specified by:
getKindCase
in interfaceCollectionDefOrBuilder
-
hasNodeList
public boolean hasNodeList()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
- Specified by:
hasNodeList
in interfaceCollectionDefOrBuilder
- Returns:
- Whether the nodeList field is set.
-
getNodeList
public CollectionDef.NodeList getNodeList()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
- Specified by:
getNodeList
in interfaceCollectionDefOrBuilder
- Returns:
- The nodeList.
-
getNodeListOrBuilder
public CollectionDef.NodeListOrBuilder getNodeListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.NodeList node_list = 1;
- Specified by:
getNodeListOrBuilder
in interfaceCollectionDefOrBuilder
-
hasBytesList
public boolean hasBytesList()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
- Specified by:
hasBytesList
in interfaceCollectionDefOrBuilder
- Returns:
- Whether the bytesList field is set.
-
getBytesList
public CollectionDef.BytesList getBytesList()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
- Specified by:
getBytesList
in interfaceCollectionDefOrBuilder
- Returns:
- The bytesList.
-
getBytesListOrBuilder
public CollectionDef.BytesListOrBuilder getBytesListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.BytesList bytes_list = 2;
- Specified by:
getBytesListOrBuilder
in interfaceCollectionDefOrBuilder
-
hasInt64List
public boolean hasInt64List()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
- Specified by:
hasInt64List
in interfaceCollectionDefOrBuilder
- Returns:
- Whether the int64List field is set.
-
getInt64List
public CollectionDef.Int64List getInt64List()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
- Specified by:
getInt64List
in interfaceCollectionDefOrBuilder
- Returns:
- The int64List.
-
getInt64ListOrBuilder
public CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.Int64List int64_list = 3;
- Specified by:
getInt64ListOrBuilder
in interfaceCollectionDefOrBuilder
-
hasFloatList
public boolean hasFloatList()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
- Specified by:
hasFloatList
in interfaceCollectionDefOrBuilder
- Returns:
- Whether the floatList field is set.
-
getFloatList
public CollectionDef.FloatList getFloatList()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
- Specified by:
getFloatList
in interfaceCollectionDefOrBuilder
- Returns:
- The floatList.
-
getFloatListOrBuilder
public CollectionDef.FloatListOrBuilder getFloatListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.FloatList float_list = 4;
- Specified by:
getFloatListOrBuilder
in interfaceCollectionDefOrBuilder
-
hasAnyList
public boolean hasAnyList()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
- Specified by:
hasAnyList
in interfaceCollectionDefOrBuilder
- Returns:
- Whether the anyList field is set.
-
getAnyList
public CollectionDef.AnyList getAnyList()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
- Specified by:
getAnyList
in interfaceCollectionDefOrBuilder
- Returns:
- The anyList.
-
getAnyListOrBuilder
public CollectionDef.AnyListOrBuilder getAnyListOrBuilder()
.org.platanios.tensorflow.proto.CollectionDef.AnyList any_list = 5;
- Specified by:
getAnyListOrBuilder
in interfaceCollectionDefOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CollectionDef parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CollectionDef parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static CollectionDef parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static CollectionDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static CollectionDef parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static CollectionDef parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static CollectionDef parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public CollectionDef.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CollectionDef.Builder newBuilder()
-
newBuilder
public static CollectionDef.Builder newBuilder(CollectionDef prototype)
-
toBuilder
public CollectionDef.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CollectionDef.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CollectionDef getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CollectionDef> parser()
-
getParserForType
public com.google.protobuf.Parser<CollectionDef> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CollectionDef getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-