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)
tensorflow.CollectionDef
सार्वजनिक तरीके
कलेक्शनडेफ़.बिल्डर | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड, ऑब्जेक्ट मान) |
कलेक्शनडिफ़ | निर्माण () |
कलेक्शनडिफ़ | बिल्डआंशिक () |
कलेक्शनडेफ़.बिल्डर | स्पष्ट () |
कलेक्शनडेफ़.बिल्डर | किसी भी सूची को साफ़ करें () .tensorflow.CollectionDef.AnyList any_list = 5; |
कलेक्शनडेफ़.बिल्डर | क्लियरबाइट्सलिस्ट () .tensorflow.CollectionDef.BytesList bytes_list = 2; |
कलेक्शनडेफ़.बिल्डर | क्लियरफ़ील्ड (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड) |
कलेक्शनडेफ़.बिल्डर | क्लियरफ्लोटलिस्ट () .tensorflow.CollectionDef.FloatList float_list = 4; |
कलेक्शनडेफ़.बिल्डर | ClearInt64List () .tensorflow.CollectionDef.Int64List int64_list = 3; |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | क्लियरनोडलिस्ट () .tensorflow.CollectionDef.NodeList node_list = 1; |
कलेक्शनडेफ़.बिल्डर | ClearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
कलेक्शनडेफ़.बिल्डर | क्लोन () |
CollectionDef.AnyList | कोई भी सूची प्राप्त करें () .tensorflow.CollectionDef.AnyList any_list = 5; |
CollectionDef.AnyList.बिल्डर | getAnyListBuilder () .tensorflow.CollectionDef.AnyList any_list = 5; |
CollectionDef.AnyListOrBuilder | getAnyListOrBuilder () .tensorflow.CollectionDef.AnyList any_list = 5; |
CollectionDef.बाइट्सलिस्ट | getBytesसूची () .tensorflow.CollectionDef.BytesList bytes_list = 2; |
CollectionDef.BytesList.बिल्डर | getBytesListBuilder () .tensorflow.CollectionDef.BytesList bytes_list = 2; |
CollectionDef.BytesListOrBuilder | getBytesListOrBuilder () .tensorflow.CollectionDef.BytesList bytes_list = 2; |
कलेक्शनडिफ़ | |
अंतिम स्थिर com.google.protobuf.Descriptors.Descriptor | |
com.google.protobuf.Descriptors.Descriptor | |
CollectionDef.FloatList | फ़्लोटलिस्ट प्राप्त करें () .tensorflow.CollectionDef.FloatList float_list = 4; |
CollectionDef.FloatList.बिल्डर | getFloatListBuilder () .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.Int64List.बिल्डर | getInt64ListBuilder () .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.NodeList.बिल्डर | getNodeListBuilder () .tensorflow.CollectionDef.NodeList node_list = 1; |
CollectionDef.NodeListOrBuilder | getNodeListOrBuilder () .tensorflow.CollectionDef.NodeList node_list = 1; |
बूलियन | hasAnyList () .tensorflow.CollectionDef.AnyList any_list = 5; |
बूलियन | हैबाइट्सलिस्ट () .tensorflow.CollectionDef.BytesList bytes_list = 2; |
बूलियन | हैफ्लोटलिस्ट () .tensorflow.CollectionDef.FloatList float_list = 4; |
बूलियन | hasInt64List () .tensorflow.CollectionDef.Int64List int64_list = 3; |
बूलियन | hasNodeList () .tensorflow.CollectionDef.NodeList node_list = 1; |
अंतिम बूलियन | |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | मर्जफ्रॉम (com.google.protobuf.Message अन्य) |
कलेक्शनडेफ़.बिल्डर | मर्जफ्रॉम (com.google.protobuf.CodedInputStream इनपुट, com.google.protobuf.ExtensionRegistryLite एक्सटेंशनरजिस्ट्री) |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | |
अंतिम CollectionDef.बिल्डर | मर्जअज्ञातफ़ील्ड्स (com.google.protobuf.UnknownFieldSet अज्ञातफ़ील्ड्स) |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | setAnyList ( CollectionDef.AnyList.Builder BuilderForValue) .tensorflow.CollectionDef.AnyList any_list = 5; |
कलेक्शनडेफ़.बिल्डर | सेटबाइट्सलिस्ट ( CollectionDef.BytesList.Builder BuilderForValue) .tensorflow.CollectionDef.BytesList bytes_list = 2; |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | सेटफ़ील्ड (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड, ऑब्जेक्ट मान) |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | सेटफ्लोटलिस्ट ( CollectionDef.FloatList.Builder BuilderForValue) .tensorflow.CollectionDef.FloatList float_list = 4; |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | setInt64List ( CollectionDef.Int64List.Builder BuilderForValue) .tensorflow.CollectionDef.Int64List int64_list = 3; |
कलेक्शनडेफ़.बिल्डर | setNodeList ( CollectionDef.NodeList.Builder BuilderForValue) .tensorflow.CollectionDef.NodeList node_list = 1; |
कलेक्शनडेफ़.बिल्डर | |
कलेक्शनडेफ़.बिल्डर | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड, इंट इंडेक्स, ऑब्जेक्ट वैल्यू) |
अंतिम CollectionDef.बिल्डर | अज्ञात फ़ील्ड सेट करें (com.google.protobuf. अज्ञात फ़ील्ड सेट अज्ञात फ़ील्ड) |
विरासत में मिले तरीके
सार्वजनिक तरीके
सार्वजनिक CollectionDef.Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड, ऑब्जेक्ट मान)
सार्वजनिक संग्रहडिफ़.बिल्डर क्लियरबाइट्सलिस्ट ()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक CollectionDef.Builder ClearInt64List ()
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.AnyList.Builder getAnyListBuilder ()
.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.BytesList.Builder getBytesListBuilder ()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक CollectionDef.BytesListOrBuilder getBytesListOrBuilder ()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक स्थैतिक अंतिम com.google.protobuf.Descriptors.Descriptor getDescriptor ()
सार्वजनिक com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
सार्वजनिक CollectionDef.FloatList getFloatList ()
.tensorflow.CollectionDef.FloatList float_list = 4;
सार्वजनिक CollectionDef.FloatList.Builder getFloatListBuilder ()
.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.Int64List.Builder getInt64ListBuilder ()
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder ()
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.NodeList.Builder getNodeListBuilder ()
.tensorflow.CollectionDef.NodeList node_list = 1;
सार्वजनिक CollectionDef.NodeListOrBuilder getNodeListOrBuilder ()
.tensorflow.CollectionDef.NodeList node_list = 1;
सार्वजनिक बूलियन hasAnyList ()
.tensorflow.CollectionDef.AnyList any_list = 5;
सार्वजनिक बूलियन hasBytesList ()
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक बूलियन hasFloatList ()
.tensorflow.CollectionDef.FloatList float_list = 4;
सार्वजनिक बूलियन hasInt64List ()
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक बूलियन hasNodeList ()
.tensorflow.CollectionDef.NodeList node_list = 1;
सार्वजनिक अंतिम बूलियन आरंभीकृत है ()
सार्वजनिक CollectionDef.Builder mergeAnyList ( CollectionDef.AnyList मान)
.tensorflow.CollectionDef.AnyList any_list = 5;
सार्वजनिक CollectionDef.Builder mergeBytesList ( CollectionDef.BytesList मान)
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक CollectionDef.Builder mergeFloatList ( CollectionDef.FloatList मान)
.tensorflow.CollectionDef.FloatList float_list = 4;
सार्वजनिक CollectionDef.Builder mergeFrom (com.google.protobuf.CodedInputStream इनपुट, com.google.protobuf.ExtensionRegistryLite एक्सटेंशनरजिस्ट्री)
फेंकता
आईओएक्सेप्शन |
---|
सार्वजनिक CollectionDef.Builder mergeInt64List ( CollectionDef.Int64List मान)
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.Builder mergeNodeList ( CollectionDef.NodeList मान)
.tensorflow.CollectionDef.NodeList node_list = 1;
सार्वजनिक अंतिम CollectionDef.Builder mergeUnknownFields (com.google.protobuf.UnknownFieldSet अज्ञातFields)
सार्वजनिक CollectionDef.Builder setAnyList ( CollectionDef.AnyList मान)
.tensorflow.CollectionDef.AnyList any_list = 5;
सार्वजनिक CollectionDef.Builder setAnyList ( CollectionDef.AnyList.Builder BuilderForValue)
.tensorflow.CollectionDef.AnyList any_list = 5;
सार्वजनिक CollectionDef.Builder setBytesList ( CollectionDef.BytesList.Builder BuilderForValue)
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक CollectionDef.Builder setBytesList ( CollectionDef.BytesList मान)
.tensorflow.CollectionDef.BytesList bytes_list = 2;
सार्वजनिक CollectionDef.Builder सेटफ़ील्ड (com.google.protobuf.Descriptors.FieldDescriptor फ़ील्ड, ऑब्जेक्ट मान)
सार्वजनिक CollectionDef.Builder setFloatList ( CollectionDef.FloatList मान)
.tensorflow.CollectionDef.FloatList float_list = 4;
सार्वजनिक CollectionDef.Builder setFloatList ( CollectionDef.FloatList.Builder BuilderForValue)
.tensorflow.CollectionDef.FloatList float_list = 4;
सार्वजनिक CollectionDef.Builder setInt64List ( CollectionDef.Int64List मान)
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.Builder setInt64List ( CollectionDef.Int64List.Builder BuilderForValue)
.tensorflow.CollectionDef.Int64List int64_list = 3;
सार्वजनिक CollectionDef.Builder setNodeList ( CollectionDef.NodeList.Builder BuilderForValue)
.tensorflow.CollectionDef.NodeList node_list = 1;
सार्वजनिक CollectionDef.Builder setNodeList ( CollectionDef.NodeList मान)
.tensorflow.CollectionDef.NodeList node_list = 1;