Class MetaGraphDef

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.framework.MetaGraphDef
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, MetaGraphDefOrBuilder

public final class MetaGraphDef extends com.google.protobuf.GeneratedMessageV3 implements MetaGraphDefOrBuilder
 Protocol buffer containing the following which are necessary to restart
 training, run inference. It can be used to serialize/de-serialize memory
 objects necessary for running computation in a graph when crossing the
 process boundary. It can be used for long term storage of graphs,
 cross-language execution of graphs, etc.
   MetaInfoDef
   GraphDef
   SaverDef
   CollectionDef
   TensorInfo
   SignatureDef
 
Protobuf type tensorflow.MetaGraphDef
See Also:
  • Field Details

    • META_INFO_DEF_FIELD_NUMBER

      public static final int META_INFO_DEF_FIELD_NUMBER
      See Also:
    • GRAPH_DEF_FIELD_NUMBER

      public static final int GRAPH_DEF_FIELD_NUMBER
      See Also:
    • SAVER_DEF_FIELD_NUMBER

      public static final int SAVER_DEF_FIELD_NUMBER
      See Also:
    • COLLECTION_DEF_FIELD_NUMBER

      public static final int COLLECTION_DEF_FIELD_NUMBER
      See Also:
    • SIGNATURE_DEF_FIELD_NUMBER

      public static final int SIGNATURE_DEF_FIELD_NUMBER
      See Also:
    • ASSET_FILE_DEF_FIELD_NUMBER

      public static final int ASSET_FILE_DEF_FIELD_NUMBER
      See Also:
    • OBJECT_GRAPH_DEF_FIELD_NUMBER

      public static final int OBJECT_GRAPH_DEF_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasMetaInfoDef

      public boolean hasMetaInfoDef()
      .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
      Specified by:
      hasMetaInfoDef in interface MetaGraphDefOrBuilder
      Returns:
      Whether the metaInfoDef field is set.
    • getMetaInfoDef

      public MetaGraphDef.MetaInfoDef getMetaInfoDef()
      .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
      Specified by:
      getMetaInfoDef in interface MetaGraphDefOrBuilder
      Returns:
      The metaInfoDef.
    • getMetaInfoDefOrBuilder

      public MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBuilder()
      .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
      Specified by:
      getMetaInfoDefOrBuilder in interface MetaGraphDefOrBuilder
    • hasGraphDef

      public boolean hasGraphDef()
       GraphDef.
       
      .tensorflow.GraphDef graph_def = 2;
      Specified by:
      hasGraphDef in interface MetaGraphDefOrBuilder
      Returns:
      Whether the graphDef field is set.
    • getGraphDef

      public GraphDef getGraphDef()
       GraphDef.
       
      .tensorflow.GraphDef graph_def = 2;
      Specified by:
      getGraphDef in interface MetaGraphDefOrBuilder
      Returns:
      The graphDef.
    • getGraphDefOrBuilder

      public GraphDefOrBuilder getGraphDefOrBuilder()
       GraphDef.
       
      .tensorflow.GraphDef graph_def = 2;
      Specified by:
      getGraphDefOrBuilder in interface MetaGraphDefOrBuilder
    • hasSaverDef

      public boolean hasSaverDef()
       SaverDef.
       
      .tensorflow.SaverDef saver_def = 3;
      Specified by:
      hasSaverDef in interface MetaGraphDefOrBuilder
      Returns:
      Whether the saverDef field is set.
    • getSaverDef

      public SaverDef getSaverDef()
       SaverDef.
       
      .tensorflow.SaverDef saver_def = 3;
      Specified by:
      getSaverDef in interface MetaGraphDefOrBuilder
      Returns:
      The saverDef.
    • getSaverDefOrBuilder

      public SaverDefOrBuilder getSaverDefOrBuilder()
       SaverDef.
       
      .tensorflow.SaverDef saver_def = 3;
      Specified by:
      getSaverDefOrBuilder in interface MetaGraphDefOrBuilder
    • getCollectionDefCount

      public int getCollectionDefCount()
      Description copied from interface: MetaGraphDefOrBuilder
       collection_def: Map from collection name to collections.
       See CollectionDef section for details.
       
      map<string, .tensorflow.CollectionDef> collection_def = 4;
      Specified by:
      getCollectionDefCount in interface MetaGraphDefOrBuilder
    • containsCollectionDef

      public boolean containsCollectionDef(String key)
       collection_def: Map from collection name to collections.
       See CollectionDef section for details.
       
      map<string, .tensorflow.CollectionDef> collection_def = 4;
      Specified by:
      containsCollectionDef in interface MetaGraphDefOrBuilder
    • getCollectionDef

      @Deprecated public Map<String,CollectionDef> getCollectionDef()
      Deprecated.
      Specified by:
      getCollectionDef in interface MetaGraphDefOrBuilder
    • getCollectionDefMap

      public Map<String,CollectionDef> getCollectionDefMap()
       collection_def: Map from collection name to collections.
       See CollectionDef section for details.
       
      map<string, .tensorflow.CollectionDef> collection_def = 4;
      Specified by:
      getCollectionDefMap in interface MetaGraphDefOrBuilder
    • getCollectionDefOrDefault

      public CollectionDef getCollectionDefOrDefault(String key, CollectionDef defaultValue)
       collection_def: Map from collection name to collections.
       See CollectionDef section for details.
       
      map<string, .tensorflow.CollectionDef> collection_def = 4;
      Specified by:
      getCollectionDefOrDefault in interface MetaGraphDefOrBuilder
    • getCollectionDefOrThrow

      public CollectionDef getCollectionDefOrThrow(String key)
       collection_def: Map from collection name to collections.
       See CollectionDef section for details.
       
      map<string, .tensorflow.CollectionDef> collection_def = 4;
      Specified by:
      getCollectionDefOrThrow in interface MetaGraphDefOrBuilder
    • getSignatureDefCount

      public int getSignatureDefCount()
      Description copied from interface: MetaGraphDefOrBuilder
       signature_def: Map from user supplied key for a signature to a single
       SignatureDef.
       
      map<string, .tensorflow.SignatureDef> signature_def = 5;
      Specified by:
      getSignatureDefCount in interface MetaGraphDefOrBuilder
    • containsSignatureDef

      public boolean containsSignatureDef(String key)
       signature_def: Map from user supplied key for a signature to a single
       SignatureDef.
       
      map<string, .tensorflow.SignatureDef> signature_def = 5;
      Specified by:
      containsSignatureDef in interface MetaGraphDefOrBuilder
    • getSignatureDef

      @Deprecated public Map<String,SignatureDef> getSignatureDef()
      Deprecated.
      Specified by:
      getSignatureDef in interface MetaGraphDefOrBuilder
    • getSignatureDefMap

      public Map<String,SignatureDef> getSignatureDefMap()
       signature_def: Map from user supplied key for a signature to a single
       SignatureDef.
       
      map<string, .tensorflow.SignatureDef> signature_def = 5;
      Specified by:
      getSignatureDefMap in interface MetaGraphDefOrBuilder
    • getSignatureDefOrDefault

      public SignatureDef getSignatureDefOrDefault(String key, SignatureDef defaultValue)
       signature_def: Map from user supplied key for a signature to a single
       SignatureDef.
       
      map<string, .tensorflow.SignatureDef> signature_def = 5;
      Specified by:
      getSignatureDefOrDefault in interface MetaGraphDefOrBuilder
    • getSignatureDefOrThrow

      public SignatureDef getSignatureDefOrThrow(String key)
       signature_def: Map from user supplied key for a signature to a single
       SignatureDef.
       
      map<string, .tensorflow.SignatureDef> signature_def = 5;
      Specified by:
      getSignatureDefOrThrow in interface MetaGraphDefOrBuilder
    • getAssetFileDefList

      public List<AssetFileDef> getAssetFileDefList()
       Asset file def to be used with the defined graph.
       
      repeated .tensorflow.AssetFileDef asset_file_def = 6;
      Specified by:
      getAssetFileDefList in interface MetaGraphDefOrBuilder
    • getAssetFileDefOrBuilderList

      public List<? extends AssetFileDefOrBuilder> getAssetFileDefOrBuilderList()
       Asset file def to be used with the defined graph.
       
      repeated .tensorflow.AssetFileDef asset_file_def = 6;
      Specified by:
      getAssetFileDefOrBuilderList in interface MetaGraphDefOrBuilder
    • getAssetFileDefCount

      public int getAssetFileDefCount()
       Asset file def to be used with the defined graph.
       
      repeated .tensorflow.AssetFileDef asset_file_def = 6;
      Specified by:
      getAssetFileDefCount in interface MetaGraphDefOrBuilder
    • getAssetFileDef

      public AssetFileDef getAssetFileDef(int index)
       Asset file def to be used with the defined graph.
       
      repeated .tensorflow.AssetFileDef asset_file_def = 6;
      Specified by:
      getAssetFileDef in interface MetaGraphDefOrBuilder
    • getAssetFileDefOrBuilder

      public AssetFileDefOrBuilder getAssetFileDefOrBuilder(int index)
       Asset file def to be used with the defined graph.
       
      repeated .tensorflow.AssetFileDef asset_file_def = 6;
      Specified by:
      getAssetFileDefOrBuilder in interface MetaGraphDefOrBuilder
    • hasObjectGraphDef

      public boolean hasObjectGraphDef()
       Extra information about the structure of functions and stateful objects.
       
      .tensorflow.SavedObjectGraph object_graph_def = 7;
      Specified by:
      hasObjectGraphDef in interface MetaGraphDefOrBuilder
      Returns:
      Whether the objectGraphDef field is set.
    • getObjectGraphDef

      public SavedObjectGraphOuterClass.SavedObjectGraph getObjectGraphDef()
       Extra information about the structure of functions and stateful objects.
       
      .tensorflow.SavedObjectGraph object_graph_def = 7;
      Specified by:
      getObjectGraphDef in interface MetaGraphDefOrBuilder
      Returns:
      The objectGraphDef.
    • getObjectGraphDefOrBuilder

      public SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder getObjectGraphDefOrBuilder()
       Extra information about the structure of functions and stateful objects.
       
      .tensorflow.SavedObjectGraph object_graph_def = 7;
      Specified by:
      getObjectGraphDefOrBuilder in interface MetaGraphDefOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static MetaGraphDef parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MetaGraphDef parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MetaGraphDef parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MetaGraphDef parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MetaGraphDef parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MetaGraphDef parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MetaGraphDef parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public MetaGraphDef.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static MetaGraphDef.Builder newBuilder()
    • newBuilder

      public static MetaGraphDef.Builder newBuilder(MetaGraphDef prototype)
    • toBuilder

      public MetaGraphDef.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected MetaGraphDef.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static MetaGraphDef getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<MetaGraphDef> parser()
    • getParserForType

      public com.google.protobuf.Parser<MetaGraphDef> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public MetaGraphDef getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder