
tensorflow.boosted_trees.learner.Learner Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/contrib/boosted_trees/proto/learner.proto
package tensorflow.boosted_trees.learner;
public final class Learner {
private Learner() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface TreeRegularizationConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Classic L1/L2.
*
*
* float l1 = 1;
*/
float getL1();
/**
* float l2 = 2;
*/
float getL2();
/**
*
* Tree complexity penalizes overall model complexity effectively
* limiting how deep the tree can grow in regions with small gain.
*
*
* float tree_complexity = 3;
*/
float getTreeComplexity();
}
/**
*
* Tree regularization config.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.TreeRegularizationConfig}
*/
public static final class TreeRegularizationConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
TreeRegularizationConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use TreeRegularizationConfig.newBuilder() to construct.
private TreeRegularizationConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TreeRegularizationConfig() {
l1_ = 0F;
l2_ = 0F;
treeComplexity_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TreeRegularizationConfig(
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;
case 13: {
l1_ = input.readFloat();
break;
}
case 21: {
l2_ = input.readFloat();
break;
}
case 29: {
treeComplexity_ = input.readFloat();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.class, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder.class);
}
public static final int L1_FIELD_NUMBER = 1;
private float l1_;
/**
*
* Classic L1/L2.
*
*
* float l1 = 1;
*/
public float getL1() {
return l1_;
}
public static final int L2_FIELD_NUMBER = 2;
private float l2_;
/**
* float l2 = 2;
*/
public float getL2() {
return l2_;
}
public static final int TREE_COMPLEXITY_FIELD_NUMBER = 3;
private float treeComplexity_;
/**
*
* Tree complexity penalizes overall model complexity effectively
* limiting how deep the tree can grow in regions with small gain.
*
*
* float tree_complexity = 3;
*/
public float getTreeComplexity() {
return treeComplexity_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (l1_ != 0F) {
output.writeFloat(1, l1_);
}
if (l2_ != 0F) {
output.writeFloat(2, l2_);
}
if (treeComplexity_ != 0F) {
output.writeFloat(3, treeComplexity_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (l1_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, l1_);
}
if (l2_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, l2_);
}
if (treeComplexity_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, treeComplexity_);
}
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 tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig other = (tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) obj;
boolean result = true;
result = result && (
java.lang.Float.floatToIntBits(getL1())
== java.lang.Float.floatToIntBits(
other.getL1()));
result = result && (
java.lang.Float.floatToIntBits(getL2())
== java.lang.Float.floatToIntBits(
other.getL2()));
result = result && (
java.lang.Float.floatToIntBits(getTreeComplexity())
== java.lang.Float.floatToIntBits(
other.getTreeComplexity()));
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) + L1_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getL1());
hash = (37 * hash) + L2_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getL2());
hash = (37 * hash) + TREE_COMPLEXITY_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getTreeComplexity());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig 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 tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig 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 tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Tree regularization config.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.TreeRegularizationConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.class, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
l1_ = 0F;
l2_ = 0F;
treeComplexity_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig build() {
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig result = new tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig(this);
result.l1_ = l1_;
result.l2_ = l2_;
result.treeComplexity_ = treeComplexity_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance()) return this;
if (other.getL1() != 0F) {
setL1(other.getL1());
}
if (other.getL2() != 0F) {
setL2(other.getL2());
}
if (other.getTreeComplexity() != 0F) {
setTreeComplexity(other.getTreeComplexity());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private float l1_ ;
/**
*
* Classic L1/L2.
*
*
* float l1 = 1;
*/
public float getL1() {
return l1_;
}
/**
*
* Classic L1/L2.
*
*
* float l1 = 1;
*/
public Builder setL1(float value) {
l1_ = value;
onChanged();
return this;
}
/**
*
* Classic L1/L2.
*
*
* float l1 = 1;
*/
public Builder clearL1() {
l1_ = 0F;
onChanged();
return this;
}
private float l2_ ;
/**
* float l2 = 2;
*/
public float getL2() {
return l2_;
}
/**
* float l2 = 2;
*/
public Builder setL2(float value) {
l2_ = value;
onChanged();
return this;
}
/**
* float l2 = 2;
*/
public Builder clearL2() {
l2_ = 0F;
onChanged();
return this;
}
private float treeComplexity_ ;
/**
*
* Tree complexity penalizes overall model complexity effectively
* limiting how deep the tree can grow in regions with small gain.
*
*
* float tree_complexity = 3;
*/
public float getTreeComplexity() {
return treeComplexity_;
}
/**
*
* Tree complexity penalizes overall model complexity effectively
* limiting how deep the tree can grow in regions with small gain.
*
*
* float tree_complexity = 3;
*/
public Builder setTreeComplexity(float value) {
treeComplexity_ = value;
onChanged();
return this;
}
/**
*
* Tree complexity penalizes overall model complexity effectively
* limiting how deep the tree can grow in regions with small gain.
*
*
* float tree_complexity = 3;
*/
public Builder clearTreeComplexity() {
treeComplexity_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
private static final tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig();
}
public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TreeRegularizationConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TreeRegularizationConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TreeConstraintsConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Maximum depth of the trees. The default value is 6 if not specified.
*
*
* uint32 max_tree_depth = 1;
*/
int getMaxTreeDepth();
/**
*
* Min hessian weight per node.
*
*
* float min_node_weight = 2;
*/
float getMinNodeWeight();
/**
*
* Maximum number of unique features used in the tree. Zero means there is no
* limit.
*
*
* int64 max_number_of_unique_feature_columns = 3;
*/
long getMaxNumberOfUniqueFeatureColumns();
}
/**
*
* Tree constraints config.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.TreeConstraintsConfig}
*/
public static final class TreeConstraintsConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
TreeConstraintsConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use TreeConstraintsConfig.newBuilder() to construct.
private TreeConstraintsConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TreeConstraintsConfig() {
maxTreeDepth_ = 0;
minNodeWeight_ = 0F;
maxNumberOfUniqueFeatureColumns_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TreeConstraintsConfig(
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;
case 8: {
maxTreeDepth_ = input.readUInt32();
break;
}
case 21: {
minNodeWeight_ = input.readFloat();
break;
}
case 24: {
maxNumberOfUniqueFeatureColumns_ = input.readInt64();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.class, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder.class);
}
public static final int MAX_TREE_DEPTH_FIELD_NUMBER = 1;
private int maxTreeDepth_;
/**
*
* Maximum depth of the trees. The default value is 6 if not specified.
*
*
* uint32 max_tree_depth = 1;
*/
public int getMaxTreeDepth() {
return maxTreeDepth_;
}
public static final int MIN_NODE_WEIGHT_FIELD_NUMBER = 2;
private float minNodeWeight_;
/**
*
* Min hessian weight per node.
*
*
* float min_node_weight = 2;
*/
public float getMinNodeWeight() {
return minNodeWeight_;
}
public static final int MAX_NUMBER_OF_UNIQUE_FEATURE_COLUMNS_FIELD_NUMBER = 3;
private long maxNumberOfUniqueFeatureColumns_;
/**
*
* Maximum number of unique features used in the tree. Zero means there is no
* limit.
*
*
* int64 max_number_of_unique_feature_columns = 3;
*/
public long getMaxNumberOfUniqueFeatureColumns() {
return maxNumberOfUniqueFeatureColumns_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (maxTreeDepth_ != 0) {
output.writeUInt32(1, maxTreeDepth_);
}
if (minNodeWeight_ != 0F) {
output.writeFloat(2, minNodeWeight_);
}
if (maxNumberOfUniqueFeatureColumns_ != 0L) {
output.writeInt64(3, maxNumberOfUniqueFeatureColumns_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxTreeDepth_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, maxTreeDepth_);
}
if (minNodeWeight_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, minNodeWeight_);
}
if (maxNumberOfUniqueFeatureColumns_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, maxNumberOfUniqueFeatureColumns_);
}
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 tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig other = (tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) obj;
boolean result = true;
result = result && (getMaxTreeDepth()
== other.getMaxTreeDepth());
result = result && (
java.lang.Float.floatToIntBits(getMinNodeWeight())
== java.lang.Float.floatToIntBits(
other.getMinNodeWeight()));
result = result && (getMaxNumberOfUniqueFeatureColumns()
== other.getMaxNumberOfUniqueFeatureColumns());
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) + MAX_TREE_DEPTH_FIELD_NUMBER;
hash = (53 * hash) + getMaxTreeDepth();
hash = (37 * hash) + MIN_NODE_WEIGHT_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMinNodeWeight());
hash = (37 * hash) + MAX_NUMBER_OF_UNIQUE_FEATURE_COLUMNS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxNumberOfUniqueFeatureColumns());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig 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 tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig 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 tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Tree constraints config.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.TreeConstraintsConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.class, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
maxTreeDepth_ = 0;
minNodeWeight_ = 0F;
maxNumberOfUniqueFeatureColumns_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig build() {
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig result = new tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig(this);
result.maxTreeDepth_ = maxTreeDepth_;
result.minNodeWeight_ = minNodeWeight_;
result.maxNumberOfUniqueFeatureColumns_ = maxNumberOfUniqueFeatureColumns_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance()) return this;
if (other.getMaxTreeDepth() != 0) {
setMaxTreeDepth(other.getMaxTreeDepth());
}
if (other.getMinNodeWeight() != 0F) {
setMinNodeWeight(other.getMinNodeWeight());
}
if (other.getMaxNumberOfUniqueFeatureColumns() != 0L) {
setMaxNumberOfUniqueFeatureColumns(other.getMaxNumberOfUniqueFeatureColumns());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int maxTreeDepth_ ;
/**
*
* Maximum depth of the trees. The default value is 6 if not specified.
*
*
* uint32 max_tree_depth = 1;
*/
public int getMaxTreeDepth() {
return maxTreeDepth_;
}
/**
*
* Maximum depth of the trees. The default value is 6 if not specified.
*
*
* uint32 max_tree_depth = 1;
*/
public Builder setMaxTreeDepth(int value) {
maxTreeDepth_ = value;
onChanged();
return this;
}
/**
*
* Maximum depth of the trees. The default value is 6 if not specified.
*
*
* uint32 max_tree_depth = 1;
*/
public Builder clearMaxTreeDepth() {
maxTreeDepth_ = 0;
onChanged();
return this;
}
private float minNodeWeight_ ;
/**
*
* Min hessian weight per node.
*
*
* float min_node_weight = 2;
*/
public float getMinNodeWeight() {
return minNodeWeight_;
}
/**
*
* Min hessian weight per node.
*
*
* float min_node_weight = 2;
*/
public Builder setMinNodeWeight(float value) {
minNodeWeight_ = value;
onChanged();
return this;
}
/**
*
* Min hessian weight per node.
*
*
* float min_node_weight = 2;
*/
public Builder clearMinNodeWeight() {
minNodeWeight_ = 0F;
onChanged();
return this;
}
private long maxNumberOfUniqueFeatureColumns_ ;
/**
*
* Maximum number of unique features used in the tree. Zero means there is no
* limit.
*
*
* int64 max_number_of_unique_feature_columns = 3;
*/
public long getMaxNumberOfUniqueFeatureColumns() {
return maxNumberOfUniqueFeatureColumns_;
}
/**
*
* Maximum number of unique features used in the tree. Zero means there is no
* limit.
*
*
* int64 max_number_of_unique_feature_columns = 3;
*/
public Builder setMaxNumberOfUniqueFeatureColumns(long value) {
maxNumberOfUniqueFeatureColumns_ = value;
onChanged();
return this;
}
/**
*
* Maximum number of unique features used in the tree. Zero means there is no
* limit.
*
*
* int64 max_number_of_unique_feature_columns = 3;
*/
public Builder clearMaxNumberOfUniqueFeatureColumns() {
maxNumberOfUniqueFeatureColumns_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
private static final tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig();
}
public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TreeConstraintsConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TreeConstraintsConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LearningRateConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateConfig)
com.google.protobuf.MessageOrBuilder {
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
boolean hasFixed();
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed();
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder();
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
boolean hasDropout();
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout();
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder();
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
boolean hasLineSearch();
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch();
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder();
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig.TunerCase getTunerCase();
}
/**
*
* LearningRateConfig describes all supported learning rate tuners.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateConfig}
*/
public static final class LearningRateConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateConfig)
LearningRateConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LearningRateConfig.newBuilder() to construct.
private LearningRateConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LearningRateConfig() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LearningRateConfig(
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;
case 10: {
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder subBuilder = null;
if (tunerCase_ == 1) {
subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_).toBuilder();
}
tuner_ =
input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
tuner_ = subBuilder.buildPartial();
}
tunerCase_ = 1;
break;
}
case 18: {
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder subBuilder = null;
if (tunerCase_ == 2) {
subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_).toBuilder();
}
tuner_ =
input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
tuner_ = subBuilder.buildPartial();
}
tunerCase_ = 2;
break;
}
case 26: {
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder subBuilder = null;
if (tunerCase_ == 3) {
subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_).toBuilder();
}
tuner_ =
input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
tuner_ = subBuilder.buildPartial();
}
tunerCase_ = 3;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder.class);
}
private int tunerCase_ = 0;
private java.lang.Object tuner_;
public enum TunerCase
implements com.google.protobuf.Internal.EnumLite {
FIXED(1),
DROPOUT(2),
LINE_SEARCH(3),
TUNER_NOT_SET(0);
private final int value;
private TunerCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TunerCase valueOf(int value) {
return forNumber(value);
}
public static TunerCase forNumber(int value) {
switch (value) {
case 1: return FIXED;
case 2: return DROPOUT;
case 3: return LINE_SEARCH;
case 0: return TUNER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TunerCase
getTunerCase() {
return TunerCase.forNumber(
tunerCase_);
}
public static final int FIXED_FIELD_NUMBER = 1;
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public boolean hasFixed() {
return tunerCase_ == 1;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed() {
if (tunerCase_ == 1) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder() {
if (tunerCase_ == 1) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
public static final int DROPOUT_FIELD_NUMBER = 2;
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public boolean hasDropout() {
return tunerCase_ == 2;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout() {
if (tunerCase_ == 2) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder() {
if (tunerCase_ == 2) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
public static final int LINE_SEARCH_FIELD_NUMBER = 3;
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public boolean hasLineSearch() {
return tunerCase_ == 3;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch() {
if (tunerCase_ == 3) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder() {
if (tunerCase_ == 3) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tunerCase_ == 1) {
output.writeMessage(1, (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
}
if (tunerCase_ == 2) {
output.writeMessage(2, (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
}
if (tunerCase_ == 3) {
output.writeMessage(3, (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tunerCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
}
if (tunerCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
}
if (tunerCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
}
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 tensorflow.boosted_trees.learner.Learner.LearningRateConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.LearningRateConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateConfig) obj;
boolean result = true;
result = result && getTunerCase().equals(
other.getTunerCase());
if (!result) return false;
switch (tunerCase_) {
case 1:
result = result && getFixed()
.equals(other.getFixed());
break;
case 2:
result = result && getDropout()
.equals(other.getDropout());
break;
case 3:
result = result && getLineSearch()
.equals(other.getLineSearch());
break;
case 0:
default:
}
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();
switch (tunerCase_) {
case 1:
hash = (37 * hash) + FIXED_FIELD_NUMBER;
hash = (53 * hash) + getFixed().hashCode();
break;
case 2:
hash = (37 * hash) + DROPOUT_FIELD_NUMBER;
hash = (53 * hash) + getDropout().hashCode();
break;
case 3:
hash = (37 * hash) + LINE_SEARCH_FIELD_NUMBER;
hash = (53 * hash) + getLineSearch().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* LearningRateConfig describes all supported learning rate tuners.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateConfig)
tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.LearningRateConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
tunerCase_ = 0;
tuner_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig build() {
tensorflow.boosted_trees.learner.Learner.LearningRateConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.LearningRateConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateConfig(this);
if (tunerCase_ == 1) {
if (fixedBuilder_ == null) {
result.tuner_ = tuner_;
} else {
result.tuner_ = fixedBuilder_.build();
}
}
if (tunerCase_ == 2) {
if (dropoutBuilder_ == null) {
result.tuner_ = tuner_;
} else {
result.tuner_ = dropoutBuilder_.build();
}
}
if (tunerCase_ == 3) {
if (lineSearchBuilder_ == null) {
result.tuner_ = tuner_;
} else {
result.tuner_ = lineSearchBuilder_.build();
}
}
result.tunerCase_ = tunerCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance()) return this;
switch (other.getTunerCase()) {
case FIXED: {
mergeFixed(other.getFixed());
break;
}
case DROPOUT: {
mergeDropout(other.getDropout());
break;
}
case LINE_SEARCH: {
mergeLineSearch(other.getLineSearch());
break;
}
case TUNER_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.LearningRateConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int tunerCase_ = 0;
private java.lang.Object tuner_;
public TunerCase
getTunerCase() {
return TunerCase.forNumber(
tunerCase_);
}
public Builder clearTuner() {
tunerCase_ = 0;
tuner_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder> fixedBuilder_;
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public boolean hasFixed() {
return tunerCase_ == 1;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed() {
if (fixedBuilder_ == null) {
if (tunerCase_ == 1) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
} else {
if (tunerCase_ == 1) {
return fixedBuilder_.getMessage();
}
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public Builder setFixed(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig value) {
if (fixedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tuner_ = value;
onChanged();
} else {
fixedBuilder_.setMessage(value);
}
tunerCase_ = 1;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public Builder setFixed(
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder builderForValue) {
if (fixedBuilder_ == null) {
tuner_ = builderForValue.build();
onChanged();
} else {
fixedBuilder_.setMessage(builderForValue.build());
}
tunerCase_ = 1;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public Builder mergeFixed(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig value) {
if (fixedBuilder_ == null) {
if (tunerCase_ == 1 &&
tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance()) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_)
.mergeFrom(value).buildPartial();
} else {
tuner_ = value;
}
onChanged();
} else {
if (tunerCase_ == 1) {
fixedBuilder_.mergeFrom(value);
}
fixedBuilder_.setMessage(value);
}
tunerCase_ = 1;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public Builder clearFixed() {
if (fixedBuilder_ == null) {
if (tunerCase_ == 1) {
tunerCase_ = 0;
tuner_ = null;
onChanged();
}
} else {
if (tunerCase_ == 1) {
tunerCase_ = 0;
tuner_ = null;
}
fixedBuilder_.clear();
}
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder getFixedBuilder() {
return getFixedFieldBuilder().getBuilder();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder() {
if ((tunerCase_ == 1) && (fixedBuilder_ != null)) {
return fixedBuilder_.getMessageOrBuilder();
} else {
if (tunerCase_ == 1) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder>
getFixedFieldBuilder() {
if (fixedBuilder_ == null) {
if (!(tunerCase_ == 1)) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
fixedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder>(
(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_,
getParentForChildren(),
isClean());
tuner_ = null;
}
tunerCase_ = 1;
onChanged();;
return fixedBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder> dropoutBuilder_;
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public boolean hasDropout() {
return tunerCase_ == 2;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout() {
if (dropoutBuilder_ == null) {
if (tunerCase_ == 2) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
} else {
if (tunerCase_ == 2) {
return dropoutBuilder_.getMessage();
}
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public Builder setDropout(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig value) {
if (dropoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tuner_ = value;
onChanged();
} else {
dropoutBuilder_.setMessage(value);
}
tunerCase_ = 2;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public Builder setDropout(
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder builderForValue) {
if (dropoutBuilder_ == null) {
tuner_ = builderForValue.build();
onChanged();
} else {
dropoutBuilder_.setMessage(builderForValue.build());
}
tunerCase_ = 2;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public Builder mergeDropout(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig value) {
if (dropoutBuilder_ == null) {
if (tunerCase_ == 2 &&
tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance()) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_)
.mergeFrom(value).buildPartial();
} else {
tuner_ = value;
}
onChanged();
} else {
if (tunerCase_ == 2) {
dropoutBuilder_.mergeFrom(value);
}
dropoutBuilder_.setMessage(value);
}
tunerCase_ = 2;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public Builder clearDropout() {
if (dropoutBuilder_ == null) {
if (tunerCase_ == 2) {
tunerCase_ = 0;
tuner_ = null;
onChanged();
}
} else {
if (tunerCase_ == 2) {
tunerCase_ = 0;
tuner_ = null;
}
dropoutBuilder_.clear();
}
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder getDropoutBuilder() {
return getDropoutFieldBuilder().getBuilder();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder() {
if ((tunerCase_ == 2) && (dropoutBuilder_ != null)) {
return dropoutBuilder_.getMessageOrBuilder();
} else {
if (tunerCase_ == 2) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder>
getDropoutFieldBuilder() {
if (dropoutBuilder_ == null) {
if (!(tunerCase_ == 2)) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
dropoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder>(
(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_,
getParentForChildren(),
isClean());
tuner_ = null;
}
tunerCase_ = 2;
onChanged();;
return dropoutBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder> lineSearchBuilder_;
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public boolean hasLineSearch() {
return tunerCase_ == 3;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch() {
if (lineSearchBuilder_ == null) {
if (tunerCase_ == 3) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
} else {
if (tunerCase_ == 3) {
return lineSearchBuilder_.getMessage();
}
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public Builder setLineSearch(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig value) {
if (lineSearchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tuner_ = value;
onChanged();
} else {
lineSearchBuilder_.setMessage(value);
}
tunerCase_ = 3;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public Builder setLineSearch(
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder builderForValue) {
if (lineSearchBuilder_ == null) {
tuner_ = builderForValue.build();
onChanged();
} else {
lineSearchBuilder_.setMessage(builderForValue.build());
}
tunerCase_ = 3;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public Builder mergeLineSearch(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig value) {
if (lineSearchBuilder_ == null) {
if (tunerCase_ == 3 &&
tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance()) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_)
.mergeFrom(value).buildPartial();
} else {
tuner_ = value;
}
onChanged();
} else {
if (tunerCase_ == 3) {
lineSearchBuilder_.mergeFrom(value);
}
lineSearchBuilder_.setMessage(value);
}
tunerCase_ = 3;
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public Builder clearLineSearch() {
if (lineSearchBuilder_ == null) {
if (tunerCase_ == 3) {
tunerCase_ = 0;
tuner_ = null;
onChanged();
}
} else {
if (tunerCase_ == 3) {
tunerCase_ = 0;
tuner_ = null;
}
lineSearchBuilder_.clear();
}
return this;
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder getLineSearchBuilder() {
return getLineSearchFieldBuilder().getBuilder();
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder() {
if ((tunerCase_ == 3) && (lineSearchBuilder_ != null)) {
return lineSearchBuilder_.getMessageOrBuilder();
} else {
if (tunerCase_ == 3) {
return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
}
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
}
/**
* .tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder>
getLineSearchFieldBuilder() {
if (lineSearchBuilder_ == null) {
if (!(tunerCase_ == 3)) {
tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
lineSearchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder>(
(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_,
getParentForChildren(),
isClean());
tuner_ = null;
}
tunerCase_ = 3;
onChanged();;
return lineSearchBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateConfig)
private static final tensorflow.boosted_trees.learner.Learner.LearningRateConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateConfig();
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LearningRateConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LearningRateConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LearningRateFixedConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
com.google.protobuf.MessageOrBuilder {
/**
* float learning_rate = 1;
*/
float getLearningRate();
}
/**
*
* Config for a fixed learning rate.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateFixedConfig}
*/
public static final class LearningRateFixedConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
LearningRateFixedConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LearningRateFixedConfig.newBuilder() to construct.
private LearningRateFixedConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LearningRateFixedConfig() {
learningRate_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LearningRateFixedConfig(
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;
case 13: {
learningRate_ = input.readFloat();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder.class);
}
public static final int LEARNING_RATE_FIELD_NUMBER = 1;
private float learningRate_;
/**
* float learning_rate = 1;
*/
public float getLearningRate() {
return learningRate_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (learningRate_ != 0F) {
output.writeFloat(1, learningRate_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (learningRate_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, learningRate_);
}
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 tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) obj;
boolean result = true;
result = result && (
java.lang.Float.floatToIntBits(getLearningRate())
== java.lang.Float.floatToIntBits(
other.getLearningRate()));
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) + LEARNING_RATE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLearningRate());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Config for a fixed learning rate.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateFixedConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
learningRate_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig build() {
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig(this);
result.learningRate_ = learningRate_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance()) return this;
if (other.getLearningRate() != 0F) {
setLearningRate(other.getLearningRate());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private float learningRate_ ;
/**
* float learning_rate = 1;
*/
public float getLearningRate() {
return learningRate_;
}
/**
* float learning_rate = 1;
*/
public Builder setLearningRate(float value) {
learningRate_ = value;
onChanged();
return this;
}
/**
* float learning_rate = 1;
*/
public Builder clearLearningRate() {
learningRate_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
private static final tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig();
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LearningRateFixedConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LearningRateFixedConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LearningRateLineSearchConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Max learning rate. Must be strictly positive.
*
*
* float max_learning_rate = 1;
*/
float getMaxLearningRate();
/**
*
* Number of learning rate values to consider between [0, max_learning_rate).
*
*
* int32 num_steps = 2;
*/
int getNumSteps();
}
/**
*
* Config for a tuned learning rate.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateLineSearchConfig}
*/
public static final class LearningRateLineSearchConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
LearningRateLineSearchConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LearningRateLineSearchConfig.newBuilder() to construct.
private LearningRateLineSearchConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LearningRateLineSearchConfig() {
maxLearningRate_ = 0F;
numSteps_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LearningRateLineSearchConfig(
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;
case 13: {
maxLearningRate_ = input.readFloat();
break;
}
case 16: {
numSteps_ = input.readInt32();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder.class);
}
public static final int MAX_LEARNING_RATE_FIELD_NUMBER = 1;
private float maxLearningRate_;
/**
*
* Max learning rate. Must be strictly positive.
*
*
* float max_learning_rate = 1;
*/
public float getMaxLearningRate() {
return maxLearningRate_;
}
public static final int NUM_STEPS_FIELD_NUMBER = 2;
private int numSteps_;
/**
*
* Number of learning rate values to consider between [0, max_learning_rate).
*
*
* int32 num_steps = 2;
*/
public int getNumSteps() {
return numSteps_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (maxLearningRate_ != 0F) {
output.writeFloat(1, maxLearningRate_);
}
if (numSteps_ != 0) {
output.writeInt32(2, numSteps_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxLearningRate_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, maxLearningRate_);
}
if (numSteps_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, numSteps_);
}
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 tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) obj;
boolean result = true;
result = result && (
java.lang.Float.floatToIntBits(getMaxLearningRate())
== java.lang.Float.floatToIntBits(
other.getMaxLearningRate()));
result = result && (getNumSteps()
== other.getNumSteps());
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) + MAX_LEARNING_RATE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMaxLearningRate());
hash = (37 * hash) + NUM_STEPS_FIELD_NUMBER;
hash = (53 * hash) + getNumSteps();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Config for a tuned learning rate.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateLineSearchConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
maxLearningRate_ = 0F;
numSteps_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig build() {
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig(this);
result.maxLearningRate_ = maxLearningRate_;
result.numSteps_ = numSteps_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance()) return this;
if (other.getMaxLearningRate() != 0F) {
setMaxLearningRate(other.getMaxLearningRate());
}
if (other.getNumSteps() != 0) {
setNumSteps(other.getNumSteps());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private float maxLearningRate_ ;
/**
*
* Max learning rate. Must be strictly positive.
*
*
* float max_learning_rate = 1;
*/
public float getMaxLearningRate() {
return maxLearningRate_;
}
/**
*
* Max learning rate. Must be strictly positive.
*
*
* float max_learning_rate = 1;
*/
public Builder setMaxLearningRate(float value) {
maxLearningRate_ = value;
onChanged();
return this;
}
/**
*
* Max learning rate. Must be strictly positive.
*
*
* float max_learning_rate = 1;
*/
public Builder clearMaxLearningRate() {
maxLearningRate_ = 0F;
onChanged();
return this;
}
private int numSteps_ ;
/**
*
* Number of learning rate values to consider between [0, max_learning_rate).
*
*
* int32 num_steps = 2;
*/
public int getNumSteps() {
return numSteps_;
}
/**
*
* Number of learning rate values to consider between [0, max_learning_rate).
*
*
* int32 num_steps = 2;
*/
public Builder setNumSteps(int value) {
numSteps_ = value;
onChanged();
return this;
}
/**
*
* Number of learning rate values to consider between [0, max_learning_rate).
*
*
* int32 num_steps = 2;
*/
public Builder clearNumSteps() {
numSteps_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
private static final tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig();
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LearningRateLineSearchConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LearningRateLineSearchConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AveragingConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.AveragingConfig)
com.google.protobuf.MessageOrBuilder {
/**
* float average_last_n_trees = 1;
*/
float getAverageLastNTrees();
/**
*
* Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
* ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
* last half of the trees are averaged etc.
*
*
* float average_last_percent_trees = 2;
*/
float getAverageLastPercentTrees();
public tensorflow.boosted_trees.learner.Learner.AveragingConfig.ConfigCase getConfigCase();
}
/**
*
* When we have a sequence of trees 1, 2, 3 ... n, these essentially represent
* weights updates in functional space, and thus we can use averaging of weight
* updates to achieve better performance. For example, we can say that our final
* ensemble will be an average of ensembles of tree 1, and ensemble of tree 1
* and tree 2 etc .. ensemble of all trees.
* Note that this averaging will apply ONLY DURING PREDICTION. The training
* stays the same.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.AveragingConfig}
*/
public static final class AveragingConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.AveragingConfig)
AveragingConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use AveragingConfig.newBuilder() to construct.
private AveragingConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AveragingConfig() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AveragingConfig(
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;
case 13: {
configCase_ = 1;
config_ = input.readFloat();
break;
}
case 21: {
configCase_ = 2;
config_ = input.readFloat();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.AveragingConfig.class, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder.class);
}
private int configCase_ = 0;
private java.lang.Object config_;
public enum ConfigCase
implements com.google.protobuf.Internal.EnumLite {
AVERAGE_LAST_N_TREES(1),
AVERAGE_LAST_PERCENT_TREES(2),
CONFIG_NOT_SET(0);
private final int value;
private ConfigCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ConfigCase valueOf(int value) {
return forNumber(value);
}
public static ConfigCase forNumber(int value) {
switch (value) {
case 1: return AVERAGE_LAST_N_TREES;
case 2: return AVERAGE_LAST_PERCENT_TREES;
case 0: return CONFIG_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ConfigCase
getConfigCase() {
return ConfigCase.forNumber(
configCase_);
}
public static final int AVERAGE_LAST_N_TREES_FIELD_NUMBER = 1;
/**
* float average_last_n_trees = 1;
*/
public float getAverageLastNTrees() {
if (configCase_ == 1) {
return (java.lang.Float) config_;
}
return 0F;
}
public static final int AVERAGE_LAST_PERCENT_TREES_FIELD_NUMBER = 2;
/**
*
* Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
* ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
* last half of the trees are averaged etc.
*
*
* float average_last_percent_trees = 2;
*/
public float getAverageLastPercentTrees() {
if (configCase_ == 2) {
return (java.lang.Float) config_;
}
return 0F;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (configCase_ == 1) {
output.writeFloat(
1, (float)((java.lang.Float) config_));
}
if (configCase_ == 2) {
output.writeFloat(
2, (float)((java.lang.Float) config_));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (configCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
1, (float)((java.lang.Float) config_));
}
if (configCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
2, (float)((java.lang.Float) config_));
}
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 tensorflow.boosted_trees.learner.Learner.AveragingConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.AveragingConfig other = (tensorflow.boosted_trees.learner.Learner.AveragingConfig) obj;
boolean result = true;
result = result && getConfigCase().equals(
other.getConfigCase());
if (!result) return false;
switch (configCase_) {
case 1:
result = result && (
java.lang.Float.floatToIntBits(getAverageLastNTrees())
== java.lang.Float.floatToIntBits(
other.getAverageLastNTrees()));
break;
case 2:
result = result && (
java.lang.Float.floatToIntBits(getAverageLastPercentTrees())
== java.lang.Float.floatToIntBits(
other.getAverageLastPercentTrees()));
break;
case 0:
default:
}
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();
switch (configCase_) {
case 1:
hash = (37 * hash) + AVERAGE_LAST_N_TREES_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getAverageLastNTrees());
break;
case 2:
hash = (37 * hash) + AVERAGE_LAST_PERCENT_TREES_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getAverageLastPercentTrees());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig 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 tensorflow.boosted_trees.learner.Learner.AveragingConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig 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 tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.AveragingConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* When we have a sequence of trees 1, 2, 3 ... n, these essentially represent
* weights updates in functional space, and thus we can use averaging of weight
* updates to achieve better performance. For example, we can say that our final
* ensemble will be an average of ensembles of tree 1, and ensemble of tree 1
* and tree 2 etc .. ensemble of all trees.
* Note that this averaging will apply ONLY DURING PREDICTION. The training
* stays the same.
*
*
* Protobuf type {@code tensorflow.boosted_trees.learner.AveragingConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.AveragingConfig)
tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.AveragingConfig.class, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.AveragingConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
configCase_ = 0;
config_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.AveragingConfig build() {
tensorflow.boosted_trees.learner.Learner.AveragingConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.AveragingConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.AveragingConfig result = new tensorflow.boosted_trees.learner.Learner.AveragingConfig(this);
if (configCase_ == 1) {
result.config_ = config_;
}
if (configCase_ == 2) {
result.config_ = config_;
}
result.configCase_ = configCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.AveragingConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.AveragingConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.AveragingConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance()) return this;
switch (other.getConfigCase()) {
case AVERAGE_LAST_N_TREES: {
setAverageLastNTrees(other.getAverageLastNTrees());
break;
}
case AVERAGE_LAST_PERCENT_TREES: {
setAverageLastPercentTrees(other.getAverageLastPercentTrees());
break;
}
case CONFIG_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.AveragingConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.AveragingConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int configCase_ = 0;
private java.lang.Object config_;
public ConfigCase
getConfigCase() {
return ConfigCase.forNumber(
configCase_);
}
public Builder clearConfig() {
configCase_ = 0;
config_ = null;
onChanged();
return this;
}
/**
* float average_last_n_trees = 1;
*/
public float getAverageLastNTrees() {
if (configCase_ == 1) {
return (java.lang.Float) config_;
}
return 0F;
}
/**
* float average_last_n_trees = 1;
*/
public Builder setAverageLastNTrees(float value) {
configCase_ = 1;
config_ = value;
onChanged();
return this;
}
/**
* float average_last_n_trees = 1;
*/
public Builder clearAverageLastNTrees() {
if (configCase_ == 1) {
configCase_ = 0;
config_ = null;
onChanged();
}
return this;
}
/**
*
* Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
* ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
* last half of the trees are averaged etc.
*
*
* float average_last_percent_trees = 2;
*/
public float getAverageLastPercentTrees() {
if (configCase_ == 2) {
return (java.lang.Float) config_;
}
return 0F;
}
/**
*
* Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
* ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
* last half of the trees are averaged etc.
*
*
* float average_last_percent_trees = 2;
*/
public Builder setAverageLastPercentTrees(float value) {
configCase_ = 2;
config_ = value;
onChanged();
return this;
}
/**
*
* Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
* ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
* last half of the trees are averaged etc.
*
*
* float average_last_percent_trees = 2;
*/
public Builder clearAverageLastPercentTrees() {
if (configCase_ == 2) {
configCase_ = 0;
config_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.AveragingConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.AveragingConfig)
private static final tensorflow.boosted_trees.learner.Learner.AveragingConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.AveragingConfig();
}
public static tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AveragingConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AveragingConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LearningRateDropoutDrivenConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Probability of dropping each tree in an existing so far ensemble.
*
*
* float dropout_probability = 1;
*/
float getDropoutProbability();
/**
*
* When trees are built after dropout happen, they don't "advance" to the
* optimal solution, they just rearrange the path. However you can still
* choose to skip dropout periodically, to allow a new tree that "advances"
* to be added.
* For example, if running for 200 steps with probability of dropout 1/100,
* you would expect the dropout to start happening for sure for all iterations
* after 100. However you can add probability_of_skipping_dropout of 0.1, this
* way iterations 100-200 will include approx 90 iterations of dropout and 10
* iterations of normal steps.Set it to 0 if you want just keep building
* the refinement trees after dropout kicks in.
*
*
* float probability_of_skipping_dropout = 2;
*/
float getProbabilityOfSkippingDropout();
/**
*
* Between 0 and 1.
*
*
* float learning_rate = 3;
*/
float getLearningRate();
}
/**
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig}
*/
public static final class LearningRateDropoutDrivenConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
LearningRateDropoutDrivenConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LearningRateDropoutDrivenConfig.newBuilder() to construct.
private LearningRateDropoutDrivenConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LearningRateDropoutDrivenConfig() {
dropoutProbability_ = 0F;
probabilityOfSkippingDropout_ = 0F;
learningRate_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LearningRateDropoutDrivenConfig(
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;
case 13: {
dropoutProbability_ = input.readFloat();
break;
}
case 21: {
probabilityOfSkippingDropout_ = input.readFloat();
break;
}
case 29: {
learningRate_ = input.readFloat();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder.class);
}
public static final int DROPOUT_PROBABILITY_FIELD_NUMBER = 1;
private float dropoutProbability_;
/**
*
* Probability of dropping each tree in an existing so far ensemble.
*
*
* float dropout_probability = 1;
*/
public float getDropoutProbability() {
return dropoutProbability_;
}
public static final int PROBABILITY_OF_SKIPPING_DROPOUT_FIELD_NUMBER = 2;
private float probabilityOfSkippingDropout_;
/**
*
* When trees are built after dropout happen, they don't "advance" to the
* optimal solution, they just rearrange the path. However you can still
* choose to skip dropout periodically, to allow a new tree that "advances"
* to be added.
* For example, if running for 200 steps with probability of dropout 1/100,
* you would expect the dropout to start happening for sure for all iterations
* after 100. However you can add probability_of_skipping_dropout of 0.1, this
* way iterations 100-200 will include approx 90 iterations of dropout and 10
* iterations of normal steps.Set it to 0 if you want just keep building
* the refinement trees after dropout kicks in.
*
*
* float probability_of_skipping_dropout = 2;
*/
public float getProbabilityOfSkippingDropout() {
return probabilityOfSkippingDropout_;
}
public static final int LEARNING_RATE_FIELD_NUMBER = 3;
private float learningRate_;
/**
*
* Between 0 and 1.
*
*
* float learning_rate = 3;
*/
public float getLearningRate() {
return learningRate_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (dropoutProbability_ != 0F) {
output.writeFloat(1, dropoutProbability_);
}
if (probabilityOfSkippingDropout_ != 0F) {
output.writeFloat(2, probabilityOfSkippingDropout_);
}
if (learningRate_ != 0F) {
output.writeFloat(3, learningRate_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (dropoutProbability_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, dropoutProbability_);
}
if (probabilityOfSkippingDropout_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, probabilityOfSkippingDropout_);
}
if (learningRate_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, learningRate_);
}
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 tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) obj;
boolean result = true;
result = result && (
java.lang.Float.floatToIntBits(getDropoutProbability())
== java.lang.Float.floatToIntBits(
other.getDropoutProbability()));
result = result && (
java.lang.Float.floatToIntBits(getProbabilityOfSkippingDropout())
== java.lang.Float.floatToIntBits(
other.getProbabilityOfSkippingDropout()));
result = result && (
java.lang.Float.floatToIntBits(getLearningRate())
== java.lang.Float.floatToIntBits(
other.getLearningRate()));
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) + DROPOUT_PROBABILITY_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getDropoutProbability());
hash = (37 * hash) + PROBABILITY_OF_SKIPPING_DROPOUT_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getProbabilityOfSkippingDropout());
hash = (37 * hash) + LEARNING_RATE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLearningRate());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
* Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
dropoutProbability_ = 0F;
probabilityOfSkippingDropout_ = 0F;
learningRate_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig build() {
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig(this);
result.dropoutProbability_ = dropoutProbability_;
result.probabilityOfSkippingDropout_ = probabilityOfSkippingDropout_;
result.learningRate_ = learningRate_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance()) return this;
if (other.getDropoutProbability() != 0F) {
setDropoutProbability(other.getDropoutProbability());
}
if (other.getProbabilityOfSkippingDropout() != 0F) {
setProbabilityOfSkippingDropout(other.getProbabilityOfSkippingDropout());
}
if (other.getLearningRate() != 0F) {
setLearningRate(other.getLearningRate());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private float dropoutProbability_ ;
/**
*
* Probability of dropping each tree in an existing so far ensemble.
*
*
* float dropout_probability = 1;
*/
public float getDropoutProbability() {
return dropoutProbability_;
}
/**
*
* Probability of dropping each tree in an existing so far ensemble.
*
*
* float dropout_probability = 1;
*/
public Builder setDropoutProbability(float value) {
dropoutProbability_ = value;
onChanged();
return this;
}
/**
*
* Probability of dropping each tree in an existing so far ensemble.
*
*
* float dropout_probability = 1;
*/
public Builder clearDropoutProbability() {
dropoutProbability_ = 0F;
onChanged();
return this;
}
private float probabilityOfSkippingDropout_ ;
/**
*
* When trees are built after dropout happen, they don't "advance" to the
* optimal solution, they just rearrange the path. However you can still
* choose to skip dropout periodically, to allow a new tree that "advances"
* to be added.
* For example, if running for 200 steps with probability of dropout 1/100,
* you would expect the dropout to start happening for sure for all iterations
* after 100. However you can add probability_of_skipping_dropout of 0.1, this
* way iterations 100-200 will include approx 90 iterations of dropout and 10
* iterations of normal steps.Set it to 0 if you want just keep building
* the refinement trees after dropout kicks in.
*
*
* float probability_of_skipping_dropout = 2;
*/
public float getProbabilityOfSkippingDropout() {
return probabilityOfSkippingDropout_;
}
/**
*
* When trees are built after dropout happen, they don't "advance" to the
* optimal solution, they just rearrange the path. However you can still
* choose to skip dropout periodically, to allow a new tree that "advances"
* to be added.
* For example, if running for 200 steps with probability of dropout 1/100,
* you would expect the dropout to start happening for sure for all iterations
* after 100. However you can add probability_of_skipping_dropout of 0.1, this
* way iterations 100-200 will include approx 90 iterations of dropout and 10
* iterations of normal steps.Set it to 0 if you want just keep building
* the refinement trees after dropout kicks in.
*
*
* float probability_of_skipping_dropout = 2;
*/
public Builder setProbabilityOfSkippingDropout(float value) {
probabilityOfSkippingDropout_ = value;
onChanged();
return this;
}
/**
*
* When trees are built after dropout happen, they don't "advance" to the
* optimal solution, they just rearrange the path. However you can still
* choose to skip dropout periodically, to allow a new tree that "advances"
* to be added.
* For example, if running for 200 steps with probability of dropout 1/100,
* you would expect the dropout to start happening for sure for all iterations
* after 100. However you can add probability_of_skipping_dropout of 0.1, this
* way iterations 100-200 will include approx 90 iterations of dropout and 10
* iterations of normal steps.Set it to 0 if you want just keep building
* the refinement trees after dropout kicks in.
*
*
* float probability_of_skipping_dropout = 2;
*/
public Builder clearProbabilityOfSkippingDropout() {
probabilityOfSkippingDropout_ = 0F;
onChanged();
return this;
}
private float learningRate_ ;
/**
*
* Between 0 and 1.
*
*
* float learning_rate = 3;
*/
public float getLearningRate() {
return learningRate_;
}
/**
*
* Between 0 and 1.
*
*
* float learning_rate = 3;
*/
public Builder setLearningRate(float value) {
learningRate_ = value;
onChanged();
return this;
}
/**
*
* Between 0 and 1.
*
*
* float learning_rate = 3;
*/
public Builder clearLearningRate() {
learningRate_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
private static final tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig();
}
public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LearningRateDropoutDrivenConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LearningRateDropoutDrivenConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LearnerConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearnerConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Number of classes.
*
*
* uint32 num_classes = 1;
*/
int getNumClasses();
/**
* float feature_fraction_per_tree = 2;
*/
float getFeatureFractionPerTree();
/**
* float feature_fraction_per_level = 3;
*/
float getFeatureFractionPerLevel();
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
boolean hasRegularization();
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization();
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder();
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
boolean hasConstraints();
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints();
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder();
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
int getPruningModeValue();
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode();
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
int getGrowingModeValue();
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode();
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
boolean hasLearningRateTuner();
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner();
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder();
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
int getMultiClassStrategyValue();
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy();
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
boolean hasAveragingConfig();
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig();
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder();
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
int getWeakLearnerTypeValue();
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType getWeakLearnerType();
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.FeatureFractionCase getFeatureFractionCase();
}
/**
* Protobuf type {@code tensorflow.boosted_trees.learner.LearnerConfig}
*/
public static final class LearnerConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearnerConfig)
LearnerConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LearnerConfig.newBuilder() to construct.
private LearnerConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LearnerConfig() {
numClasses_ = 0;
pruningMode_ = 0;
growingMode_ = 0;
multiClassStrategy_ = 0;
weakLearnerType_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LearnerConfig(
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;
case 8: {
numClasses_ = input.readUInt32();
break;
}
case 21: {
featureFractionCase_ = 2;
featureFraction_ = input.readFloat();
break;
}
case 29: {
featureFractionCase_ = 3;
featureFraction_ = input.readFloat();
break;
}
case 34: {
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder subBuilder = null;
if (regularization_ != null) {
subBuilder = regularization_.toBuilder();
}
regularization_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regularization_);
regularization_ = subBuilder.buildPartial();
}
break;
}
case 42: {
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder subBuilder = null;
if (constraints_ != null) {
subBuilder = constraints_.toBuilder();
}
constraints_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(constraints_);
constraints_ = subBuilder.buildPartial();
}
break;
}
case 50: {
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder subBuilder = null;
if (learningRateTuner_ != null) {
subBuilder = learningRateTuner_.toBuilder();
}
learningRateTuner_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(learningRateTuner_);
learningRateTuner_ = subBuilder.buildPartial();
}
break;
}
case 64: {
int rawValue = input.readEnum();
pruningMode_ = rawValue;
break;
}
case 72: {
int rawValue = input.readEnum();
growingMode_ = rawValue;
break;
}
case 80: {
int rawValue = input.readEnum();
multiClassStrategy_ = rawValue;
break;
}
case 90: {
tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder subBuilder = null;
if (averagingConfig_ != null) {
subBuilder = averagingConfig_.toBuilder();
}
averagingConfig_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.AveragingConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(averagingConfig_);
averagingConfig_ = subBuilder.buildPartial();
}
break;
}
case 96: {
int rawValue = input.readEnum();
weakLearnerType_ = rawValue;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearnerConfig.class, tensorflow.boosted_trees.learner.Learner.LearnerConfig.Builder.class);
}
/**
* Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.PruningMode}
*/
public enum PruningMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PRUNING_MODE_UNSPECIFIED = 0;
*/
PRUNING_MODE_UNSPECIFIED(0),
/**
* PRE_PRUNE = 1;
*/
PRE_PRUNE(1),
/**
* POST_PRUNE = 2;
*/
POST_PRUNE(2),
UNRECOGNIZED(-1),
;
/**
* PRUNING_MODE_UNSPECIFIED = 0;
*/
public static final int PRUNING_MODE_UNSPECIFIED_VALUE = 0;
/**
* PRE_PRUNE = 1;
*/
public static final int PRE_PRUNE_VALUE = 1;
/**
* POST_PRUNE = 2;
*/
public static final int POST_PRUNE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PruningMode valueOf(int value) {
return forNumber(value);
}
public static PruningMode forNumber(int value) {
switch (value) {
case 0: return PRUNING_MODE_UNSPECIFIED;
case 1: return PRE_PRUNE;
case 2: return POST_PRUNE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PruningMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PruningMode findValueByNumber(int number) {
return PruningMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(0);
}
private static final PruningMode[] VALUES = values();
public static PruningMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PruningMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.PruningMode)
}
/**
* Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode}
*/
public enum GrowingMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* GROWING_MODE_UNSPECIFIED = 0;
*/
GROWING_MODE_UNSPECIFIED(0),
/**
* WHOLE_TREE = 1;
*/
WHOLE_TREE(1),
/**
* LAYER_BY_LAYER = 2;
*/
LAYER_BY_LAYER(2),
UNRECOGNIZED(-1),
;
/**
* GROWING_MODE_UNSPECIFIED = 0;
*/
public static final int GROWING_MODE_UNSPECIFIED_VALUE = 0;
/**
* WHOLE_TREE = 1;
*/
public static final int WHOLE_TREE_VALUE = 1;
/**
* LAYER_BY_LAYER = 2;
*/
public static final int LAYER_BY_LAYER_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static GrowingMode valueOf(int value) {
return forNumber(value);
}
public static GrowingMode forNumber(int value) {
switch (value) {
case 0: return GROWING_MODE_UNSPECIFIED;
case 1: return WHOLE_TREE;
case 2: return LAYER_BY_LAYER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
GrowingMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public GrowingMode findValueByNumber(int number) {
return GrowingMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(1);
}
private static final GrowingMode[] VALUES = values();
public static GrowingMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private GrowingMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode)
}
/**
* Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy}
*/
public enum MultiClassStrategy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MULTI_CLASS_STRATEGY_UNSPECIFIED = 0;
*/
MULTI_CLASS_STRATEGY_UNSPECIFIED(0),
/**
* TREE_PER_CLASS = 1;
*/
TREE_PER_CLASS(1),
/**
* FULL_HESSIAN = 2;
*/
FULL_HESSIAN(2),
/**
* DIAGONAL_HESSIAN = 3;
*/
DIAGONAL_HESSIAN(3),
UNRECOGNIZED(-1),
;
/**
* MULTI_CLASS_STRATEGY_UNSPECIFIED = 0;
*/
public static final int MULTI_CLASS_STRATEGY_UNSPECIFIED_VALUE = 0;
/**
* TREE_PER_CLASS = 1;
*/
public static final int TREE_PER_CLASS_VALUE = 1;
/**
* FULL_HESSIAN = 2;
*/
public static final int FULL_HESSIAN_VALUE = 2;
/**
* DIAGONAL_HESSIAN = 3;
*/
public static final int DIAGONAL_HESSIAN_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MultiClassStrategy valueOf(int value) {
return forNumber(value);
}
public static MultiClassStrategy forNumber(int value) {
switch (value) {
case 0: return MULTI_CLASS_STRATEGY_UNSPECIFIED;
case 1: return TREE_PER_CLASS;
case 2: return FULL_HESSIAN;
case 3: return DIAGONAL_HESSIAN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MultiClassStrategy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MultiClassStrategy findValueByNumber(int number) {
return MultiClassStrategy.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(2);
}
private static final MultiClassStrategy[] VALUES = values();
public static MultiClassStrategy valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private MultiClassStrategy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy)
}
/**
* Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType}
*/
public enum WeakLearnerType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* NORMAL_DECISION_TREE = 0;
*/
NORMAL_DECISION_TREE(0),
/**
* OBLIVIOUS_DECISION_TREE = 1;
*/
OBLIVIOUS_DECISION_TREE(1),
UNRECOGNIZED(-1),
;
/**
* NORMAL_DECISION_TREE = 0;
*/
public static final int NORMAL_DECISION_TREE_VALUE = 0;
/**
* OBLIVIOUS_DECISION_TREE = 1;
*/
public static final int OBLIVIOUS_DECISION_TREE_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WeakLearnerType valueOf(int value) {
return forNumber(value);
}
public static WeakLearnerType forNumber(int value) {
switch (value) {
case 0: return NORMAL_DECISION_TREE;
case 1: return OBLIVIOUS_DECISION_TREE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
WeakLearnerType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WeakLearnerType findValueByNumber(int number) {
return WeakLearnerType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(3);
}
private static final WeakLearnerType[] VALUES = values();
public static WeakLearnerType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private WeakLearnerType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType)
}
private int featureFractionCase_ = 0;
private java.lang.Object featureFraction_;
public enum FeatureFractionCase
implements com.google.protobuf.Internal.EnumLite {
FEATURE_FRACTION_PER_TREE(2),
FEATURE_FRACTION_PER_LEVEL(3),
FEATUREFRACTION_NOT_SET(0);
private final int value;
private FeatureFractionCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static FeatureFractionCase valueOf(int value) {
return forNumber(value);
}
public static FeatureFractionCase forNumber(int value) {
switch (value) {
case 2: return FEATURE_FRACTION_PER_TREE;
case 3: return FEATURE_FRACTION_PER_LEVEL;
case 0: return FEATUREFRACTION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public FeatureFractionCase
getFeatureFractionCase() {
return FeatureFractionCase.forNumber(
featureFractionCase_);
}
public static final int NUM_CLASSES_FIELD_NUMBER = 1;
private int numClasses_;
/**
*
* Number of classes.
*
*
* uint32 num_classes = 1;
*/
public int getNumClasses() {
return numClasses_;
}
public static final int FEATURE_FRACTION_PER_TREE_FIELD_NUMBER = 2;
/**
* float feature_fraction_per_tree = 2;
*/
public float getFeatureFractionPerTree() {
if (featureFractionCase_ == 2) {
return (java.lang.Float) featureFraction_;
}
return 0F;
}
public static final int FEATURE_FRACTION_PER_LEVEL_FIELD_NUMBER = 3;
/**
* float feature_fraction_per_level = 3;
*/
public float getFeatureFractionPerLevel() {
if (featureFractionCase_ == 3) {
return (java.lang.Float) featureFraction_;
}
return 0F;
}
public static final int REGULARIZATION_FIELD_NUMBER = 4;
private tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig regularization_;
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public boolean hasRegularization() {
return regularization_ != null;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization() {
return regularization_ == null ? tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder() {
return getRegularization();
}
public static final int CONSTRAINTS_FIELD_NUMBER = 5;
private tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig constraints_;
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public boolean hasConstraints() {
return constraints_ != null;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints() {
return constraints_ == null ? tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder() {
return getConstraints();
}
public static final int PRUNING_MODE_FIELD_NUMBER = 8;
private int pruningMode_;
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public int getPruningModeValue() {
return pruningMode_;
}
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.valueOf(pruningMode_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.UNRECOGNIZED : result;
}
public static final int GROWING_MODE_FIELD_NUMBER = 9;
private int growingMode_;
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public int getGrowingModeValue() {
return growingMode_;
}
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.valueOf(growingMode_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.UNRECOGNIZED : result;
}
public static final int LEARNING_RATE_TUNER_FIELD_NUMBER = 6;
private tensorflow.boosted_trees.learner.Learner.LearningRateConfig learningRateTuner_;
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public boolean hasLearningRateTuner() {
return learningRateTuner_ != null;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner() {
return learningRateTuner_ == null ? tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder() {
return getLearningRateTuner();
}
public static final int MULTI_CLASS_STRATEGY_FIELD_NUMBER = 10;
private int multiClassStrategy_;
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public int getMultiClassStrategyValue() {
return multiClassStrategy_;
}
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.valueOf(multiClassStrategy_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.UNRECOGNIZED : result;
}
public static final int AVERAGING_CONFIG_FIELD_NUMBER = 11;
private tensorflow.boosted_trees.learner.Learner.AveragingConfig averagingConfig_;
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public boolean hasAveragingConfig() {
return averagingConfig_ != null;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig() {
return averagingConfig_ == null ? tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder() {
return getAveragingConfig();
}
public static final int WEAK_LEARNER_TYPE_FIELD_NUMBER = 12;
private int weakLearnerType_;
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public int getWeakLearnerTypeValue() {
return weakLearnerType_;
}
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType getWeakLearnerType() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.valueOf(weakLearnerType_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (numClasses_ != 0) {
output.writeUInt32(1, numClasses_);
}
if (featureFractionCase_ == 2) {
output.writeFloat(
2, (float)((java.lang.Float) featureFraction_));
}
if (featureFractionCase_ == 3) {
output.writeFloat(
3, (float)((java.lang.Float) featureFraction_));
}
if (regularization_ != null) {
output.writeMessage(4, getRegularization());
}
if (constraints_ != null) {
output.writeMessage(5, getConstraints());
}
if (learningRateTuner_ != null) {
output.writeMessage(6, getLearningRateTuner());
}
if (pruningMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.PRUNING_MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(8, pruningMode_);
}
if (growingMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.GROWING_MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(9, growingMode_);
}
if (multiClassStrategy_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.MULTI_CLASS_STRATEGY_UNSPECIFIED.getNumber()) {
output.writeEnum(10, multiClassStrategy_);
}
if (averagingConfig_ != null) {
output.writeMessage(11, getAveragingConfig());
}
if (weakLearnerType_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.NORMAL_DECISION_TREE.getNumber()) {
output.writeEnum(12, weakLearnerType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numClasses_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, numClasses_);
}
if (featureFractionCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
2, (float)((java.lang.Float) featureFraction_));
}
if (featureFractionCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
3, (float)((java.lang.Float) featureFraction_));
}
if (regularization_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getRegularization());
}
if (constraints_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getConstraints());
}
if (learningRateTuner_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getLearningRateTuner());
}
if (pruningMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.PRUNING_MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, pruningMode_);
}
if (growingMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.GROWING_MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, growingMode_);
}
if (multiClassStrategy_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.MULTI_CLASS_STRATEGY_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, multiClassStrategy_);
}
if (averagingConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getAveragingConfig());
}
if (weakLearnerType_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.NORMAL_DECISION_TREE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(12, weakLearnerType_);
}
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 tensorflow.boosted_trees.learner.Learner.LearnerConfig)) {
return super.equals(obj);
}
tensorflow.boosted_trees.learner.Learner.LearnerConfig other = (tensorflow.boosted_trees.learner.Learner.LearnerConfig) obj;
boolean result = true;
result = result && (getNumClasses()
== other.getNumClasses());
result = result && (hasRegularization() == other.hasRegularization());
if (hasRegularization()) {
result = result && getRegularization()
.equals(other.getRegularization());
}
result = result && (hasConstraints() == other.hasConstraints());
if (hasConstraints()) {
result = result && getConstraints()
.equals(other.getConstraints());
}
result = result && pruningMode_ == other.pruningMode_;
result = result && growingMode_ == other.growingMode_;
result = result && (hasLearningRateTuner() == other.hasLearningRateTuner());
if (hasLearningRateTuner()) {
result = result && getLearningRateTuner()
.equals(other.getLearningRateTuner());
}
result = result && multiClassStrategy_ == other.multiClassStrategy_;
result = result && (hasAveragingConfig() == other.hasAveragingConfig());
if (hasAveragingConfig()) {
result = result && getAveragingConfig()
.equals(other.getAveragingConfig());
}
result = result && weakLearnerType_ == other.weakLearnerType_;
result = result && getFeatureFractionCase().equals(
other.getFeatureFractionCase());
if (!result) return false;
switch (featureFractionCase_) {
case 2:
result = result && (
java.lang.Float.floatToIntBits(getFeatureFractionPerTree())
== java.lang.Float.floatToIntBits(
other.getFeatureFractionPerTree()));
break;
case 3:
result = result && (
java.lang.Float.floatToIntBits(getFeatureFractionPerLevel())
== java.lang.Float.floatToIntBits(
other.getFeatureFractionPerLevel()));
break;
case 0:
default:
}
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) + NUM_CLASSES_FIELD_NUMBER;
hash = (53 * hash) + getNumClasses();
if (hasRegularization()) {
hash = (37 * hash) + REGULARIZATION_FIELD_NUMBER;
hash = (53 * hash) + getRegularization().hashCode();
}
if (hasConstraints()) {
hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
hash = (53 * hash) + getConstraints().hashCode();
}
hash = (37 * hash) + PRUNING_MODE_FIELD_NUMBER;
hash = (53 * hash) + pruningMode_;
hash = (37 * hash) + GROWING_MODE_FIELD_NUMBER;
hash = (53 * hash) + growingMode_;
if (hasLearningRateTuner()) {
hash = (37 * hash) + LEARNING_RATE_TUNER_FIELD_NUMBER;
hash = (53 * hash) + getLearningRateTuner().hashCode();
}
hash = (37 * hash) + MULTI_CLASS_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + multiClassStrategy_;
if (hasAveragingConfig()) {
hash = (37 * hash) + AVERAGING_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getAveragingConfig().hashCode();
}
hash = (37 * hash) + WEAK_LEARNER_TYPE_FIELD_NUMBER;
hash = (53 * hash) + weakLearnerType_;
switch (featureFractionCase_) {
case 2:
hash = (37 * hash) + FEATURE_FRACTION_PER_TREE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getFeatureFractionPerTree());
break;
case 3:
hash = (37 * hash) + FEATURE_FRACTION_PER_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getFeatureFractionPerLevel());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig 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 tensorflow.boosted_trees.learner.Learner.LearnerConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig 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 tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearnerConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
* Protobuf type {@code tensorflow.boosted_trees.learner.LearnerConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearnerConfig)
tensorflow.boosted_trees.learner.Learner.LearnerConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.boosted_trees.learner.Learner.LearnerConfig.class, tensorflow.boosted_trees.learner.Learner.LearnerConfig.Builder.class);
}
// Construct using tensorflow.boosted_trees.learner.Learner.LearnerConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
numClasses_ = 0;
if (regularizationBuilder_ == null) {
regularization_ = null;
} else {
regularization_ = null;
regularizationBuilder_ = null;
}
if (constraintsBuilder_ == null) {
constraints_ = null;
} else {
constraints_ = null;
constraintsBuilder_ = null;
}
pruningMode_ = 0;
growingMode_ = 0;
if (learningRateTunerBuilder_ == null) {
learningRateTuner_ = null;
} else {
learningRateTuner_ = null;
learningRateTunerBuilder_ = null;
}
multiClassStrategy_ = 0;
if (averagingConfigBuilder_ == null) {
averagingConfig_ = null;
} else {
averagingConfig_ = null;
averagingConfigBuilder_ = null;
}
weakLearnerType_ = 0;
featureFractionCase_ = 0;
featureFraction_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstanceForType() {
return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDefaultInstance();
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearnerConfig build() {
tensorflow.boosted_trees.learner.Learner.LearnerConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearnerConfig buildPartial() {
tensorflow.boosted_trees.learner.Learner.LearnerConfig result = new tensorflow.boosted_trees.learner.Learner.LearnerConfig(this);
result.numClasses_ = numClasses_;
if (featureFractionCase_ == 2) {
result.featureFraction_ = featureFraction_;
}
if (featureFractionCase_ == 3) {
result.featureFraction_ = featureFraction_;
}
if (regularizationBuilder_ == null) {
result.regularization_ = regularization_;
} else {
result.regularization_ = regularizationBuilder_.build();
}
if (constraintsBuilder_ == null) {
result.constraints_ = constraints_;
} else {
result.constraints_ = constraintsBuilder_.build();
}
result.pruningMode_ = pruningMode_;
result.growingMode_ = growingMode_;
if (learningRateTunerBuilder_ == null) {
result.learningRateTuner_ = learningRateTuner_;
} else {
result.learningRateTuner_ = learningRateTunerBuilder_.build();
}
result.multiClassStrategy_ = multiClassStrategy_;
if (averagingConfigBuilder_ == null) {
result.averagingConfig_ = averagingConfig_;
} else {
result.averagingConfig_ = averagingConfigBuilder_.build();
}
result.weakLearnerType_ = weakLearnerType_;
result.featureFractionCase_ = featureFractionCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.boosted_trees.learner.Learner.LearnerConfig) {
return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearnerConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearnerConfig other) {
if (other == tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDefaultInstance()) return this;
if (other.getNumClasses() != 0) {
setNumClasses(other.getNumClasses());
}
if (other.hasRegularization()) {
mergeRegularization(other.getRegularization());
}
if (other.hasConstraints()) {
mergeConstraints(other.getConstraints());
}
if (other.pruningMode_ != 0) {
setPruningModeValue(other.getPruningModeValue());
}
if (other.growingMode_ != 0) {
setGrowingModeValue(other.getGrowingModeValue());
}
if (other.hasLearningRateTuner()) {
mergeLearningRateTuner(other.getLearningRateTuner());
}
if (other.multiClassStrategy_ != 0) {
setMultiClassStrategyValue(other.getMultiClassStrategyValue());
}
if (other.hasAveragingConfig()) {
mergeAveragingConfig(other.getAveragingConfig());
}
if (other.weakLearnerType_ != 0) {
setWeakLearnerTypeValue(other.getWeakLearnerTypeValue());
}
switch (other.getFeatureFractionCase()) {
case FEATURE_FRACTION_PER_TREE: {
setFeatureFractionPerTree(other.getFeatureFractionPerTree());
break;
}
case FEATURE_FRACTION_PER_LEVEL: {
setFeatureFractionPerLevel(other.getFeatureFractionPerLevel());
break;
}
case FEATUREFRACTION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.boosted_trees.learner.Learner.LearnerConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearnerConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int featureFractionCase_ = 0;
private java.lang.Object featureFraction_;
public FeatureFractionCase
getFeatureFractionCase() {
return FeatureFractionCase.forNumber(
featureFractionCase_);
}
public Builder clearFeatureFraction() {
featureFractionCase_ = 0;
featureFraction_ = null;
onChanged();
return this;
}
private int numClasses_ ;
/**
*
* Number of classes.
*
*
* uint32 num_classes = 1;
*/
public int getNumClasses() {
return numClasses_;
}
/**
*
* Number of classes.
*
*
* uint32 num_classes = 1;
*/
public Builder setNumClasses(int value) {
numClasses_ = value;
onChanged();
return this;
}
/**
*
* Number of classes.
*
*
* uint32 num_classes = 1;
*/
public Builder clearNumClasses() {
numClasses_ = 0;
onChanged();
return this;
}
/**
* float feature_fraction_per_tree = 2;
*/
public float getFeatureFractionPerTree() {
if (featureFractionCase_ == 2) {
return (java.lang.Float) featureFraction_;
}
return 0F;
}
/**
* float feature_fraction_per_tree = 2;
*/
public Builder setFeatureFractionPerTree(float value) {
featureFractionCase_ = 2;
featureFraction_ = value;
onChanged();
return this;
}
/**
* float feature_fraction_per_tree = 2;
*/
public Builder clearFeatureFractionPerTree() {
if (featureFractionCase_ == 2) {
featureFractionCase_ = 0;
featureFraction_ = null;
onChanged();
}
return this;
}
/**
* float feature_fraction_per_level = 3;
*/
public float getFeatureFractionPerLevel() {
if (featureFractionCase_ == 3) {
return (java.lang.Float) featureFraction_;
}
return 0F;
}
/**
* float feature_fraction_per_level = 3;
*/
public Builder setFeatureFractionPerLevel(float value) {
featureFractionCase_ = 3;
featureFraction_ = value;
onChanged();
return this;
}
/**
* float feature_fraction_per_level = 3;
*/
public Builder clearFeatureFractionPerLevel() {
if (featureFractionCase_ == 3) {
featureFractionCase_ = 0;
featureFraction_ = null;
onChanged();
}
return this;
}
private tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig regularization_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder> regularizationBuilder_;
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public boolean hasRegularization() {
return regularizationBuilder_ != null || regularization_ != null;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization() {
if (regularizationBuilder_ == null) {
return regularization_ == null ? tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
} else {
return regularizationBuilder_.getMessage();
}
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public Builder setRegularization(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig value) {
if (regularizationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
regularization_ = value;
onChanged();
} else {
regularizationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public Builder setRegularization(
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder builderForValue) {
if (regularizationBuilder_ == null) {
regularization_ = builderForValue.build();
onChanged();
} else {
regularizationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public Builder mergeRegularization(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig value) {
if (regularizationBuilder_ == null) {
if (regularization_ != null) {
regularization_ =
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.newBuilder(regularization_).mergeFrom(value).buildPartial();
} else {
regularization_ = value;
}
onChanged();
} else {
regularizationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public Builder clearRegularization() {
if (regularizationBuilder_ == null) {
regularization_ = null;
onChanged();
} else {
regularization_ = null;
regularizationBuilder_ = null;
}
return this;
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder getRegularizationBuilder() {
onChanged();
return getRegularizationFieldBuilder().getBuilder();
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder() {
if (regularizationBuilder_ != null) {
return regularizationBuilder_.getMessageOrBuilder();
} else {
return regularization_ == null ?
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
}
}
/**
*
* Regularization.
*
*
* .tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder>
getRegularizationFieldBuilder() {
if (regularizationBuilder_ == null) {
regularizationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder>(
getRegularization(),
getParentForChildren(),
isClean());
regularization_ = null;
}
return regularizationBuilder_;
}
private tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig constraints_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder> constraintsBuilder_;
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public boolean hasConstraints() {
return constraintsBuilder_ != null || constraints_ != null;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints() {
if (constraintsBuilder_ == null) {
return constraints_ == null ? tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
} else {
return constraintsBuilder_.getMessage();
}
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public Builder setConstraints(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig value) {
if (constraintsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraints_ = value;
onChanged();
} else {
constraintsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public Builder setConstraints(
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder builderForValue) {
if (constraintsBuilder_ == null) {
constraints_ = builderForValue.build();
onChanged();
} else {
constraintsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public Builder mergeConstraints(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig value) {
if (constraintsBuilder_ == null) {
if (constraints_ != null) {
constraints_ =
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.newBuilder(constraints_).mergeFrom(value).buildPartial();
} else {
constraints_ = value;
}
onChanged();
} else {
constraintsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public Builder clearConstraints() {
if (constraintsBuilder_ == null) {
constraints_ = null;
onChanged();
} else {
constraints_ = null;
constraintsBuilder_ = null;
}
return this;
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder getConstraintsBuilder() {
onChanged();
return getConstraintsFieldBuilder().getBuilder();
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder() {
if (constraintsBuilder_ != null) {
return constraintsBuilder_.getMessageOrBuilder();
} else {
return constraints_ == null ?
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
}
}
/**
*
* Constraints.
*
*
* .tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder>
getConstraintsFieldBuilder() {
if (constraintsBuilder_ == null) {
constraintsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder>(
getConstraints(),
getParentForChildren(),
isClean());
constraints_ = null;
}
return constraintsBuilder_;
}
private int pruningMode_ = 0;
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public int getPruningModeValue() {
return pruningMode_;
}
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public Builder setPruningModeValue(int value) {
pruningMode_ = value;
onChanged();
return this;
}
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.valueOf(pruningMode_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.UNRECOGNIZED : result;
}
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public Builder setPruningMode(tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode value) {
if (value == null) {
throw new NullPointerException();
}
pruningMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Pruning. POST_PRUNE is the default pruning mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;
*/
public Builder clearPruningMode() {
pruningMode_ = 0;
onChanged();
return this;
}
private int growingMode_ = 0;
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public int getGrowingModeValue() {
return growingMode_;
}
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public Builder setGrowingModeValue(int value) {
growingMode_ = value;
onChanged();
return this;
}
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.valueOf(growingMode_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.UNRECOGNIZED : result;
}
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public Builder setGrowingMode(tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode value) {
if (value == null) {
throw new NullPointerException();
}
growingMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Growing Mode. LAYER_BY_LAYER is the default growing mode.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;
*/
public Builder clearGrowingMode() {
growingMode_ = 0;
onChanged();
return this;
}
private tensorflow.boosted_trees.learner.Learner.LearningRateConfig learningRateTuner_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder> learningRateTunerBuilder_;
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public boolean hasLearningRateTuner() {
return learningRateTunerBuilder_ != null || learningRateTuner_ != null;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner() {
if (learningRateTunerBuilder_ == null) {
return learningRateTuner_ == null ? tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
} else {
return learningRateTunerBuilder_.getMessage();
}
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public Builder setLearningRateTuner(tensorflow.boosted_trees.learner.Learner.LearningRateConfig value) {
if (learningRateTunerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
learningRateTuner_ = value;
onChanged();
} else {
learningRateTunerBuilder_.setMessage(value);
}
return this;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public Builder setLearningRateTuner(
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder builderForValue) {
if (learningRateTunerBuilder_ == null) {
learningRateTuner_ = builderForValue.build();
onChanged();
} else {
learningRateTunerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public Builder mergeLearningRateTuner(tensorflow.boosted_trees.learner.Learner.LearningRateConfig value) {
if (learningRateTunerBuilder_ == null) {
if (learningRateTuner_ != null) {
learningRateTuner_ =
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.newBuilder(learningRateTuner_).mergeFrom(value).buildPartial();
} else {
learningRateTuner_ = value;
}
onChanged();
} else {
learningRateTunerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public Builder clearLearningRateTuner() {
if (learningRateTunerBuilder_ == null) {
learningRateTuner_ = null;
onChanged();
} else {
learningRateTuner_ = null;
learningRateTunerBuilder_ = null;
}
return this;
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder getLearningRateTunerBuilder() {
onChanged();
return getLearningRateTunerFieldBuilder().getBuilder();
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
public tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder() {
if (learningRateTunerBuilder_ != null) {
return learningRateTunerBuilder_.getMessageOrBuilder();
} else {
return learningRateTuner_ == null ?
tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
}
}
/**
*
* Learning rate. By default we use fixed learning rate of 0.1.
*
*
* .tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder>
getLearningRateTunerFieldBuilder() {
if (learningRateTunerBuilder_ == null) {
learningRateTunerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder>(
getLearningRateTuner(),
getParentForChildren(),
isClean());
learningRateTuner_ = null;
}
return learningRateTunerBuilder_;
}
private int multiClassStrategy_ = 0;
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public int getMultiClassStrategyValue() {
return multiClassStrategy_;
}
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public Builder setMultiClassStrategyValue(int value) {
multiClassStrategy_ = value;
onChanged();
return this;
}
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.valueOf(multiClassStrategy_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.UNRECOGNIZED : result;
}
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public Builder setMultiClassStrategy(tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy value) {
if (value == null) {
throw new NullPointerException();
}
multiClassStrategy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Multi-class strategy. By default we use TREE_PER_CLASS for binary
* classification and linear regression. For other cases, we use
* DIAGONAL_HESSIAN as the default.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;
*/
public Builder clearMultiClassStrategy() {
multiClassStrategy_ = 0;
onChanged();
return this;
}
private tensorflow.boosted_trees.learner.Learner.AveragingConfig averagingConfig_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder> averagingConfigBuilder_;
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public boolean hasAveragingConfig() {
return averagingConfigBuilder_ != null || averagingConfig_ != null;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig() {
if (averagingConfigBuilder_ == null) {
return averagingConfig_ == null ? tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
} else {
return averagingConfigBuilder_.getMessage();
}
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public Builder setAveragingConfig(tensorflow.boosted_trees.learner.Learner.AveragingConfig value) {
if (averagingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
averagingConfig_ = value;
onChanged();
} else {
averagingConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public Builder setAveragingConfig(
tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder builderForValue) {
if (averagingConfigBuilder_ == null) {
averagingConfig_ = builderForValue.build();
onChanged();
} else {
averagingConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public Builder mergeAveragingConfig(tensorflow.boosted_trees.learner.Learner.AveragingConfig value) {
if (averagingConfigBuilder_ == null) {
if (averagingConfig_ != null) {
averagingConfig_ =
tensorflow.boosted_trees.learner.Learner.AveragingConfig.newBuilder(averagingConfig_).mergeFrom(value).buildPartial();
} else {
averagingConfig_ = value;
}
onChanged();
} else {
averagingConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public Builder clearAveragingConfig() {
if (averagingConfigBuilder_ == null) {
averagingConfig_ = null;
onChanged();
} else {
averagingConfig_ = null;
averagingConfigBuilder_ = null;
}
return this;
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder getAveragingConfigBuilder() {
onChanged();
return getAveragingConfigFieldBuilder().getBuilder();
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
public tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder() {
if (averagingConfigBuilder_ != null) {
return averagingConfigBuilder_.getMessageOrBuilder();
} else {
return averagingConfig_ == null ?
tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
}
}
/**
*
* If you want to average the ensembles (for regularization), provide the
* config below.
*
*
* .tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder>
getAveragingConfigFieldBuilder() {
if (averagingConfigBuilder_ == null) {
averagingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder>(
getAveragingConfig(),
getParentForChildren(),
isClean());
averagingConfig_ = null;
}
return averagingConfigBuilder_;
}
private int weakLearnerType_ = 0;
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public int getWeakLearnerTypeValue() {
return weakLearnerType_;
}
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public Builder setWeakLearnerTypeValue(int value) {
weakLearnerType_ = value;
onChanged();
return this;
}
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType getWeakLearnerType() {
@SuppressWarnings("deprecation")
tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.valueOf(weakLearnerType_);
return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType.UNRECOGNIZED : result;
}
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public Builder setWeakLearnerType(tensorflow.boosted_trees.learner.Learner.LearnerConfig.WeakLearnerType value) {
if (value == null) {
throw new NullPointerException();
}
weakLearnerType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* By default we use NORMAL_DECISION_TREE as weak learner.
*
*
* .tensorflow.boosted_trees.learner.LearnerConfig.WeakLearnerType weak_learner_type = 12;
*/
public Builder clearWeakLearnerType() {
weakLearnerType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearnerConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearnerConfig)
private static final tensorflow.boosted_trees.learner.Learner.LearnerConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearnerConfig();
}
public static tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LearnerConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LearnerConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n4tensorflow/contrib/boosted_trees/proto" +
"/learner.proto\022 tensorflow.boosted_trees" +
".learner\"K\n\030TreeRegularizationConfig\022\n\n\002" +
"l1\030\001 \001(\002\022\n\n\002l2\030\002 \001(\002\022\027\n\017tree_complexity\030" +
"\003 \001(\002\"v\n\025TreeConstraintsConfig\022\026\n\016max_tr" +
"ee_depth\030\001 \001(\r\022\027\n\017min_node_weight\030\002 \001(\002\022" +
",\n$max_number_of_unique_feature_columns\030" +
"\003 \001(\003\"\226\002\n\022LearningRateConfig\022J\n\005fixed\030\001 " +
"\001(\01329.tensorflow.boosted_trees.learner.L" +
"earningRateFixedConfigH\000\022T\n\007dropout\030\002 \001(" +
"\0132A.tensorflow.boosted_trees.learner.Lea" +
"rningRateDropoutDrivenConfigH\000\022U\n\013line_s" +
"earch\030\003 \001(\0132>.tensorflow.boosted_trees.l" +
"earner.LearningRateLineSearchConfigH\000B\007\n" +
"\005tuner\"0\n\027LearningRateFixedConfig\022\025\n\rlea" +
"rning_rate\030\001 \001(\002\"L\n\034LearningRateLineSear" +
"chConfig\022\031\n\021max_learning_rate\030\001 \001(\002\022\021\n\tn" +
"um_steps\030\002 \001(\005\"a\n\017AveragingConfig\022\036\n\024ave" +
"rage_last_n_trees\030\001 \001(\002H\000\022$\n\032average_las" +
"t_percent_trees\030\002 \001(\002H\000B\010\n\006config\"~\n\037Lea" +
"rningRateDropoutDrivenConfig\022\033\n\023dropout_" +
"probability\030\001 \001(\002\022\'\n\037probability_of_skip" +
"ping_dropout\030\002 \001(\002\022\025\n\rlearning_rate\030\003 \001(" +
"\002\"\210\t\n\rLearnerConfig\022\023\n\013num_classes\030\001 \001(\r" +
"\022#\n\031feature_fraction_per_tree\030\002 \001(\002H\000\022$\n" +
"\032feature_fraction_per_level\030\003 \001(\002H\000\022R\n\016r" +
"egularization\030\004 \001(\0132:.tensorflow.boosted" +
"_trees.learner.TreeRegularizationConfig\022" +
"L\n\013constraints\030\005 \001(\01327.tensorflow.booste" +
"d_trees.learner.TreeConstraintsConfig\022Q\n" +
"\014pruning_mode\030\010 \001(\0162;.tensorflow.boosted" +
"_trees.learner.LearnerConfig.PruningMode" +
"\022Q\n\014growing_mode\030\t \001(\0162;.tensorflow.boos" +
"ted_trees.learner.LearnerConfig.GrowingM" +
"ode\022Q\n\023learning_rate_tuner\030\006 \001(\01324.tenso" +
"rflow.boosted_trees.learner.LearningRate" +
"Config\022`\n\024multi_class_strategy\030\n \001(\0162B.t" +
"ensorflow.boosted_trees.learner.LearnerC" +
"onfig.MultiClassStrategy\022K\n\020averaging_co" +
"nfig\030\013 \001(\01321.tensorflow.boosted_trees.le" +
"arner.AveragingConfig\022Z\n\021weak_learner_ty" +
"pe\030\014 \001(\0162?.tensorflow.boosted_trees.lear" +
"ner.LearnerConfig.WeakLearnerType\"J\n\013Pru" +
"ningMode\022\034\n\030PRUNING_MODE_UNSPECIFIED\020\000\022\r" +
"\n\tPRE_PRUNE\020\001\022\016\n\nPOST_PRUNE\020\002\"O\n\013Growing" +
"Mode\022\034\n\030GROWING_MODE_UNSPECIFIED\020\000\022\016\n\nWH" +
"OLE_TREE\020\001\022\022\n\016LAYER_BY_LAYER\020\002\"v\n\022MultiC" +
"lassStrategy\022$\n MULTI_CLASS_STRATEGY_UNS" +
"PECIFIED\020\000\022\022\n\016TREE_PER_CLASS\020\001\022\020\n\014FULL_H" +
"ESSIAN\020\002\022\024\n\020DIAGONAL_HESSIAN\020\003\"H\n\017WeakLe" +
"arnerType\022\030\n\024NORMAL_DECISION_TREE\020\000\022\033\n\027O" +
"BLIVIOUS_DECISION_TREE\020\001B\022\n\020feature_frac" +
"tionB\003\370\001\001b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor,
new java.lang.String[] { "L1", "L2", "TreeComplexity", });
internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor,
new java.lang.String[] { "MaxTreeDepth", "MinNodeWeight", "MaxNumberOfUniqueFeatureColumns", });
internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor,
new java.lang.String[] { "Fixed", "Dropout", "LineSearch", "Tuner", });
internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor,
new java.lang.String[] { "LearningRate", });
internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor,
new java.lang.String[] { "MaxLearningRate", "NumSteps", });
internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor,
new java.lang.String[] { "AverageLastNTrees", "AverageLastPercentTrees", "Config", });
internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor,
new java.lang.String[] { "DropoutProbability", "ProbabilityOfSkippingDropout", "LearningRate", });
internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor,
new java.lang.String[] { "NumClasses", "FeatureFractionPerTree", "FeatureFractionPerLevel", "Regularization", "Constraints", "PruningMode", "GrowingMode", "LearningRateTuner", "MultiClassStrategy", "AveragingConfig", "WeakLearnerType", "FeatureFraction", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy