Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/meta_graph.proto
package org.tensorflow.framework;
/**
*
* NOTE: This protocol buffer is evolving, and will go through revisions in the
* coming months.
* 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 {@code tensorflow.MetaGraphDef}
*/
public final class MetaGraphDef extends
com.github.os72.protobuf351.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef)
MetaGraphDefOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetaGraphDef.newBuilder() to construct.
private MetaGraphDef(com.github.os72.protobuf351.GeneratedMessageV3.Builder builder) {
super(builder);
}
private MetaGraphDef() {
assetFileDef_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.github.os72.protobuf351.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetaGraphDef(
com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.github.os72.protobuf351.UnknownFieldSet.Builder unknownFields =
com.github.os72.protobuf351.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.tensorflow.framework.MetaGraphDef.MetaInfoDef.Builder subBuilder = null;
if (metaInfoDef_ != null) {
subBuilder = metaInfoDef_.toBuilder();
}
metaInfoDef_ = input.readMessage(org.tensorflow.framework.MetaGraphDef.MetaInfoDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metaInfoDef_);
metaInfoDef_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.tensorflow.framework.GraphDef.Builder subBuilder = null;
if (graphDef_ != null) {
subBuilder = graphDef_.toBuilder();
}
graphDef_ = input.readMessage(org.tensorflow.framework.GraphDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(graphDef_);
graphDef_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.tensorflow.util.SaverDef.Builder subBuilder = null;
if (saverDef_ != null) {
subBuilder = saverDef_.toBuilder();
}
saverDef_ = input.readMessage(org.tensorflow.util.SaverDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(saverDef_);
saverDef_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
collectionDef_ = com.github.os72.protobuf351.MapField.newMapField(
CollectionDefDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000008;
}
com.github.os72.protobuf351.MapEntry
collectionDef__ = input.readMessage(
CollectionDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
collectionDef_.getMutableMap().put(
collectionDef__.getKey(), collectionDef__.getValue());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
signatureDef_ = com.github.os72.protobuf351.MapField.newMapField(
SignatureDefDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000010;
}
com.github.os72.protobuf351.MapEntry
signatureDef__ = input.readMessage(
SignatureDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
signatureDef_.getMutableMap().put(
signatureDef__.getKey(), signatureDef__.getValue());
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
assetFileDef_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
assetFileDef_.add(
input.readMessage(org.tensorflow.framework.AssetFileDef.parser(), extensionRegistry));
break;
}
}
}
} catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.github.os72.protobuf351.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
assetFileDef_ = java.util.Collections.unmodifiableList(assetFileDef_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.github.os72.protobuf351.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.github.os72.protobuf351.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetCollectionDef();
case 5:
return internalGetSignatureDef();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.MetaGraphDef.class, org.tensorflow.framework.MetaGraphDef.Builder.class);
}
public interface MetaInfoDefOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.MetaGraphDef.MetaInfoDef)
com.github.os72.protobuf351.MessageOrBuilder {
/**
*
* User specified Version string. Can be the name of the model and revision,
* steps this model has been trained to, etc.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* Meta information regarding the graph to be exported. To be used by users
* of this protocol buffer to encode information regarding their meta graph.
*
*
* Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef}
*/
public static final class MetaInfoDef extends
com.github.os72.protobuf351.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef.MetaInfoDef)
MetaInfoDefOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetaInfoDef.newBuilder() to construct.
private MetaInfoDef(com.github.os72.protobuf351.GeneratedMessageV3.Builder builder) {
super(builder);
}
private MetaInfoDef() {
metaGraphVersion_ = "";
tags_ = com.github.os72.protobuf351.LazyStringArrayList.EMPTY;
tensorflowVersion_ = "";
tensorflowGitVersion_ = "";
strippedDefaultAttrs_ = false;
}
@java.lang.Override
public final com.github.os72.protobuf351.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetaInfoDef(
com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.github.os72.protobuf351.UnknownFieldSet.Builder unknownFields =
com.github.os72.protobuf351.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
metaGraphVersion_ = s;
break;
}
case 18: {
org.tensorflow.framework.OpList.Builder subBuilder = null;
if (strippedOpList_ != null) {
subBuilder = strippedOpList_.toBuilder();
}
strippedOpList_ = input.readMessage(org.tensorflow.framework.OpList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(strippedOpList_);
strippedOpList_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.github.os72.protobuf351.Any.Builder subBuilder = null;
if (anyInfo_ != null) {
subBuilder = anyInfo_.toBuilder();
}
anyInfo_ = input.readMessage(com.github.os72.protobuf351.Any.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(anyInfo_);
anyInfo_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
tags_ = new com.github.os72.protobuf351.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
tags_.add(s);
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
tensorflowVersion_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
tensorflowGitVersion_ = s;
break;
}
case 56: {
strippedDefaultAttrs_ = input.readBool();
break;
}
}
}
} catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.github.os72.protobuf351.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
tags_ = tags_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.github.os72.protobuf351.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor;
}
protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.MetaGraphDef.MetaInfoDef.class, org.tensorflow.framework.MetaGraphDef.MetaInfoDef.Builder.class);
}
private int bitField0_;
public static final int META_GRAPH_VERSION_FIELD_NUMBER = 1;
private volatile java.lang.Object metaGraphVersion_;
/**
*
* User specified Version string. Can be the name of the model and revision,
* steps this model has been trained to, etc.
*
* A serialized protobuf. Can be the time this meta graph is created, or
* modified, or name of the model.
*
*
* .google.protobuf.Any any_info = 3;
*/
public com.github.os72.protobuf351.AnyOrBuilder getAnyInfoOrBuilder() {
return getAnyInfo();
}
public static final int TAGS_FIELD_NUMBER = 4;
private com.github.os72.protobuf351.LazyStringList tags_;
/**
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
*
* repeated string tags = 4;
*/
public int getTagsCount() {
return tags_.size();
}
/**
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
*
* repeated string tags = 4;
*/
public com.github.os72.protobuf351.ByteString
getTagsBytes(int index) {
return tags_.getByteString(index);
}
public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 5;
private volatile java.lang.Object tensorflowVersion_;
/**
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
*
* string tensorflow_version = 5;
*/
public com.github.os72.protobuf351.ByteString
getTensorflowVersionBytes() {
java.lang.Object ref = tensorflowVersion_;
if (ref instanceof java.lang.String) {
com.github.os72.protobuf351.ByteString b =
com.github.os72.protobuf351.ByteString.copyFromUtf8(
(java.lang.String) ref);
tensorflowVersion_ = b;
return b;
} else {
return (com.github.os72.protobuf351.ByteString) ref;
}
}
public static final int TENSORFLOW_GIT_VERSION_FIELD_NUMBER = 6;
private volatile java.lang.Object tensorflowGitVersion_;
/**
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
*
* string tensorflow_git_version = 6;
*/
public com.github.os72.protobuf351.ByteString
getTensorflowGitVersionBytes() {
java.lang.Object ref = tensorflowGitVersion_;
if (ref instanceof java.lang.String) {
com.github.os72.protobuf351.ByteString b =
com.github.os72.protobuf351.ByteString.copyFromUtf8(
(java.lang.String) ref);
tensorflowGitVersion_ = b;
return b;
} else {
return (com.github.os72.protobuf351.ByteString) ref;
}
}
public static final int STRIPPED_DEFAULT_ATTRS_FIELD_NUMBER = 7;
private boolean strippedDefaultAttrs_;
/**
*
* A flag to denote whether default-valued attrs have been stripped from
* the nodes in this graph_def.
*
*
* bool stripped_default_attrs = 7;
*/
public boolean getStrippedDefaultAttrs() {
return strippedDefaultAttrs_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.github.os72.protobuf351.CodedOutputStream output)
throws java.io.IOException {
if (!getMetaGraphVersionBytes().isEmpty()) {
com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 1, metaGraphVersion_);
}
if (strippedOpList_ != null) {
output.writeMessage(2, getStrippedOpList());
}
if (anyInfo_ != null) {
output.writeMessage(3, getAnyInfo());
}
for (int i = 0; i < tags_.size(); i++) {
com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 4, tags_.getRaw(i));
}
if (!getTensorflowVersionBytes().isEmpty()) {
com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 5, tensorflowVersion_);
}
if (!getTensorflowGitVersionBytes().isEmpty()) {
com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 6, tensorflowGitVersion_);
}
if (strippedDefaultAttrs_ != false) {
output.writeBool(7, strippedDefaultAttrs_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getMetaGraphVersionBytes().isEmpty()) {
size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(1, metaGraphVersion_);
}
if (strippedOpList_ != null) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(2, getStrippedOpList());
}
if (anyInfo_ != null) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(3, getAnyInfo());
}
{
int dataSize = 0;
for (int i = 0; i < tags_.size(); i++) {
dataSize += computeStringSizeNoTag(tags_.getRaw(i));
}
size += dataSize;
size += 1 * getTagsList().size();
}
if (!getTensorflowVersionBytes().isEmpty()) {
size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(5, tensorflowVersion_);
}
if (!getTensorflowGitVersionBytes().isEmpty()) {
size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(6, tensorflowGitVersion_);
}
if (strippedDefaultAttrs_ != false) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeBoolSize(7, strippedDefaultAttrs_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.MetaGraphDef.MetaInfoDef)) {
return super.equals(obj);
}
org.tensorflow.framework.MetaGraphDef.MetaInfoDef other = (org.tensorflow.framework.MetaGraphDef.MetaInfoDef) obj;
boolean result = true;
result = result && getMetaGraphVersion()
.equals(other.getMetaGraphVersion());
result = result && (hasStrippedOpList() == other.hasStrippedOpList());
if (hasStrippedOpList()) {
result = result && getStrippedOpList()
.equals(other.getStrippedOpList());
}
result = result && (hasAnyInfo() == other.hasAnyInfo());
if (hasAnyInfo()) {
result = result && getAnyInfo()
.equals(other.getAnyInfo());
}
result = result && getTagsList()
.equals(other.getTagsList());
result = result && getTensorflowVersion()
.equals(other.getTensorflowVersion());
result = result && getTensorflowGitVersion()
.equals(other.getTensorflowGitVersion());
result = result && (getStrippedDefaultAttrs()
== other.getStrippedDefaultAttrs());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + META_GRAPH_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getMetaGraphVersion().hashCode();
if (hasStrippedOpList()) {
hash = (37 * hash) + STRIPPED_OP_LIST_FIELD_NUMBER;
hash = (53 * hash) + getStrippedOpList().hashCode();
}
if (hasAnyInfo()) {
hash = (37 * hash) + ANY_INFO_FIELD_NUMBER;
hash = (53 * hash) + getAnyInfo().hashCode();
}
if (getTagsCount() > 0) {
hash = (37 * hash) + TAGS_FIELD_NUMBER;
hash = (53 * hash) + getTagsList().hashCode();
}
hash = (37 * hash) + TENSORFLOW_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getTensorflowVersion().hashCode();
hash = (37 * hash) + TENSORFLOW_GIT_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getTensorflowGitVersion().hashCode();
hash = (37 * hash) + STRIPPED_DEFAULT_ATTRS_FIELD_NUMBER;
hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashBoolean(
getStrippedDefaultAttrs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
java.nio.ByteBuffer data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
java.nio.ByteBuffer data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
com.github.os72.protobuf351.ByteString data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
com.github.os72.protobuf351.ByteString data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(byte[] data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
byte[] data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
java.io.InputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseDelimitedFrom(
java.io.InputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
com.github.os72.protobuf351.CodedInputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef.MetaInfoDef parseFrom(
com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.MetaGraphDef.MetaInfoDef prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Meta information regarding the graph to be exported. To be used by users
* of this protocol buffer to encode information regarding their meta graph.
*
*
* Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef}
*/
public static final class Builder extends
com.github.os72.protobuf351.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.MetaGraphDef.MetaInfoDef)
org.tensorflow.framework.MetaGraphDef.MetaInfoDefOrBuilder {
public static final com.github.os72.protobuf351.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor;
}
protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.MetaGraphDef.MetaInfoDef.class, org.tensorflow.framework.MetaGraphDef.MetaInfoDef.Builder.class);
}
// Construct using org.tensorflow.framework.MetaGraphDef.MetaInfoDef.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.github.os72.protobuf351.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
metaGraphVersion_ = "";
if (strippedOpListBuilder_ == null) {
strippedOpList_ = null;
} else {
strippedOpList_ = null;
strippedOpListBuilder_ = null;
}
if (anyInfoBuilder_ == null) {
anyInfo_ = null;
} else {
anyInfo_ = null;
anyInfoBuilder_ = null;
}
tags_ = com.github.os72.protobuf351.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
tensorflowVersion_ = "";
tensorflowGitVersion_ = "";
strippedDefaultAttrs_ = false;
return this;
}
public com.github.os72.protobuf351.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor;
}
public org.tensorflow.framework.MetaGraphDef.MetaInfoDef getDefaultInstanceForType() {
return org.tensorflow.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance();
}
public org.tensorflow.framework.MetaGraphDef.MetaInfoDef build() {
org.tensorflow.framework.MetaGraphDef.MetaInfoDef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.MetaGraphDef.MetaInfoDef buildPartial() {
org.tensorflow.framework.MetaGraphDef.MetaInfoDef result = new org.tensorflow.framework.MetaGraphDef.MetaInfoDef(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.metaGraphVersion_ = metaGraphVersion_;
if (strippedOpListBuilder_ == null) {
result.strippedOpList_ = strippedOpList_;
} else {
result.strippedOpList_ = strippedOpListBuilder_.build();
}
if (anyInfoBuilder_ == null) {
result.anyInfo_ = anyInfo_;
} else {
result.anyInfo_ = anyInfoBuilder_.build();
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
tags_ = tags_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.tags_ = tags_;
result.tensorflowVersion_ = tensorflowVersion_;
result.tensorflowGitVersion_ = tensorflowGitVersion_;
result.strippedDefaultAttrs_ = strippedDefaultAttrs_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.github.os72.protobuf351.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.github.os72.protobuf351.Message other) {
if (other instanceof org.tensorflow.framework.MetaGraphDef.MetaInfoDef) {
return mergeFrom((org.tensorflow.framework.MetaGraphDef.MetaInfoDef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.MetaGraphDef.MetaInfoDef other) {
if (other == org.tensorflow.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance()) return this;
if (!other.getMetaGraphVersion().isEmpty()) {
metaGraphVersion_ = other.metaGraphVersion_;
onChanged();
}
if (other.hasStrippedOpList()) {
mergeStrippedOpList(other.getStrippedOpList());
}
if (other.hasAnyInfo()) {
mergeAnyInfo(other.getAnyInfo());
}
if (!other.tags_.isEmpty()) {
if (tags_.isEmpty()) {
tags_ = other.tags_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureTagsIsMutable();
tags_.addAll(other.tags_);
}
onChanged();
}
if (!other.getTensorflowVersion().isEmpty()) {
tensorflowVersion_ = other.tensorflowVersion_;
onChanged();
}
if (!other.getTensorflowGitVersion().isEmpty()) {
tensorflowGitVersion_ = other.tensorflowGitVersion_;
onChanged();
}
if (other.getStrippedDefaultAttrs() != false) {
setStrippedDefaultAttrs(other.getStrippedDefaultAttrs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.MetaGraphDef.MetaInfoDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.MetaGraphDef.MetaInfoDef) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object metaGraphVersion_ = "";
/**
*
* User specified Version string. Can be the name of the model and revision,
* steps this model has been trained to, etc.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
*
* repeated string tags = 4;
*/
public int getTagsCount() {
return tags_.size();
}
/**
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
*
* repeated string tags = 4;
*/
public Builder setTags(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTagsIsMutable();
tags_.set(index, value);
onChanged();
return this;
}
/**
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* User supplied tag(s) on the meta_graph and included graph_def.
* MetaGraphDefs should be tagged with their capabilities or use-cases.
* Examples: "train", "serve", "gpu", "tpu", etc.
* These tags enable loaders to access the MetaGraph(s) appropriate for a
* specific use-case or runtime environment.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __version__ string of the tensorflow build used to write this graph.
* This will be populated by the framework, which will overwrite any user
* supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* The __git_version__ string of the tensorflow build used to write this
* graph. This will be populated by the framework, which will overwrite any
* user supplied value.
*
* Asset file def to be used with the defined graph.
*
*
* repeated .tensorflow.AssetFileDef asset_file_def = 6;
*/
public org.tensorflow.framework.AssetFileDefOrBuilder getAssetFileDefOrBuilder(
int index) {
return assetFileDef_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.github.os72.protobuf351.CodedOutputStream output)
throws java.io.IOException {
if (metaInfoDef_ != null) {
output.writeMessage(1, getMetaInfoDef());
}
if (graphDef_ != null) {
output.writeMessage(2, getGraphDef());
}
if (saverDef_ != null) {
output.writeMessage(3, getSaverDef());
}
com.github.os72.protobuf351.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetCollectionDef(),
CollectionDefDefaultEntryHolder.defaultEntry,
4);
com.github.os72.protobuf351.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetSignatureDef(),
SignatureDefDefaultEntryHolder.defaultEntry,
5);
for (int i = 0; i < assetFileDef_.size(); i++) {
output.writeMessage(6, assetFileDef_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (metaInfoDef_ != null) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(1, getMetaInfoDef());
}
if (graphDef_ != null) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(2, getGraphDef());
}
if (saverDef_ != null) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(3, getSaverDef());
}
for (java.util.Map.Entry entry
: internalGetCollectionDef().getMap().entrySet()) {
com.github.os72.protobuf351.MapEntry
collectionDef__ = CollectionDefDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(4, collectionDef__);
}
for (java.util.Map.Entry entry
: internalGetSignatureDef().getMap().entrySet()) {
com.github.os72.protobuf351.MapEntry
signatureDef__ = SignatureDefDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(5, signatureDef__);
}
for (int i = 0; i < assetFileDef_.size(); i++) {
size += com.github.os72.protobuf351.CodedOutputStream
.computeMessageSize(6, assetFileDef_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.MetaGraphDef)) {
return super.equals(obj);
}
org.tensorflow.framework.MetaGraphDef other = (org.tensorflow.framework.MetaGraphDef) obj;
boolean result = true;
result = result && (hasMetaInfoDef() == other.hasMetaInfoDef());
if (hasMetaInfoDef()) {
result = result && getMetaInfoDef()
.equals(other.getMetaInfoDef());
}
result = result && (hasGraphDef() == other.hasGraphDef());
if (hasGraphDef()) {
result = result && getGraphDef()
.equals(other.getGraphDef());
}
result = result && (hasSaverDef() == other.hasSaverDef());
if (hasSaverDef()) {
result = result && getSaverDef()
.equals(other.getSaverDef());
}
result = result && internalGetCollectionDef().equals(
other.internalGetCollectionDef());
result = result && internalGetSignatureDef().equals(
other.internalGetSignatureDef());
result = result && getAssetFileDefList()
.equals(other.getAssetFileDefList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetaInfoDef()) {
hash = (37 * hash) + META_INFO_DEF_FIELD_NUMBER;
hash = (53 * hash) + getMetaInfoDef().hashCode();
}
if (hasGraphDef()) {
hash = (37 * hash) + GRAPH_DEF_FIELD_NUMBER;
hash = (53 * hash) + getGraphDef().hashCode();
}
if (hasSaverDef()) {
hash = (37 * hash) + SAVER_DEF_FIELD_NUMBER;
hash = (53 * hash) + getSaverDef().hashCode();
}
if (!internalGetCollectionDef().getMap().isEmpty()) {
hash = (37 * hash) + COLLECTION_DEF_FIELD_NUMBER;
hash = (53 * hash) + internalGetCollectionDef().hashCode();
}
if (!internalGetSignatureDef().getMap().isEmpty()) {
hash = (37 * hash) + SIGNATURE_DEF_FIELD_NUMBER;
hash = (53 * hash) + internalGetSignatureDef().hashCode();
}
if (getAssetFileDefCount() > 0) {
hash = (37 * hash) + ASSET_FILE_DEF_FIELD_NUMBER;
hash = (53 * hash) + getAssetFileDefList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
java.nio.ByteBuffer data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
java.nio.ByteBuffer data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
com.github.os72.protobuf351.ByteString data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
com.github.os72.protobuf351.ByteString data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(byte[] data)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
byte[] data,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws com.github.os72.protobuf351.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
java.io.InputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef parseDelimitedFrom(
java.io.InputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
com.github.os72.protobuf351.CodedInputStream input)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.MetaGraphDef parseFrom(
com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.github.os72.protobuf351.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.MetaGraphDef prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* NOTE: This protocol buffer is evolving, and will go through revisions in the
* coming months.
* 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
*