org.tensorflow.framework.VariableDef Maven / Gradle / Ivy
// 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
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.VariableDef)
VariableDefOrBuilder {
private static final long serialVersionUID = 0L;
// Use VariableDef.newBuilder() to construct.
private VariableDef(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VariableDef() {
variableName_ = "";
initialValueName_ = "";
initializerName_ = "";
snapshotName_ = "";
isResource_ = false;
trainable_ = false;
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private VariableDef(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.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;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
}
protected org.nd4j.shade.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 {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
variableName_ = s;
return s;
}
}
/**
*
* Name of the variable tensor.
*
*
* string variable_name = 1;
*/
public org.nd4j.shade.protobuf.ByteString
getVariableNameBytes() {
java.lang.Object ref = variableName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
variableName_ = b;
return b;
} else {
return (org.nd4j.shade.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 {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString
getInitialValueNameBytes() {
java.lang.Object ref = initialValueName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
initialValueName_ = b;
return b;
} else {
return (org.nd4j.shade.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 {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
initializerName_ = s;
return s;
}
}
/**
*
* Name of the initializer op.
*
*
* string initializer_name = 2;
*/
public org.nd4j.shade.protobuf.ByteString
getInitializerNameBytes() {
java.lang.Object ref = initializerName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
initializerName_ = b;
return b;
} else {
return (org.nd4j.shade.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 {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
snapshotName_ = s;
return s;
}
}
/**
*
* Name of the snapshot tensor.
*
*
* string snapshot_name = 3;
*/
public org.nd4j.shade.protobuf.ByteString
getSnapshotNameBytes() {
java.lang.Object ref = snapshotName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
snapshotName_ = b;
return b;
} else {
return (org.nd4j.shade.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_;
}
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(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getVariableNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, variableName_);
}
if (!getInitializerNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, initializerName_);
}
if (!getSnapshotNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotName_);
}
if (saveSliceInfoDef_ != null) {
output.writeMessage(4, getSaveSliceInfoDef());
}
if (isResource_ != false) {
output.writeBool(5, isResource_);
}
if (!getInitialValueNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 6, initialValueName_);
}
if (trainable_ != false) {
output.writeBool(7, trainable_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getVariableNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, variableName_);
}
if (!getInitializerNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, initializerName_);
}
if (!getSnapshotNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotName_);
}
if (saveSliceInfoDef_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(4, getSaveSliceInfoDef());
}
if (isResource_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(5, isResource_);
}
if (!getInitialValueNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(6, initialValueName_);
}
if (trainable_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(7, trainable_);
}
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 && 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) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getIsResource());
hash = (37 * hash) + TRAINABLE_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getTrainable());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.VariableDef parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.VariableDef parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.VariableDef parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.VariableDef parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.VariableDef parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.VariableDef parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.VariableDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.VariableDef parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.VariableDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.VariableDef parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.VariableDef parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.VariableDef parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.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(
org.nd4j.shade.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
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.VariableDef)
org.tensorflow.framework.VariableDefOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
}
protected org.nd4j.shade.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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.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;
return this;
}
public org.nd4j.shade.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_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.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());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.VariableDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.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)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString
getVariableNameBytes() {
java.lang.Object ref = variableName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
variableName_ = b;
return b;
} else {
return (org.nd4j.shade.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(
org.nd4j.shade.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)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString
getInitialValueNameBytes() {
java.lang.Object ref = initialValueName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
initialValueName_ = b;
return b;
} else {
return (org.nd4j.shade.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(
org.nd4j.shade.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)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString
getInitializerNameBytes() {
java.lang.Object ref = initializerName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
initializerName_ = b;
return b;
} else {
return (org.nd4j.shade.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(
org.nd4j.shade.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)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString
getSnapshotNameBytes() {
java.lang.Object ref = snapshotName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
snapshotName_ = b;
return b;
} else {
return (org.nd4j.shade.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(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
snapshotName_ = value;
onChanged();
return this;
}
private org.tensorflow.framework.SaveSliceInfoDef saveSliceInfoDef_ = null;
private org.nd4j.shade.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 org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder>
getSaveSliceInfoDefFieldBuilder() {
if (saveSliceInfoDefBuilder_ == null) {
saveSliceInfoDefBuilder_ = new org.nd4j.shade.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;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.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 org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public VariableDef parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new VariableDef(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.VariableDef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}