All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.framework.VariableDef Maven / Gradle / Ivy

There is a newer version: 1.15.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/variable.proto

package org.tensorflow.framework;

/**
 * 
 * Protocol buffer representing a Variable.
 * 
* * Protobuf type {@code tensorflow.VariableDef} */ public final class VariableDef extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.VariableDef) VariableDefOrBuilder { private static final long serialVersionUID = 0L; // Use VariableDef.newBuilder() to construct. private VariableDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private VariableDef() { variableName_ = ""; initialValueName_ = ""; initializerName_ = ""; snapshotName_ = ""; isResource_ = false; trainable_ = false; synchronization_ = 0; aggregation_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private VariableDef( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.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(); variableName_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); initializerName_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); snapshotName_ = s; break; } case 34: { org.tensorflow.framework.SaveSliceInfoDef.Builder subBuilder = null; if (saveSliceInfoDef_ != null) { subBuilder = saveSliceInfoDef_.toBuilder(); } saveSliceInfoDef_ = input.readMessage(org.tensorflow.framework.SaveSliceInfoDef.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(saveSliceInfoDef_); saveSliceInfoDef_ = subBuilder.buildPartial(); } break; } case 40: { isResource_ = input.readBool(); break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); initialValueName_ = s; break; } case 56: { trainable_ = input.readBool(); break; } case 64: { int rawValue = input.readEnum(); synchronization_ = rawValue; break; } case 72: { int rawValue = input.readEnum(); aggregation_ = rawValue; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.VariableDef.class, org.tensorflow.framework.VariableDef.Builder.class); } public static final int VARIABLE_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object variableName_; /** *
   * Name of the variable tensor.
   * 
* * string variable_name = 1; */ public java.lang.String getVariableName() { java.lang.Object ref = variableName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); variableName_ = s; return s; } } /** *
   * Name of the variable tensor.
   * 
* * string variable_name = 1; */ public com.google.protobuf.ByteString getVariableNameBytes() { java.lang.Object ref = variableName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); variableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INITIAL_VALUE_NAME_FIELD_NUMBER = 6; private volatile java.lang.Object initialValueName_; /** *
   * Name of the tensor holding the variable's initial value.
   * 
* * string initial_value_name = 6; */ public java.lang.String getInitialValueName() { java.lang.Object ref = initialValueName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); initialValueName_ = s; return s; } } /** *
   * Name of the tensor holding the variable's initial value.
   * 
* * string initial_value_name = 6; */ public com.google.protobuf.ByteString getInitialValueNameBytes() { java.lang.Object ref = initialValueName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initialValueName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INITIALIZER_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object initializerName_; /** *
   * Name of the initializer op.
   * 
* * string initializer_name = 2; */ public java.lang.String getInitializerName() { java.lang.Object ref = initializerName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); initializerName_ = s; return s; } } /** *
   * Name of the initializer op.
   * 
* * string initializer_name = 2; */ public com.google.protobuf.ByteString getInitializerNameBytes() { java.lang.Object ref = initializerName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initializerName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SNAPSHOT_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object snapshotName_; /** *
   * Name of the snapshot tensor.
   * 
* * string snapshot_name = 3; */ public java.lang.String getSnapshotName() { java.lang.Object ref = snapshotName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); snapshotName_ = s; return s; } } /** *
   * Name of the snapshot tensor.
   * 
* * string snapshot_name = 3; */ public com.google.protobuf.ByteString getSnapshotNameBytes() { java.lang.Object ref = snapshotName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); snapshotName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SAVE_SLICE_INFO_DEF_FIELD_NUMBER = 4; private org.tensorflow.framework.SaveSliceInfoDef saveSliceInfoDef_; /** *
   * Support for saving variables as slices of a larger variable.
   * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public boolean hasSaveSliceInfoDef() { return saveSliceInfoDef_ != null; } /** *
   * Support for saving variables as slices of a larger variable.
   * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public org.tensorflow.framework.SaveSliceInfoDef getSaveSliceInfoDef() { return saveSliceInfoDef_ == null ? org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; } /** *
   * Support for saving variables as slices of a larger variable.
   * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public org.tensorflow.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() { return getSaveSliceInfoDef(); } public static final int IS_RESOURCE_FIELD_NUMBER = 5; private boolean isResource_; /** *
   * Whether to represent this as a ResourceVariable.
   * 
* * bool is_resource = 5; */ public boolean getIsResource() { return isResource_; } public static final int TRAINABLE_FIELD_NUMBER = 7; private boolean trainable_; /** *
   * Whether this variable should be trained.
   * 
* * bool trainable = 7; */ public boolean getTrainable() { return trainable_; } public static final int SYNCHRONIZATION_FIELD_NUMBER = 8; private int synchronization_; /** *
   * Indicates when a distributed variable will be synced.
   * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public int getSynchronizationValue() { return synchronization_; } /** *
   * Indicates when a distributed variable will be synced.
   * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public org.tensorflow.framework.VariableSynchronization getSynchronization() { org.tensorflow.framework.VariableSynchronization result = org.tensorflow.framework.VariableSynchronization.valueOf(synchronization_); return result == null ? org.tensorflow.framework.VariableSynchronization.UNRECOGNIZED : result; } public static final int AGGREGATION_FIELD_NUMBER = 9; private int aggregation_; /** *
   * Indicates how a distributed variable will be aggregated.
   * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public int getAggregationValue() { return aggregation_; } /** *
   * Indicates how a distributed variable will be aggregated.
   * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public org.tensorflow.framework.VariableAggregation getAggregation() { org.tensorflow.framework.VariableAggregation result = org.tensorflow.framework.VariableAggregation.valueOf(aggregation_); return result == null ? org.tensorflow.framework.VariableAggregation.UNRECOGNIZED : result; } 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.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getVariableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, variableName_); } if (!getInitializerNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, initializerName_); } if (!getSnapshotNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotName_); } if (saveSliceInfoDef_ != null) { output.writeMessage(4, getSaveSliceInfoDef()); } if (isResource_ != false) { output.writeBool(5, isResource_); } if (!getInitialValueNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, initialValueName_); } if (trainable_ != false) { output.writeBool(7, trainable_); } if (synchronization_ != org.tensorflow.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) { output.writeEnum(8, synchronization_); } if (aggregation_ != org.tensorflow.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) { output.writeEnum(9, aggregation_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getVariableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, variableName_); } if (!getInitializerNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, initializerName_); } if (!getSnapshotNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotName_); } if (saveSliceInfoDef_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getSaveSliceInfoDef()); } if (isResource_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isResource_); } if (!getInitialValueNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, initialValueName_); } if (trainable_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, trainable_); } if (synchronization_ != org.tensorflow.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(8, synchronization_); } if (aggregation_ != org.tensorflow.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, aggregation_); } 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.VariableDef)) { return super.equals(obj); } org.tensorflow.framework.VariableDef other = (org.tensorflow.framework.VariableDef) obj; boolean result = true; result = result && getVariableName() .equals(other.getVariableName()); result = result && getInitialValueName() .equals(other.getInitialValueName()); result = result && getInitializerName() .equals(other.getInitializerName()); result = result && getSnapshotName() .equals(other.getSnapshotName()); result = result && (hasSaveSliceInfoDef() == other.hasSaveSliceInfoDef()); if (hasSaveSliceInfoDef()) { result = result && getSaveSliceInfoDef() .equals(other.getSaveSliceInfoDef()); } result = result && (getIsResource() == other.getIsResource()); result = result && (getTrainable() == other.getTrainable()); result = result && synchronization_ == other.synchronization_; result = result && aggregation_ == other.aggregation_; 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) + VARIABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getVariableName().hashCode(); hash = (37 * hash) + INITIAL_VALUE_NAME_FIELD_NUMBER; hash = (53 * hash) + getInitialValueName().hashCode(); hash = (37 * hash) + INITIALIZER_NAME_FIELD_NUMBER; hash = (53 * hash) + getInitializerName().hashCode(); hash = (37 * hash) + SNAPSHOT_NAME_FIELD_NUMBER; hash = (53 * hash) + getSnapshotName().hashCode(); if (hasSaveSliceInfoDef()) { hash = (37 * hash) + SAVE_SLICE_INFO_DEF_FIELD_NUMBER; hash = (53 * hash) + getSaveSliceInfoDef().hashCode(); } hash = (37 * hash) + IS_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsResource()); hash = (37 * hash) + TRAINABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getTrainable()); hash = (37 * hash) + SYNCHRONIZATION_FIELD_NUMBER; hash = (53 * hash) + synchronization_; hash = (37 * hash) + AGGREGATION_FIELD_NUMBER; hash = (53 * hash) + aggregation_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.VariableDef parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.VariableDef parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.VariableDef parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.VariableDef parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.VariableDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.VariableDef parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.VariableDef parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.VariableDef parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.VariableDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.VariableDef parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.VariableDef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.VariableDef parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.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.VariableDef 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.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Protocol buffer representing a Variable.
   * 
* * Protobuf type {@code tensorflow.VariableDef} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.VariableDef) org.tensorflow.framework.VariableDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.VariableDef.class, org.tensorflow.framework.VariableDef.Builder.class); } // Construct using org.tensorflow.framework.VariableDef.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); variableName_ = ""; initialValueName_ = ""; initializerName_ = ""; snapshotName_ = ""; if (saveSliceInfoDefBuilder_ == null) { saveSliceInfoDef_ = null; } else { saveSliceInfoDef_ = null; saveSliceInfoDefBuilder_ = null; } isResource_ = false; trainable_ = false; synchronization_ = 0; aggregation_ = 0; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; } public org.tensorflow.framework.VariableDef getDefaultInstanceForType() { return org.tensorflow.framework.VariableDef.getDefaultInstance(); } public org.tensorflow.framework.VariableDef build() { org.tensorflow.framework.VariableDef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.VariableDef buildPartial() { org.tensorflow.framework.VariableDef result = new org.tensorflow.framework.VariableDef(this); result.variableName_ = variableName_; result.initialValueName_ = initialValueName_; result.initializerName_ = initializerName_; result.snapshotName_ = snapshotName_; if (saveSliceInfoDefBuilder_ == null) { result.saveSliceInfoDef_ = saveSliceInfoDef_; } else { result.saveSliceInfoDef_ = saveSliceInfoDefBuilder_.build(); } result.isResource_ = isResource_; result.trainable_ = trainable_; result.synchronization_ = synchronization_; result.aggregation_ = aggregation_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.framework.VariableDef) { return mergeFrom((org.tensorflow.framework.VariableDef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.VariableDef other) { if (other == org.tensorflow.framework.VariableDef.getDefaultInstance()) return this; if (!other.getVariableName().isEmpty()) { variableName_ = other.variableName_; onChanged(); } if (!other.getInitialValueName().isEmpty()) { initialValueName_ = other.initialValueName_; onChanged(); } if (!other.getInitializerName().isEmpty()) { initializerName_ = other.initializerName_; onChanged(); } if (!other.getSnapshotName().isEmpty()) { snapshotName_ = other.snapshotName_; onChanged(); } if (other.hasSaveSliceInfoDef()) { mergeSaveSliceInfoDef(other.getSaveSliceInfoDef()); } if (other.getIsResource() != false) { setIsResource(other.getIsResource()); } if (other.getTrainable() != false) { setTrainable(other.getTrainable()); } if (other.synchronization_ != 0) { setSynchronizationValue(other.getSynchronizationValue()); } if (other.aggregation_ != 0) { setAggregationValue(other.getAggregationValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.VariableDef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.VariableDef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object variableName_ = ""; /** *
     * Name of the variable tensor.
     * 
* * string variable_name = 1; */ public java.lang.String getVariableName() { java.lang.Object ref = variableName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); variableName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the variable tensor.
     * 
* * string variable_name = 1; */ public com.google.protobuf.ByteString getVariableNameBytes() { java.lang.Object ref = variableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); variableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the variable tensor.
     * 
* * string variable_name = 1; */ public Builder setVariableName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } variableName_ = value; onChanged(); return this; } /** *
     * Name of the variable tensor.
     * 
* * string variable_name = 1; */ public Builder clearVariableName() { variableName_ = getDefaultInstance().getVariableName(); onChanged(); return this; } /** *
     * Name of the variable tensor.
     * 
* * string variable_name = 1; */ public Builder setVariableNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); variableName_ = value; onChanged(); return this; } private java.lang.Object initialValueName_ = ""; /** *
     * Name of the tensor holding the variable's initial value.
     * 
* * string initial_value_name = 6; */ public java.lang.String getInitialValueName() { java.lang.Object ref = initialValueName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); initialValueName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the tensor holding the variable's initial value.
     * 
* * string initial_value_name = 6; */ public com.google.protobuf.ByteString getInitialValueNameBytes() { java.lang.Object ref = initialValueName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initialValueName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the tensor holding the variable's initial value.
     * 
* * string initial_value_name = 6; */ public Builder setInitialValueName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } initialValueName_ = value; onChanged(); return this; } /** *
     * Name of the tensor holding the variable's initial value.
     * 
* * string initial_value_name = 6; */ public Builder clearInitialValueName() { initialValueName_ = getDefaultInstance().getInitialValueName(); onChanged(); return this; } /** *
     * Name of the tensor holding the variable's initial value.
     * 
* * string initial_value_name = 6; */ public Builder setInitialValueNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); initialValueName_ = value; onChanged(); return this; } private java.lang.Object initializerName_ = ""; /** *
     * Name of the initializer op.
     * 
* * string initializer_name = 2; */ public java.lang.String getInitializerName() { java.lang.Object ref = initializerName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); initializerName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the initializer op.
     * 
* * string initializer_name = 2; */ public com.google.protobuf.ByteString getInitializerNameBytes() { java.lang.Object ref = initializerName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initializerName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the initializer op.
     * 
* * string initializer_name = 2; */ public Builder setInitializerName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } initializerName_ = value; onChanged(); return this; } /** *
     * Name of the initializer op.
     * 
* * string initializer_name = 2; */ public Builder clearInitializerName() { initializerName_ = getDefaultInstance().getInitializerName(); onChanged(); return this; } /** *
     * Name of the initializer op.
     * 
* * string initializer_name = 2; */ public Builder setInitializerNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); initializerName_ = value; onChanged(); return this; } private java.lang.Object snapshotName_ = ""; /** *
     * Name of the snapshot tensor.
     * 
* * string snapshot_name = 3; */ public java.lang.String getSnapshotName() { java.lang.Object ref = snapshotName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); snapshotName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the snapshot tensor.
     * 
* * string snapshot_name = 3; */ public com.google.protobuf.ByteString getSnapshotNameBytes() { java.lang.Object ref = snapshotName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); snapshotName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the snapshot tensor.
     * 
* * string snapshot_name = 3; */ public Builder setSnapshotName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } snapshotName_ = value; onChanged(); return this; } /** *
     * Name of the snapshot tensor.
     * 
* * string snapshot_name = 3; */ public Builder clearSnapshotName() { snapshotName_ = getDefaultInstance().getSnapshotName(); onChanged(); return this; } /** *
     * Name of the snapshot tensor.
     * 
* * string snapshot_name = 3; */ public Builder setSnapshotNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); snapshotName_ = value; onChanged(); return this; } private org.tensorflow.framework.SaveSliceInfoDef saveSliceInfoDef_ = null; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder> saveSliceInfoDefBuilder_; /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public boolean hasSaveSliceInfoDef() { return saveSliceInfoDefBuilder_ != null || saveSliceInfoDef_ != null; } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public org.tensorflow.framework.SaveSliceInfoDef getSaveSliceInfoDef() { if (saveSliceInfoDefBuilder_ == null) { return saveSliceInfoDef_ == null ? org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; } else { return saveSliceInfoDefBuilder_.getMessage(); } } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public Builder setSaveSliceInfoDef(org.tensorflow.framework.SaveSliceInfoDef value) { if (saveSliceInfoDefBuilder_ == null) { if (value == null) { throw new NullPointerException(); } saveSliceInfoDef_ = value; onChanged(); } else { saveSliceInfoDefBuilder_.setMessage(value); } return this; } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public Builder setSaveSliceInfoDef( org.tensorflow.framework.SaveSliceInfoDef.Builder builderForValue) { if (saveSliceInfoDefBuilder_ == null) { saveSliceInfoDef_ = builderForValue.build(); onChanged(); } else { saveSliceInfoDefBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public Builder mergeSaveSliceInfoDef(org.tensorflow.framework.SaveSliceInfoDef value) { if (saveSliceInfoDefBuilder_ == null) { if (saveSliceInfoDef_ != null) { saveSliceInfoDef_ = org.tensorflow.framework.SaveSliceInfoDef.newBuilder(saveSliceInfoDef_).mergeFrom(value).buildPartial(); } else { saveSliceInfoDef_ = value; } onChanged(); } else { saveSliceInfoDefBuilder_.mergeFrom(value); } return this; } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public Builder clearSaveSliceInfoDef() { if (saveSliceInfoDefBuilder_ == null) { saveSliceInfoDef_ = null; onChanged(); } else { saveSliceInfoDef_ = null; saveSliceInfoDefBuilder_ = null; } return this; } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public org.tensorflow.framework.SaveSliceInfoDef.Builder getSaveSliceInfoDefBuilder() { onChanged(); return getSaveSliceInfoDefFieldBuilder().getBuilder(); } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ public org.tensorflow.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() { if (saveSliceInfoDefBuilder_ != null) { return saveSliceInfoDefBuilder_.getMessageOrBuilder(); } else { return saveSliceInfoDef_ == null ? org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; } } /** *
     * Support for saving variables as slices of a larger variable.
     * 
* * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder> getSaveSliceInfoDefFieldBuilder() { if (saveSliceInfoDefBuilder_ == null) { saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder>( getSaveSliceInfoDef(), getParentForChildren(), isClean()); saveSliceInfoDef_ = null; } return saveSliceInfoDefBuilder_; } private boolean isResource_ ; /** *
     * Whether to represent this as a ResourceVariable.
     * 
* * bool is_resource = 5; */ public boolean getIsResource() { return isResource_; } /** *
     * Whether to represent this as a ResourceVariable.
     * 
* * bool is_resource = 5; */ public Builder setIsResource(boolean value) { isResource_ = value; onChanged(); return this; } /** *
     * Whether to represent this as a ResourceVariable.
     * 
* * bool is_resource = 5; */ public Builder clearIsResource() { isResource_ = false; onChanged(); return this; } private boolean trainable_ ; /** *
     * Whether this variable should be trained.
     * 
* * bool trainable = 7; */ public boolean getTrainable() { return trainable_; } /** *
     * Whether this variable should be trained.
     * 
* * bool trainable = 7; */ public Builder setTrainable(boolean value) { trainable_ = value; onChanged(); return this; } /** *
     * Whether this variable should be trained.
     * 
* * bool trainable = 7; */ public Builder clearTrainable() { trainable_ = false; onChanged(); return this; } private int synchronization_ = 0; /** *
     * Indicates when a distributed variable will be synced.
     * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public int getSynchronizationValue() { return synchronization_; } /** *
     * Indicates when a distributed variable will be synced.
     * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public Builder setSynchronizationValue(int value) { synchronization_ = value; onChanged(); return this; } /** *
     * Indicates when a distributed variable will be synced.
     * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public org.tensorflow.framework.VariableSynchronization getSynchronization() { org.tensorflow.framework.VariableSynchronization result = org.tensorflow.framework.VariableSynchronization.valueOf(synchronization_); return result == null ? org.tensorflow.framework.VariableSynchronization.UNRECOGNIZED : result; } /** *
     * Indicates when a distributed variable will be synced.
     * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public Builder setSynchronization(org.tensorflow.framework.VariableSynchronization value) { if (value == null) { throw new NullPointerException(); } synchronization_ = value.getNumber(); onChanged(); return this; } /** *
     * Indicates when a distributed variable will be synced.
     * 
* * .tensorflow.VariableSynchronization synchronization = 8; */ public Builder clearSynchronization() { synchronization_ = 0; onChanged(); return this; } private int aggregation_ = 0; /** *
     * Indicates how a distributed variable will be aggregated.
     * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public int getAggregationValue() { return aggregation_; } /** *
     * Indicates how a distributed variable will be aggregated.
     * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public Builder setAggregationValue(int value) { aggregation_ = value; onChanged(); return this; } /** *
     * Indicates how a distributed variable will be aggregated.
     * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public org.tensorflow.framework.VariableAggregation getAggregation() { org.tensorflow.framework.VariableAggregation result = org.tensorflow.framework.VariableAggregation.valueOf(aggregation_); return result == null ? org.tensorflow.framework.VariableAggregation.UNRECOGNIZED : result; } /** *
     * Indicates how a distributed variable will be aggregated.
     * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public Builder setAggregation(org.tensorflow.framework.VariableAggregation value) { if (value == null) { throw new NullPointerException(); } aggregation_ = value.getNumber(); onChanged(); return this; } /** *
     * Indicates how a distributed variable will be aggregated.
     * 
* * .tensorflow.VariableAggregation aggregation = 9; */ public Builder clearAggregation() { aggregation_ = 0; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.VariableDef) } // @@protoc_insertion_point(class_scope:tensorflow.VariableDef) private static final org.tensorflow.framework.VariableDef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.VariableDef(); } public static org.tensorflow.framework.VariableDef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public VariableDef parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new VariableDef(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.VariableDef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy