Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
caffe.Caffe Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: caffe/proto/caffe.proto
package caffe;
public final class Caffe {
private Caffe() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
/**
* Protobuf enum {@code caffe.Phase}
*/
public enum Phase
implements com.google.protobuf.ProtocolMessageEnum {
/**
* TRAIN = 0;
*/
TRAIN(0, 0),
/**
* TEST = 1;
*/
TEST(1, 1),
;
/**
* TRAIN = 0;
*/
public static final int TRAIN_VALUE = 0;
/**
* TEST = 1;
*/
public static final int TEST_VALUE = 1;
public final int getNumber() { return value; }
public static Phase valueOf(int value) {
switch (value) {
case 0: return TRAIN;
case 1: return TEST;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Phase findValueByNumber(int number) {
return Phase.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.getDescriptor().getEnumTypes().get(0);
}
private static final Phase[] VALUES = values();
public static Phase valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Phase(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.Phase)
}
public interface BlobShapeOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// repeated int64 dim = 1 [packed = true];
/**
* repeated int64 dim = 1 [packed = true];
*/
java.util.List getDimList();
/**
* repeated int64 dim = 1 [packed = true];
*/
int getDimCount();
/**
* repeated int64 dim = 1 [packed = true];
*/
long getDim(int index);
}
/**
* Protobuf type {@code caffe.BlobShape}
*
*
* Specifies the shape (dimensions) of a Blob.
*
*/
public static final class BlobShape extends
com.google.protobuf.GeneratedMessage
implements BlobShapeOrBuilder {
// Use BlobShape.newBuilder() to construct.
private BlobShape(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BlobShape(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BlobShape defaultInstance;
public static BlobShape getDefaultInstance() {
return defaultInstance;
}
public BlobShape getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlobShape(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
dim_.add(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
dim_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
dim_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobShape_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobShape_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobShape.class, caffe.Caffe.BlobShape.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public BlobShape parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlobShape(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
// repeated int64 dim = 1 [packed = true];
public static final int DIM_FIELD_NUMBER = 1;
private java.util.List dim_;
/**
* repeated int64 dim = 1 [packed = true];
*/
public java.util.List
getDimList() {
return dim_;
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public int getDimCount() {
return dim_.size();
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public long getDim(int index) {
return dim_.get(index);
}
private int dimMemoizedSerializedSize = -1;
private void initFields() {
dim_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getDimList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(dimMemoizedSerializedSize);
}
for (int i = 0; i < dim_.size(); i++) {
output.writeInt64NoTag(dim_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < dim_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(dim_.get(i));
}
size += dataSize;
if (!getDimList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
dimMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.BlobShape parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobShape parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobShape parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobShape parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobShape parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobShape parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobShape parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.BlobShape parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobShape parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobShape parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.BlobShape prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.BlobShape}
*
*
* Specifies the shape (dimensions) of a Blob.
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.BlobShapeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobShape_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobShape_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobShape.class, caffe.Caffe.BlobShape.Builder.class);
}
// Construct using caffe.Caffe.BlobShape.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
dim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_BlobShape_descriptor;
}
public caffe.Caffe.BlobShape getDefaultInstanceForType() {
return caffe.Caffe.BlobShape.getDefaultInstance();
}
public caffe.Caffe.BlobShape build() {
caffe.Caffe.BlobShape result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.BlobShape buildPartial() {
caffe.Caffe.BlobShape result = new caffe.Caffe.BlobShape(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.dim_ = dim_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.BlobShape) {
return mergeFrom((caffe.Caffe.BlobShape)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.BlobShape other) {
if (other == caffe.Caffe.BlobShape.getDefaultInstance()) return this;
if (!other.dim_.isEmpty()) {
if (dim_.isEmpty()) {
dim_ = other.dim_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDimIsMutable();
dim_.addAll(other.dim_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.BlobShape parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.BlobShape) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// repeated int64 dim = 1 [packed = true];
private java.util.List dim_ = java.util.Collections.emptyList();
private void ensureDimIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = new java.util.ArrayList(dim_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public java.util.List
getDimList() {
return java.util.Collections.unmodifiableList(dim_);
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public int getDimCount() {
return dim_.size();
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public long getDim(int index) {
return dim_.get(index);
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public Builder setDim(
int index, long value) {
ensureDimIsMutable();
dim_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public Builder addDim(long value) {
ensureDimIsMutable();
dim_.add(value);
onChanged();
return this;
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public Builder addAllDim(
java.lang.Iterable extends java.lang.Long> values) {
ensureDimIsMutable();
super.addAll(values, dim_);
onChanged();
return this;
}
/**
* repeated int64 dim = 1 [packed = true];
*/
public Builder clearDim() {
dim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.BlobShape)
}
static {
defaultInstance = new BlobShape(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.BlobShape)
}
public interface BlobProtoOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .caffe.BlobShape shape = 7;
/**
* optional .caffe.BlobShape shape = 7;
*/
boolean hasShape();
/**
* optional .caffe.BlobShape shape = 7;
*/
caffe.Caffe.BlobShape getShape();
/**
* optional .caffe.BlobShape shape = 7;
*/
caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder();
// repeated float data = 5 [packed = true];
/**
* repeated float data = 5 [packed = true];
*/
java.util.List getDataList();
/**
* repeated float data = 5 [packed = true];
*/
int getDataCount();
/**
* repeated float data = 5 [packed = true];
*/
float getData(int index);
// repeated float diff = 6 [packed = true];
/**
* repeated float diff = 6 [packed = true];
*/
java.util.List getDiffList();
/**
* repeated float diff = 6 [packed = true];
*/
int getDiffCount();
/**
* repeated float diff = 6 [packed = true];
*/
float getDiff(int index);
// repeated double double_data = 8 [packed = true];
/**
* repeated double double_data = 8 [packed = true];
*/
java.util.List getDoubleDataList();
/**
* repeated double double_data = 8 [packed = true];
*/
int getDoubleDataCount();
/**
* repeated double double_data = 8 [packed = true];
*/
double getDoubleData(int index);
// repeated double double_diff = 9 [packed = true];
/**
* repeated double double_diff = 9 [packed = true];
*/
java.util.List getDoubleDiffList();
/**
* repeated double double_diff = 9 [packed = true];
*/
int getDoubleDiffCount();
/**
* repeated double double_diff = 9 [packed = true];
*/
double getDoubleDiff(int index);
// optional int32 num = 1 [default = 0];
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
boolean hasNum();
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
int getNum();
// optional int32 channels = 2 [default = 0];
/**
* optional int32 channels = 2 [default = 0];
*/
boolean hasChannels();
/**
* optional int32 channels = 2 [default = 0];
*/
int getChannels();
// optional int32 height = 3 [default = 0];
/**
* optional int32 height = 3 [default = 0];
*/
boolean hasHeight();
/**
* optional int32 height = 3 [default = 0];
*/
int getHeight();
// optional int32 width = 4 [default = 0];
/**
* optional int32 width = 4 [default = 0];
*/
boolean hasWidth();
/**
* optional int32 width = 4 [default = 0];
*/
int getWidth();
}
/**
* Protobuf type {@code caffe.BlobProto}
*/
public static final class BlobProto extends
com.google.protobuf.GeneratedMessage
implements BlobProtoOrBuilder {
// Use BlobProto.newBuilder() to construct.
private BlobProto(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BlobProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BlobProto defaultInstance;
public static BlobProto getDefaultInstance() {
return defaultInstance;
}
public BlobProto getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlobProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000002;
num_ = input.readInt32();
break;
}
case 16: {
bitField0_ |= 0x00000004;
channels_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000008;
height_ = input.readInt32();
break;
}
case 32: {
bitField0_ |= 0x00000010;
width_ = input.readInt32();
break;
}
case 45: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
data_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
data_.add(input.readFloat());
break;
}
case 42: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
data_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
while (input.getBytesUntilLimit() > 0) {
data_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 53: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
diff_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
diff_.add(input.readFloat());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
diff_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
diff_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 58: {
caffe.Caffe.BlobShape.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = shape_.toBuilder();
}
shape_ = input.readMessage(caffe.Caffe.BlobShape.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(shape_);
shape_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 65: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
doubleData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
doubleData_.add(input.readDouble());
break;
}
case 66: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
doubleData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
while (input.getBytesUntilLimit() > 0) {
doubleData_.add(input.readDouble());
}
input.popLimit(limit);
break;
}
case 73: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
doubleDiff_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
doubleDiff_.add(input.readDouble());
break;
}
case 74: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
doubleDiff_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
while (input.getBytesUntilLimit() > 0) {
doubleDiff_.add(input.readDouble());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
data_ = java.util.Collections.unmodifiableList(data_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
diff_ = java.util.Collections.unmodifiableList(diff_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
doubleData_ = java.util.Collections.unmodifiableList(doubleData_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
doubleDiff_ = java.util.Collections.unmodifiableList(doubleDiff_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobProto_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobProto.class, caffe.Caffe.BlobProto.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public BlobProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlobProto(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .caffe.BlobShape shape = 7;
public static final int SHAPE_FIELD_NUMBER = 7;
private caffe.Caffe.BlobShape shape_;
/**
* optional .caffe.BlobShape shape = 7;
*/
public boolean hasShape() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public caffe.Caffe.BlobShape getShape() {
return shape_;
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() {
return shape_;
}
// repeated float data = 5 [packed = true];
public static final int DATA_FIELD_NUMBER = 5;
private java.util.List data_;
/**
* repeated float data = 5 [packed = true];
*/
public java.util.List
getDataList() {
return data_;
}
/**
* repeated float data = 5 [packed = true];
*/
public int getDataCount() {
return data_.size();
}
/**
* repeated float data = 5 [packed = true];
*/
public float getData(int index) {
return data_.get(index);
}
private int dataMemoizedSerializedSize = -1;
// repeated float diff = 6 [packed = true];
public static final int DIFF_FIELD_NUMBER = 6;
private java.util.List diff_;
/**
* repeated float diff = 6 [packed = true];
*/
public java.util.List
getDiffList() {
return diff_;
}
/**
* repeated float diff = 6 [packed = true];
*/
public int getDiffCount() {
return diff_.size();
}
/**
* repeated float diff = 6 [packed = true];
*/
public float getDiff(int index) {
return diff_.get(index);
}
private int diffMemoizedSerializedSize = -1;
// repeated double double_data = 8 [packed = true];
public static final int DOUBLE_DATA_FIELD_NUMBER = 8;
private java.util.List doubleData_;
/**
* repeated double double_data = 8 [packed = true];
*/
public java.util.List
getDoubleDataList() {
return doubleData_;
}
/**
* repeated double double_data = 8 [packed = true];
*/
public int getDoubleDataCount() {
return doubleData_.size();
}
/**
* repeated double double_data = 8 [packed = true];
*/
public double getDoubleData(int index) {
return doubleData_.get(index);
}
private int doubleDataMemoizedSerializedSize = -1;
// repeated double double_diff = 9 [packed = true];
public static final int DOUBLE_DIFF_FIELD_NUMBER = 9;
private java.util.List doubleDiff_;
/**
* repeated double double_diff = 9 [packed = true];
*/
public java.util.List
getDoubleDiffList() {
return doubleDiff_;
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public int getDoubleDiffCount() {
return doubleDiff_.size();
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public double getDoubleDiff(int index) {
return doubleDiff_.get(index);
}
private int doubleDiffMemoizedSerializedSize = -1;
// optional int32 num = 1 [default = 0];
public static final int NUM_FIELD_NUMBER = 1;
private int num_;
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public int getNum() {
return num_;
}
// optional int32 channels = 2 [default = 0];
public static final int CHANNELS_FIELD_NUMBER = 2;
private int channels_;
/**
* optional int32 channels = 2 [default = 0];
*/
public boolean hasChannels() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 channels = 2 [default = 0];
*/
public int getChannels() {
return channels_;
}
// optional int32 height = 3 [default = 0];
public static final int HEIGHT_FIELD_NUMBER = 3;
private int height_;
/**
* optional int32 height = 3 [default = 0];
*/
public boolean hasHeight() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 height = 3 [default = 0];
*/
public int getHeight() {
return height_;
}
// optional int32 width = 4 [default = 0];
public static final int WIDTH_FIELD_NUMBER = 4;
private int width_;
/**
* optional int32 width = 4 [default = 0];
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 width = 4 [default = 0];
*/
public int getWidth() {
return width_;
}
private void initFields() {
shape_ = caffe.Caffe.BlobShape.getDefaultInstance();
data_ = java.util.Collections.emptyList();
diff_ = java.util.Collections.emptyList();
doubleData_ = java.util.Collections.emptyList();
doubleDiff_ = java.util.Collections.emptyList();
num_ = 0;
channels_ = 0;
height_ = 0;
width_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(1, num_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(2, channels_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(3, height_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(4, width_);
}
if (getDataList().size() > 0) {
output.writeRawVarint32(42);
output.writeRawVarint32(dataMemoizedSerializedSize);
}
for (int i = 0; i < data_.size(); i++) {
output.writeFloatNoTag(data_.get(i));
}
if (getDiffList().size() > 0) {
output.writeRawVarint32(50);
output.writeRawVarint32(diffMemoizedSerializedSize);
}
for (int i = 0; i < diff_.size(); i++) {
output.writeFloatNoTag(diff_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(7, shape_);
}
if (getDoubleDataList().size() > 0) {
output.writeRawVarint32(66);
output.writeRawVarint32(doubleDataMemoizedSerializedSize);
}
for (int i = 0; i < doubleData_.size(); i++) {
output.writeDoubleNoTag(doubleData_.get(i));
}
if (getDoubleDiffList().size() > 0) {
output.writeRawVarint32(74);
output.writeRawVarint32(doubleDiffMemoizedSerializedSize);
}
for (int i = 0; i < doubleDiff_.size(); i++) {
output.writeDoubleNoTag(doubleDiff_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, num_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, channels_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, height_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, width_);
}
{
int dataSize = 0;
dataSize = 4 * getDataList().size();
size += dataSize;
if (!getDataList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
dataMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 4 * getDiffList().size();
size += dataSize;
if (!getDiffList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
diffMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, shape_);
}
{
int dataSize = 0;
dataSize = 8 * getDoubleDataList().size();
size += dataSize;
if (!getDoubleDataList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
doubleDataMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 8 * getDoubleDiffList().size();
size += dataSize;
if (!getDoubleDiffList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
doubleDiffMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.BlobProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobProto parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.BlobProto parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.BlobProto prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.BlobProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.BlobProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobProto_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobProto.class, caffe.Caffe.BlobProto.Builder.class);
}
// Construct using caffe.Caffe.BlobProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getShapeFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (shapeBuilder_ == null) {
shape_ = caffe.Caffe.BlobShape.getDefaultInstance();
} else {
shapeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
diff_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
doubleData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
doubleDiff_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
num_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
channels_ = 0;
bitField0_ = (bitField0_ & ~0x00000040);
height_ = 0;
bitField0_ = (bitField0_ & ~0x00000080);
width_ = 0;
bitField0_ = (bitField0_ & ~0x00000100);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_BlobProto_descriptor;
}
public caffe.Caffe.BlobProto getDefaultInstanceForType() {
return caffe.Caffe.BlobProto.getDefaultInstance();
}
public caffe.Caffe.BlobProto build() {
caffe.Caffe.BlobProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.BlobProto buildPartial() {
caffe.Caffe.BlobProto result = new caffe.Caffe.BlobProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (shapeBuilder_ == null) {
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
data_ = java.util.Collections.unmodifiableList(data_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.data_ = data_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
diff_ = java.util.Collections.unmodifiableList(diff_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.diff_ = diff_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
doubleData_ = java.util.Collections.unmodifiableList(doubleData_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.doubleData_ = doubleData_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
doubleDiff_ = java.util.Collections.unmodifiableList(doubleDiff_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.doubleDiff_ = doubleDiff_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000002;
}
result.num_ = num_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000004;
}
result.channels_ = channels_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000008;
}
result.height_ = height_;
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000010;
}
result.width_ = width_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.BlobProto) {
return mergeFrom((caffe.Caffe.BlobProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.BlobProto other) {
if (other == caffe.Caffe.BlobProto.getDefaultInstance()) return this;
if (other.hasShape()) {
mergeShape(other.getShape());
}
if (!other.data_.isEmpty()) {
if (data_.isEmpty()) {
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureDataIsMutable();
data_.addAll(other.data_);
}
onChanged();
}
if (!other.diff_.isEmpty()) {
if (diff_.isEmpty()) {
diff_ = other.diff_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureDiffIsMutable();
diff_.addAll(other.diff_);
}
onChanged();
}
if (!other.doubleData_.isEmpty()) {
if (doubleData_.isEmpty()) {
doubleData_ = other.doubleData_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureDoubleDataIsMutable();
doubleData_.addAll(other.doubleData_);
}
onChanged();
}
if (!other.doubleDiff_.isEmpty()) {
if (doubleDiff_.isEmpty()) {
doubleDiff_ = other.doubleDiff_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureDoubleDiffIsMutable();
doubleDiff_.addAll(other.doubleDiff_);
}
onChanged();
}
if (other.hasNum()) {
setNum(other.getNum());
}
if (other.hasChannels()) {
setChannels(other.getChannels());
}
if (other.hasHeight()) {
setHeight(other.getHeight());
}
if (other.hasWidth()) {
setWidth(other.getWidth());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.BlobProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.BlobProto) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .caffe.BlobShape shape = 7;
private caffe.Caffe.BlobShape shape_ = caffe.Caffe.BlobShape.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_;
/**
* optional .caffe.BlobShape shape = 7;
*/
public boolean hasShape() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public caffe.Caffe.BlobShape getShape() {
if (shapeBuilder_ == null) {
return shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public Builder setShape(caffe.Caffe.BlobShape value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public Builder setShape(
caffe.Caffe.BlobShape.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public Builder mergeShape(caffe.Caffe.BlobShape value) {
if (shapeBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
shape_ != caffe.Caffe.BlobShape.getDefaultInstance()) {
shape_ =
caffe.Caffe.BlobShape.newBuilder(shape_).mergeFrom(value).buildPartial();
} else {
shape_ = value;
}
onChanged();
} else {
shapeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = caffe.Caffe.BlobShape.getDefaultInstance();
onChanged();
} else {
shapeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public caffe.Caffe.BlobShape.Builder getShapeBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
* optional .caffe.BlobShape shape = 7;
*/
public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_;
}
}
/**
* optional .caffe.BlobShape shape = 7;
*/
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>(
shape_,
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
// repeated float data = 5 [packed = true];
private java.util.List data_ = java.util.Collections.emptyList();
private void ensureDataIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
data_ = new java.util.ArrayList(data_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated float data = 5 [packed = true];
*/
public java.util.List
getDataList() {
return java.util.Collections.unmodifiableList(data_);
}
/**
* repeated float data = 5 [packed = true];
*/
public int getDataCount() {
return data_.size();
}
/**
* repeated float data = 5 [packed = true];
*/
public float getData(int index) {
return data_.get(index);
}
/**
* repeated float data = 5 [packed = true];
*/
public Builder setData(
int index, float value) {
ensureDataIsMutable();
data_.set(index, value);
onChanged();
return this;
}
/**
* repeated float data = 5 [packed = true];
*/
public Builder addData(float value) {
ensureDataIsMutable();
data_.add(value);
onChanged();
return this;
}
/**
* repeated float data = 5 [packed = true];
*/
public Builder addAllData(
java.lang.Iterable extends java.lang.Float> values) {
ensureDataIsMutable();
super.addAll(values, data_);
onChanged();
return this;
}
/**
* repeated float data = 5 [packed = true];
*/
public Builder clearData() {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
// repeated float diff = 6 [packed = true];
private java.util.List diff_ = java.util.Collections.emptyList();
private void ensureDiffIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
diff_ = new java.util.ArrayList(diff_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated float diff = 6 [packed = true];
*/
public java.util.List
getDiffList() {
return java.util.Collections.unmodifiableList(diff_);
}
/**
* repeated float diff = 6 [packed = true];
*/
public int getDiffCount() {
return diff_.size();
}
/**
* repeated float diff = 6 [packed = true];
*/
public float getDiff(int index) {
return diff_.get(index);
}
/**
* repeated float diff = 6 [packed = true];
*/
public Builder setDiff(
int index, float value) {
ensureDiffIsMutable();
diff_.set(index, value);
onChanged();
return this;
}
/**
* repeated float diff = 6 [packed = true];
*/
public Builder addDiff(float value) {
ensureDiffIsMutable();
diff_.add(value);
onChanged();
return this;
}
/**
* repeated float diff = 6 [packed = true];
*/
public Builder addAllDiff(
java.lang.Iterable extends java.lang.Float> values) {
ensureDiffIsMutable();
super.addAll(values, diff_);
onChanged();
return this;
}
/**
* repeated float diff = 6 [packed = true];
*/
public Builder clearDiff() {
diff_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
// repeated double double_data = 8 [packed = true];
private java.util.List doubleData_ = java.util.Collections.emptyList();
private void ensureDoubleDataIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
doubleData_ = new java.util.ArrayList(doubleData_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated double double_data = 8 [packed = true];
*/
public java.util.List
getDoubleDataList() {
return java.util.Collections.unmodifiableList(doubleData_);
}
/**
* repeated double double_data = 8 [packed = true];
*/
public int getDoubleDataCount() {
return doubleData_.size();
}
/**
* repeated double double_data = 8 [packed = true];
*/
public double getDoubleData(int index) {
return doubleData_.get(index);
}
/**
* repeated double double_data = 8 [packed = true];
*/
public Builder setDoubleData(
int index, double value) {
ensureDoubleDataIsMutable();
doubleData_.set(index, value);
onChanged();
return this;
}
/**
* repeated double double_data = 8 [packed = true];
*/
public Builder addDoubleData(double value) {
ensureDoubleDataIsMutable();
doubleData_.add(value);
onChanged();
return this;
}
/**
* repeated double double_data = 8 [packed = true];
*/
public Builder addAllDoubleData(
java.lang.Iterable extends java.lang.Double> values) {
ensureDoubleDataIsMutable();
super.addAll(values, doubleData_);
onChanged();
return this;
}
/**
* repeated double double_data = 8 [packed = true];
*/
public Builder clearDoubleData() {
doubleData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
// repeated double double_diff = 9 [packed = true];
private java.util.List doubleDiff_ = java.util.Collections.emptyList();
private void ensureDoubleDiffIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
doubleDiff_ = new java.util.ArrayList(doubleDiff_);
bitField0_ |= 0x00000010;
}
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public java.util.List
getDoubleDiffList() {
return java.util.Collections.unmodifiableList(doubleDiff_);
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public int getDoubleDiffCount() {
return doubleDiff_.size();
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public double getDoubleDiff(int index) {
return doubleDiff_.get(index);
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public Builder setDoubleDiff(
int index, double value) {
ensureDoubleDiffIsMutable();
doubleDiff_.set(index, value);
onChanged();
return this;
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public Builder addDoubleDiff(double value) {
ensureDoubleDiffIsMutable();
doubleDiff_.add(value);
onChanged();
return this;
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public Builder addAllDoubleDiff(
java.lang.Iterable extends java.lang.Double> values) {
ensureDoubleDiffIsMutable();
super.addAll(values, doubleDiff_);
onChanged();
return this;
}
/**
* repeated double double_diff = 9 [packed = true];
*/
public Builder clearDoubleDiff() {
doubleDiff_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
// optional int32 num = 1 [default = 0];
private int num_ ;
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public int getNum() {
return num_;
}
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public Builder setNum(int value) {
bitField0_ |= 0x00000020;
num_ = value;
onChanged();
return this;
}
/**
* optional int32 num = 1 [default = 0];
*
*
* 4D dimensions -- deprecated. Use "shape" instead.
*
*/
public Builder clearNum() {
bitField0_ = (bitField0_ & ~0x00000020);
num_ = 0;
onChanged();
return this;
}
// optional int32 channels = 2 [default = 0];
private int channels_ ;
/**
* optional int32 channels = 2 [default = 0];
*/
public boolean hasChannels() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional int32 channels = 2 [default = 0];
*/
public int getChannels() {
return channels_;
}
/**
* optional int32 channels = 2 [default = 0];
*/
public Builder setChannels(int value) {
bitField0_ |= 0x00000040;
channels_ = value;
onChanged();
return this;
}
/**
* optional int32 channels = 2 [default = 0];
*/
public Builder clearChannels() {
bitField0_ = (bitField0_ & ~0x00000040);
channels_ = 0;
onChanged();
return this;
}
// optional int32 height = 3 [default = 0];
private int height_ ;
/**
* optional int32 height = 3 [default = 0];
*/
public boolean hasHeight() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional int32 height = 3 [default = 0];
*/
public int getHeight() {
return height_;
}
/**
* optional int32 height = 3 [default = 0];
*/
public Builder setHeight(int value) {
bitField0_ |= 0x00000080;
height_ = value;
onChanged();
return this;
}
/**
* optional int32 height = 3 [default = 0];
*/
public Builder clearHeight() {
bitField0_ = (bitField0_ & ~0x00000080);
height_ = 0;
onChanged();
return this;
}
// optional int32 width = 4 [default = 0];
private int width_ ;
/**
* optional int32 width = 4 [default = 0];
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional int32 width = 4 [default = 0];
*/
public int getWidth() {
return width_;
}
/**
* optional int32 width = 4 [default = 0];
*/
public Builder setWidth(int value) {
bitField0_ |= 0x00000100;
width_ = value;
onChanged();
return this;
}
/**
* optional int32 width = 4 [default = 0];
*/
public Builder clearWidth() {
bitField0_ = (bitField0_ & ~0x00000100);
width_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.BlobProto)
}
static {
defaultInstance = new BlobProto(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.BlobProto)
}
public interface BlobProtoVectorOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// repeated .caffe.BlobProto blobs = 1;
/**
* repeated .caffe.BlobProto blobs = 1;
*/
java.util.List
getBlobsList();
/**
* repeated .caffe.BlobProto blobs = 1;
*/
caffe.Caffe.BlobProto getBlobs(int index);
/**
* repeated .caffe.BlobProto blobs = 1;
*/
int getBlobsCount();
/**
* repeated .caffe.BlobProto blobs = 1;
*/
java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getBlobsOrBuilderList();
/**
* repeated .caffe.BlobProto blobs = 1;
*/
caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder(
int index);
}
/**
* Protobuf type {@code caffe.BlobProtoVector}
*
*
* The BlobProtoVector is simply a way to pass multiple blobproto instances
* around.
*
*/
public static final class BlobProtoVector extends
com.google.protobuf.GeneratedMessage
implements BlobProtoVectorOrBuilder {
// Use BlobProtoVector.newBuilder() to construct.
private BlobProtoVector(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BlobProtoVector(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BlobProtoVector defaultInstance;
public static BlobProtoVector getDefaultInstance() {
return defaultInstance;
}
public BlobProtoVector getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlobProtoVector(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
blobs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
blobs_.add(input.readMessage(caffe.Caffe.BlobProto.PARSER, extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
blobs_ = java.util.Collections.unmodifiableList(blobs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobProtoVector_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobProtoVector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobProtoVector.class, caffe.Caffe.BlobProtoVector.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public BlobProtoVector parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlobProtoVector(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
// repeated .caffe.BlobProto blobs = 1;
public static final int BLOBS_FIELD_NUMBER = 1;
private java.util.List blobs_;
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public java.util.List getBlobsList() {
return blobs_;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getBlobsOrBuilderList() {
return blobs_;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public int getBlobsCount() {
return blobs_.size();
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProto getBlobs(int index) {
return blobs_.get(index);
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder(
int index) {
return blobs_.get(index);
}
private void initFields() {
blobs_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < blobs_.size(); i++) {
output.writeMessage(1, blobs_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < blobs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, blobs_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.BlobProtoVector parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobProtoVector parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobProtoVector parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.BlobProtoVector parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.BlobProtoVector parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobProtoVector parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobProtoVector parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.BlobProtoVector parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.BlobProtoVector parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.BlobProtoVector parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.BlobProtoVector prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.BlobProtoVector}
*
*
* The BlobProtoVector is simply a way to pass multiple blobproto instances
* around.
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.BlobProtoVectorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_BlobProtoVector_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_BlobProtoVector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.BlobProtoVector.class, caffe.Caffe.BlobProtoVector.Builder.class);
}
// Construct using caffe.Caffe.BlobProtoVector.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getBlobsFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (blobsBuilder_ == null) {
blobs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
blobsBuilder_.clear();
}
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_BlobProtoVector_descriptor;
}
public caffe.Caffe.BlobProtoVector getDefaultInstanceForType() {
return caffe.Caffe.BlobProtoVector.getDefaultInstance();
}
public caffe.Caffe.BlobProtoVector build() {
caffe.Caffe.BlobProtoVector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.BlobProtoVector buildPartial() {
caffe.Caffe.BlobProtoVector result = new caffe.Caffe.BlobProtoVector(this);
int from_bitField0_ = bitField0_;
if (blobsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
blobs_ = java.util.Collections.unmodifiableList(blobs_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.blobs_ = blobs_;
} else {
result.blobs_ = blobsBuilder_.build();
}
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.BlobProtoVector) {
return mergeFrom((caffe.Caffe.BlobProtoVector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.BlobProtoVector other) {
if (other == caffe.Caffe.BlobProtoVector.getDefaultInstance()) return this;
if (blobsBuilder_ == null) {
if (!other.blobs_.isEmpty()) {
if (blobs_.isEmpty()) {
blobs_ = other.blobs_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureBlobsIsMutable();
blobs_.addAll(other.blobs_);
}
onChanged();
}
} else {
if (!other.blobs_.isEmpty()) {
if (blobsBuilder_.isEmpty()) {
blobsBuilder_.dispose();
blobsBuilder_ = null;
blobs_ = other.blobs_;
bitField0_ = (bitField0_ & ~0x00000001);
blobsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getBlobsFieldBuilder() : null;
} else {
blobsBuilder_.addAllMessages(other.blobs_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.BlobProtoVector parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.BlobProtoVector) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// repeated .caffe.BlobProto blobs = 1;
private java.util.List blobs_ =
java.util.Collections.emptyList();
private void ensureBlobsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
blobs_ = new java.util.ArrayList(blobs_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_;
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public java.util.List getBlobsList() {
if (blobsBuilder_ == null) {
return java.util.Collections.unmodifiableList(blobs_);
} else {
return blobsBuilder_.getMessageList();
}
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public int getBlobsCount() {
if (blobsBuilder_ == null) {
return blobs_.size();
} else {
return blobsBuilder_.getCount();
}
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProto getBlobs(int index) {
if (blobsBuilder_ == null) {
return blobs_.get(index);
} else {
return blobsBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder setBlobs(
int index, caffe.Caffe.BlobProto value) {
if (blobsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlobsIsMutable();
blobs_.set(index, value);
onChanged();
} else {
blobsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder setBlobs(
int index, caffe.Caffe.BlobProto.Builder builderForValue) {
if (blobsBuilder_ == null) {
ensureBlobsIsMutable();
blobs_.set(index, builderForValue.build());
onChanged();
} else {
blobsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder addBlobs(caffe.Caffe.BlobProto value) {
if (blobsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlobsIsMutable();
blobs_.add(value);
onChanged();
} else {
blobsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder addBlobs(
int index, caffe.Caffe.BlobProto value) {
if (blobsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlobsIsMutable();
blobs_.add(index, value);
onChanged();
} else {
blobsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder addBlobs(
caffe.Caffe.BlobProto.Builder builderForValue) {
if (blobsBuilder_ == null) {
ensureBlobsIsMutable();
blobs_.add(builderForValue.build());
onChanged();
} else {
blobsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder addBlobs(
int index, caffe.Caffe.BlobProto.Builder builderForValue) {
if (blobsBuilder_ == null) {
ensureBlobsIsMutable();
blobs_.add(index, builderForValue.build());
onChanged();
} else {
blobsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder addAllBlobs(
java.lang.Iterable extends caffe.Caffe.BlobProto> values) {
if (blobsBuilder_ == null) {
ensureBlobsIsMutable();
super.addAll(values, blobs_);
onChanged();
} else {
blobsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder clearBlobs() {
if (blobsBuilder_ == null) {
blobs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
blobsBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public Builder removeBlobs(int index) {
if (blobsBuilder_ == null) {
ensureBlobsIsMutable();
blobs_.remove(index);
onChanged();
} else {
blobsBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProto.Builder getBlobsBuilder(
int index) {
return getBlobsFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder(
int index) {
if (blobsBuilder_ == null) {
return blobs_.get(index); } else {
return blobsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getBlobsOrBuilderList() {
if (blobsBuilder_ != null) {
return blobsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(blobs_);
}
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProto.Builder addBlobsBuilder() {
return getBlobsFieldBuilder().addBuilder(
caffe.Caffe.BlobProto.getDefaultInstance());
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public caffe.Caffe.BlobProto.Builder addBlobsBuilder(
int index) {
return getBlobsFieldBuilder().addBuilder(
index, caffe.Caffe.BlobProto.getDefaultInstance());
}
/**
* repeated .caffe.BlobProto blobs = 1;
*/
public java.util.List
getBlobsBuilderList() {
return getBlobsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder>
getBlobsFieldBuilder() {
if (blobsBuilder_ == null) {
blobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder>(
blobs_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
blobs_ = null;
}
return blobsBuilder_;
}
// @@protoc_insertion_point(builder_scope:caffe.BlobProtoVector)
}
static {
defaultInstance = new BlobProtoVector(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.BlobProtoVector)
}
public interface DatumOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional int32 channels = 1;
/**
* optional int32 channels = 1;
*/
boolean hasChannels();
/**
* optional int32 channels = 1;
*/
int getChannels();
// optional int32 height = 2;
/**
* optional int32 height = 2;
*/
boolean hasHeight();
/**
* optional int32 height = 2;
*/
int getHeight();
// optional int32 width = 3;
/**
* optional int32 width = 3;
*/
boolean hasWidth();
/**
* optional int32 width = 3;
*/
int getWidth();
// optional bytes data = 4;
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
boolean hasData();
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
com.google.protobuf.ByteString getData();
// optional int32 label = 5;
/**
* optional int32 label = 5;
*/
boolean hasLabel();
/**
* optional int32 label = 5;
*/
int getLabel();
// repeated float float_data = 6;
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
java.util.List getFloatDataList();
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
int getFloatDataCount();
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
float getFloatData(int index);
// optional bool encoded = 7 [default = false];
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
boolean hasEncoded();
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
boolean getEncoded();
}
/**
* Protobuf type {@code caffe.Datum}
*/
public static final class Datum extends
com.google.protobuf.GeneratedMessage
implements DatumOrBuilder {
// Use Datum.newBuilder() to construct.
private Datum(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Datum(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Datum defaultInstance;
public static Datum getDefaultInstance() {
return defaultInstance;
}
public Datum getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Datum(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
channels_ = input.readInt32();
break;
}
case 16: {
bitField0_ |= 0x00000002;
height_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
width_ = input.readInt32();
break;
}
case 34: {
bitField0_ |= 0x00000008;
data_ = input.readBytes();
break;
}
case 40: {
bitField0_ |= 0x00000010;
label_ = input.readInt32();
break;
}
case 53: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
floatData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
floatData_.add(input.readFloat());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
floatData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
floatData_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 56: {
bitField0_ |= 0x00000020;
encoded_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
floatData_ = java.util.Collections.unmodifiableList(floatData_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_Datum_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_Datum_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.Datum.class, caffe.Caffe.Datum.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Datum parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Datum(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional int32 channels = 1;
public static final int CHANNELS_FIELD_NUMBER = 1;
private int channels_;
/**
* optional int32 channels = 1;
*/
public boolean hasChannels() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 channels = 1;
*/
public int getChannels() {
return channels_;
}
// optional int32 height = 2;
public static final int HEIGHT_FIELD_NUMBER = 2;
private int height_;
/**
* optional int32 height = 2;
*/
public boolean hasHeight() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 height = 2;
*/
public int getHeight() {
return height_;
}
// optional int32 width = 3;
public static final int WIDTH_FIELD_NUMBER = 3;
private int width_;
/**
* optional int32 width = 3;
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 width = 3;
*/
public int getWidth() {
return width_;
}
// optional bytes data = 4;
public static final int DATA_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString data_;
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public boolean hasData() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
// optional int32 label = 5;
public static final int LABEL_FIELD_NUMBER = 5;
private int label_;
/**
* optional int32 label = 5;
*/
public boolean hasLabel() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 label = 5;
*/
public int getLabel() {
return label_;
}
// repeated float float_data = 6;
public static final int FLOAT_DATA_FIELD_NUMBER = 6;
private java.util.List floatData_;
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public java.util.List
getFloatDataList() {
return floatData_;
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public int getFloatDataCount() {
return floatData_.size();
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public float getFloatData(int index) {
return floatData_.get(index);
}
// optional bool encoded = 7 [default = false];
public static final int ENCODED_FIELD_NUMBER = 7;
private boolean encoded_;
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public boolean hasEncoded() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public boolean getEncoded() {
return encoded_;
}
private void initFields() {
channels_ = 0;
height_ = 0;
width_ = 0;
data_ = com.google.protobuf.ByteString.EMPTY;
label_ = 0;
floatData_ = java.util.Collections.emptyList();
encoded_ = false;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, channels_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, height_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, width_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBytes(4, data_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, label_);
}
for (int i = 0; i < floatData_.size(); i++) {
output.writeFloat(6, floatData_.get(i));
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeBool(7, encoded_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, channels_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, height_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, width_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, data_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, label_);
}
{
int dataSize = 0;
dataSize = 4 * getFloatDataList().size();
size += dataSize;
size += 1 * getFloatDataList().size();
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, encoded_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.Datum parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.Datum parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.Datum parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.Datum parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.Datum parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.Datum parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.Datum parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.Datum parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.Datum parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.Datum parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.Datum prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.Datum}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.DatumOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_Datum_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_Datum_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.Datum.class, caffe.Caffe.Datum.Builder.class);
}
// Construct using caffe.Caffe.Datum.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
channels_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
height_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
width_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
data_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
label_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
floatData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
encoded_ = false;
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_Datum_descriptor;
}
public caffe.Caffe.Datum getDefaultInstanceForType() {
return caffe.Caffe.Datum.getDefaultInstance();
}
public caffe.Caffe.Datum build() {
caffe.Caffe.Datum result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.Datum buildPartial() {
caffe.Caffe.Datum result = new caffe.Caffe.Datum(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.channels_ = channels_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.height_ = height_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.width_ = width_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.data_ = data_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.label_ = label_;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
floatData_ = java.util.Collections.unmodifiableList(floatData_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.floatData_ = floatData_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000020;
}
result.encoded_ = encoded_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.Datum) {
return mergeFrom((caffe.Caffe.Datum)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.Datum other) {
if (other == caffe.Caffe.Datum.getDefaultInstance()) return this;
if (other.hasChannels()) {
setChannels(other.getChannels());
}
if (other.hasHeight()) {
setHeight(other.getHeight());
}
if (other.hasWidth()) {
setWidth(other.getWidth());
}
if (other.hasData()) {
setData(other.getData());
}
if (other.hasLabel()) {
setLabel(other.getLabel());
}
if (!other.floatData_.isEmpty()) {
if (floatData_.isEmpty()) {
floatData_ = other.floatData_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureFloatDataIsMutable();
floatData_.addAll(other.floatData_);
}
onChanged();
}
if (other.hasEncoded()) {
setEncoded(other.getEncoded());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.Datum parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.Datum) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional int32 channels = 1;
private int channels_ ;
/**
* optional int32 channels = 1;
*/
public boolean hasChannels() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 channels = 1;
*/
public int getChannels() {
return channels_;
}
/**
* optional int32 channels = 1;
*/
public Builder setChannels(int value) {
bitField0_ |= 0x00000001;
channels_ = value;
onChanged();
return this;
}
/**
* optional int32 channels = 1;
*/
public Builder clearChannels() {
bitField0_ = (bitField0_ & ~0x00000001);
channels_ = 0;
onChanged();
return this;
}
// optional int32 height = 2;
private int height_ ;
/**
* optional int32 height = 2;
*/
public boolean hasHeight() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 height = 2;
*/
public int getHeight() {
return height_;
}
/**
* optional int32 height = 2;
*/
public Builder setHeight(int value) {
bitField0_ |= 0x00000002;
height_ = value;
onChanged();
return this;
}
/**
* optional int32 height = 2;
*/
public Builder clearHeight() {
bitField0_ = (bitField0_ & ~0x00000002);
height_ = 0;
onChanged();
return this;
}
// optional int32 width = 3;
private int width_ ;
/**
* optional int32 width = 3;
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 width = 3;
*/
public int getWidth() {
return width_;
}
/**
* optional int32 width = 3;
*/
public Builder setWidth(int value) {
bitField0_ |= 0x00000004;
width_ = value;
onChanged();
return this;
}
/**
* optional int32 width = 3;
*/
public Builder clearWidth() {
bitField0_ = (bitField0_ & ~0x00000004);
width_ = 0;
onChanged();
return this;
}
// optional bytes data = 4;
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public boolean hasData() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
data_ = value;
onChanged();
return this;
}
/**
* optional bytes data = 4;
*
*
* the actual image data, in bytes
*
*/
public Builder clearData() {
bitField0_ = (bitField0_ & ~0x00000008);
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
// optional int32 label = 5;
private int label_ ;
/**
* optional int32 label = 5;
*/
public boolean hasLabel() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 label = 5;
*/
public int getLabel() {
return label_;
}
/**
* optional int32 label = 5;
*/
public Builder setLabel(int value) {
bitField0_ |= 0x00000010;
label_ = value;
onChanged();
return this;
}
/**
* optional int32 label = 5;
*/
public Builder clearLabel() {
bitField0_ = (bitField0_ & ~0x00000010);
label_ = 0;
onChanged();
return this;
}
// repeated float float_data = 6;
private java.util.List floatData_ = java.util.Collections.emptyList();
private void ensureFloatDataIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
floatData_ = new java.util.ArrayList(floatData_);
bitField0_ |= 0x00000020;
}
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public java.util.List
getFloatDataList() {
return java.util.Collections.unmodifiableList(floatData_);
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public int getFloatDataCount() {
return floatData_.size();
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public float getFloatData(int index) {
return floatData_.get(index);
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public Builder setFloatData(
int index, float value) {
ensureFloatDataIsMutable();
floatData_.set(index, value);
onChanged();
return this;
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public Builder addFloatData(float value) {
ensureFloatDataIsMutable();
floatData_.add(value);
onChanged();
return this;
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public Builder addAllFloatData(
java.lang.Iterable extends java.lang.Float> values) {
ensureFloatDataIsMutable();
super.addAll(values, floatData_);
onChanged();
return this;
}
/**
* repeated float float_data = 6;
*
*
* Optionally, the datum could also hold float data.
*
*/
public Builder clearFloatData() {
floatData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
// optional bool encoded = 7 [default = false];
private boolean encoded_ ;
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public boolean hasEncoded() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public boolean getEncoded() {
return encoded_;
}
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public Builder setEncoded(boolean value) {
bitField0_ |= 0x00000040;
encoded_ = value;
onChanged();
return this;
}
/**
* optional bool encoded = 7 [default = false];
*
*
* If true data contains an encoded image that need to be decoded
*
*/
public Builder clearEncoded() {
bitField0_ = (bitField0_ & ~0x00000040);
encoded_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.Datum)
}
static {
defaultInstance = new Datum(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.Datum)
}
public interface FillerParameterOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string type = 1 [default = "constant"];
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
boolean hasType();
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
java.lang.String getType();
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
com.google.protobuf.ByteString
getTypeBytes();
// optional float value = 2 [default = 0];
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
boolean hasValue();
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
float getValue();
// optional float min = 3 [default = 0];
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
boolean hasMin();
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
float getMin();
// optional float max = 4 [default = 1];
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
boolean hasMax();
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
float getMax();
// optional float mean = 5 [default = 0];
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
boolean hasMean();
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
float getMean();
// optional float std = 6 [default = 1];
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
boolean hasStd();
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
float getStd();
// optional int32 sparse = 7 [default = -1];
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
boolean hasSparse();
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
int getSparse();
// optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
boolean hasVarianceNorm();
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
caffe.Caffe.FillerParameter.VarianceNorm getVarianceNorm();
}
/**
* Protobuf type {@code caffe.FillerParameter}
*/
public static final class FillerParameter extends
com.google.protobuf.GeneratedMessage
implements FillerParameterOrBuilder {
// Use FillerParameter.newBuilder() to construct.
private FillerParameter(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private FillerParameter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final FillerParameter defaultInstance;
public static FillerParameter getDefaultInstance() {
return defaultInstance;
}
public FillerParameter getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FillerParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
type_ = input.readBytes();
break;
}
case 21: {
bitField0_ |= 0x00000002;
value_ = input.readFloat();
break;
}
case 29: {
bitField0_ |= 0x00000004;
min_ = input.readFloat();
break;
}
case 37: {
bitField0_ |= 0x00000008;
max_ = input.readFloat();
break;
}
case 45: {
bitField0_ |= 0x00000010;
mean_ = input.readFloat();
break;
}
case 53: {
bitField0_ |= 0x00000020;
std_ = input.readFloat();
break;
}
case 56: {
bitField0_ |= 0x00000040;
sparse_ = input.readInt32();
break;
}
case 64: {
int rawValue = input.readEnum();
caffe.Caffe.FillerParameter.VarianceNorm value = caffe.Caffe.FillerParameter.VarianceNorm.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(8, rawValue);
} else {
bitField0_ |= 0x00000080;
varianceNorm_ = value;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_FillerParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_FillerParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.FillerParameter.class, caffe.Caffe.FillerParameter.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public FillerParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FillerParameter(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code caffe.FillerParameter.VarianceNorm}
*
*
* Normalize the filler variance by fan_in, fan_out, or their average.
* Applies to 'xavier' and 'msra' fillers.
*
*/
public enum VarianceNorm
implements com.google.protobuf.ProtocolMessageEnum {
/**
* FAN_IN = 0;
*/
FAN_IN(0, 0),
/**
* FAN_OUT = 1;
*/
FAN_OUT(1, 1),
/**
* AVERAGE = 2;
*/
AVERAGE(2, 2),
;
/**
* FAN_IN = 0;
*/
public static final int FAN_IN_VALUE = 0;
/**
* FAN_OUT = 1;
*/
public static final int FAN_OUT_VALUE = 1;
/**
* AVERAGE = 2;
*/
public static final int AVERAGE_VALUE = 2;
public final int getNumber() { return value; }
public static VarianceNorm valueOf(int value) {
switch (value) {
case 0: return FAN_IN;
case 1: return FAN_OUT;
case 2: return AVERAGE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public VarianceNorm findValueByNumber(int number) {
return VarianceNorm.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.FillerParameter.getDescriptor().getEnumTypes().get(0);
}
private static final VarianceNorm[] VALUES = values();
public static VarianceNorm valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private VarianceNorm(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.FillerParameter.VarianceNorm)
}
private int bitField0_;
// optional string type = 1 [default = "constant"];
public static final int TYPE_FIELD_NUMBER = 1;
private java.lang.Object type_;
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional float value = 2 [default = 0];
public static final int VALUE_FIELD_NUMBER = 2;
private float value_;
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public float getValue() {
return value_;
}
// optional float min = 3 [default = 0];
public static final int MIN_FIELD_NUMBER = 3;
private float min_;
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public boolean hasMin() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public float getMin() {
return min_;
}
// optional float max = 4 [default = 1];
public static final int MAX_FIELD_NUMBER = 4;
private float max_;
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public boolean hasMax() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public float getMax() {
return max_;
}
// optional float mean = 5 [default = 0];
public static final int MEAN_FIELD_NUMBER = 5;
private float mean_;
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public boolean hasMean() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public float getMean() {
return mean_;
}
// optional float std = 6 [default = 1];
public static final int STD_FIELD_NUMBER = 6;
private float std_;
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public boolean hasStd() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public float getStd() {
return std_;
}
// optional int32 sparse = 7 [default = -1];
public static final int SPARSE_FIELD_NUMBER = 7;
private int sparse_;
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public boolean hasSparse() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public int getSparse() {
return sparse_;
}
// optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
public static final int VARIANCE_NORM_FIELD_NUMBER = 8;
private caffe.Caffe.FillerParameter.VarianceNorm varianceNorm_;
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public boolean hasVarianceNorm() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public caffe.Caffe.FillerParameter.VarianceNorm getVarianceNorm() {
return varianceNorm_;
}
private void initFields() {
type_ = "constant";
value_ = 0F;
min_ = 0F;
max_ = 1F;
mean_ = 0F;
std_ = 1F;
sparse_ = -1;
varianceNorm_ = caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeFloat(2, value_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeFloat(3, min_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeFloat(4, max_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeFloat(5, mean_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeFloat(6, std_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(7, sparse_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeEnum(8, varianceNorm_.getNumber());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, value_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, min_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(4, max_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, mean_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(6, std_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, sparse_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, varianceNorm_.getNumber());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.FillerParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.FillerParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.FillerParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.FillerParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.FillerParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.FillerParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.FillerParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.FillerParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.FillerParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.FillerParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.FillerParameter prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.FillerParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.FillerParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_FillerParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_FillerParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.FillerParameter.class, caffe.Caffe.FillerParameter.Builder.class);
}
// Construct using caffe.Caffe.FillerParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = "constant";
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0F;
bitField0_ = (bitField0_ & ~0x00000002);
min_ = 0F;
bitField0_ = (bitField0_ & ~0x00000004);
max_ = 1F;
bitField0_ = (bitField0_ & ~0x00000008);
mean_ = 0F;
bitField0_ = (bitField0_ & ~0x00000010);
std_ = 1F;
bitField0_ = (bitField0_ & ~0x00000020);
sparse_ = -1;
bitField0_ = (bitField0_ & ~0x00000040);
varianceNorm_ = caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN;
bitField0_ = (bitField0_ & ~0x00000080);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_FillerParameter_descriptor;
}
public caffe.Caffe.FillerParameter getDefaultInstanceForType() {
return caffe.Caffe.FillerParameter.getDefaultInstance();
}
public caffe.Caffe.FillerParameter build() {
caffe.Caffe.FillerParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.FillerParameter buildPartial() {
caffe.Caffe.FillerParameter result = new caffe.Caffe.FillerParameter(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.value_ = value_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.min_ = min_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.max_ = max_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.mean_ = mean_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.std_ = std_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040;
}
result.sparse_ = sparse_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000080;
}
result.varianceNorm_ = varianceNorm_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.FillerParameter) {
return mergeFrom((caffe.Caffe.FillerParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.FillerParameter other) {
if (other == caffe.Caffe.FillerParameter.getDefaultInstance()) return this;
if (other.hasType()) {
bitField0_ |= 0x00000001;
type_ = other.type_;
onChanged();
}
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasMin()) {
setMin(other.getMin());
}
if (other.hasMax()) {
setMax(other.getMax());
}
if (other.hasMean()) {
setMean(other.getMean());
}
if (other.hasStd()) {
setStd(other.getStd());
}
if (other.hasSparse()) {
setSparse(other.getSparse());
}
if (other.hasVarianceNorm()) {
setVarianceNorm(other.getVarianceNorm());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.FillerParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.FillerParameter) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string type = 1 [default = "constant"];
private java.lang.Object type_ = "constant";
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
* optional string type = 1 [default = "constant"];
*
*
* The filler type.
*
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
// optional float value = 2 [default = 0];
private float value_ ;
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public float getValue() {
return value_;
}
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public Builder setValue(float value) {
bitField0_ |= 0x00000002;
value_ = value;
onChanged();
return this;
}
/**
* optional float value = 2 [default = 0];
*
*
* the value in constant filler
*
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = 0F;
onChanged();
return this;
}
// optional float min = 3 [default = 0];
private float min_ ;
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public boolean hasMin() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public float getMin() {
return min_;
}
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public Builder setMin(float value) {
bitField0_ |= 0x00000004;
min_ = value;
onChanged();
return this;
}
/**
* optional float min = 3 [default = 0];
*
*
* the min value in uniform filler
*
*/
public Builder clearMin() {
bitField0_ = (bitField0_ & ~0x00000004);
min_ = 0F;
onChanged();
return this;
}
// optional float max = 4 [default = 1];
private float max_ = 1F;
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public boolean hasMax() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public float getMax() {
return max_;
}
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public Builder setMax(float value) {
bitField0_ |= 0x00000008;
max_ = value;
onChanged();
return this;
}
/**
* optional float max = 4 [default = 1];
*
*
* the max value in uniform filler
*
*/
public Builder clearMax() {
bitField0_ = (bitField0_ & ~0x00000008);
max_ = 1F;
onChanged();
return this;
}
// optional float mean = 5 [default = 0];
private float mean_ ;
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public boolean hasMean() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public float getMean() {
return mean_;
}
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public Builder setMean(float value) {
bitField0_ |= 0x00000010;
mean_ = value;
onChanged();
return this;
}
/**
* optional float mean = 5 [default = 0];
*
*
* the mean value in Gaussian filler
*
*/
public Builder clearMean() {
bitField0_ = (bitField0_ & ~0x00000010);
mean_ = 0F;
onChanged();
return this;
}
// optional float std = 6 [default = 1];
private float std_ = 1F;
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public boolean hasStd() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public float getStd() {
return std_;
}
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public Builder setStd(float value) {
bitField0_ |= 0x00000020;
std_ = value;
onChanged();
return this;
}
/**
* optional float std = 6 [default = 1];
*
*
* the std value in Gaussian filler
*
*/
public Builder clearStd() {
bitField0_ = (bitField0_ & ~0x00000020);
std_ = 1F;
onChanged();
return this;
}
// optional int32 sparse = 7 [default = -1];
private int sparse_ = -1;
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public boolean hasSparse() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public int getSparse() {
return sparse_;
}
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public Builder setSparse(int value) {
bitField0_ |= 0x00000040;
sparse_ = value;
onChanged();
return this;
}
/**
* optional int32 sparse = 7 [default = -1];
*
*
* The expected number of non-zero output weights for a given input in
* Gaussian filler -- the default -1 means don't perform sparsification.
*
*/
public Builder clearSparse() {
bitField0_ = (bitField0_ & ~0x00000040);
sparse_ = -1;
onChanged();
return this;
}
// optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
private caffe.Caffe.FillerParameter.VarianceNorm varianceNorm_ = caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN;
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public boolean hasVarianceNorm() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public caffe.Caffe.FillerParameter.VarianceNorm getVarianceNorm() {
return varianceNorm_;
}
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public Builder setVarianceNorm(caffe.Caffe.FillerParameter.VarianceNorm value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
varianceNorm_ = value;
onChanged();
return this;
}
/**
* optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
*/
public Builder clearVarianceNorm() {
bitField0_ = (bitField0_ & ~0x00000080);
varianceNorm_ = caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.FillerParameter)
}
static {
defaultInstance = new FillerParameter(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.FillerParameter)
}
public interface NetParameterOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string name = 1;
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
boolean hasName();
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
java.lang.String getName();
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
com.google.protobuf.ByteString
getNameBytes();
// repeated string input = 3;
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
java.util.List
getInputList();
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
int getInputCount();
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
java.lang.String getInput(int index);
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
com.google.protobuf.ByteString
getInputBytes(int index);
// repeated .caffe.BlobShape input_shape = 8;
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
java.util.List
getInputShapeList();
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
caffe.Caffe.BlobShape getInputShape(int index);
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
int getInputShapeCount();
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
java.util.List extends caffe.Caffe.BlobShapeOrBuilder>
getInputShapeOrBuilderList();
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
caffe.Caffe.BlobShapeOrBuilder getInputShapeOrBuilder(
int index);
// repeated int32 input_dim = 4;
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
java.util.List getInputDimList();
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
int getInputDimCount();
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
int getInputDim(int index);
// optional bool force_backward = 5 [default = false];
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
boolean hasForceBackward();
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
boolean getForceBackward();
// optional .caffe.NetState state = 6;
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
boolean hasState();
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
caffe.Caffe.NetState getState();
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
caffe.Caffe.NetStateOrBuilder getStateOrBuilder();
// optional bool debug_info = 7 [default = false];
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
boolean hasDebugInfo();
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
boolean getDebugInfo();
// repeated .caffe.LayerParameter layer = 100;
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
java.util.List
getLayerList();
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
caffe.Caffe.LayerParameter getLayer(int index);
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
int getLayerCount();
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
java.util.List extends caffe.Caffe.LayerParameterOrBuilder>
getLayerOrBuilderList();
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
caffe.Caffe.LayerParameterOrBuilder getLayerOrBuilder(
int index);
// repeated .caffe.V1LayerParameter layers = 2;
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
java.util.List
getLayersList();
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
caffe.Caffe.V1LayerParameter getLayers(int index);
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
int getLayersCount();
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
java.util.List extends caffe.Caffe.V1LayerParameterOrBuilder>
getLayersOrBuilderList();
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
caffe.Caffe.V1LayerParameterOrBuilder getLayersOrBuilder(
int index);
}
/**
* Protobuf type {@code caffe.NetParameter}
*/
public static final class NetParameter extends
com.google.protobuf.GeneratedMessage
implements NetParameterOrBuilder {
// Use NetParameter.newBuilder() to construct.
private NetParameter(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private NetParameter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final NetParameter defaultInstance;
public static NetParameter getDefaultInstance() {
return defaultInstance;
}
public NetParameter getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NetParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
name_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
layers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
layers_.add(input.readMessage(caffe.Caffe.V1LayerParameter.PARSER, extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
input_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
input_.add(input.readBytes());
break;
}
case 32: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
inputDim_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
inputDim_.add(input.readInt32());
break;
}
case 34: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
inputDim_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
while (input.getBytesUntilLimit() > 0) {
inputDim_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 40: {
bitField0_ |= 0x00000002;
forceBackward_ = input.readBool();
break;
}
case 50: {
caffe.Caffe.NetState.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = state_.toBuilder();
}
state_ = input.readMessage(caffe.Caffe.NetState.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(state_);
state_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 56: {
bitField0_ |= 0x00000008;
debugInfo_ = input.readBool();
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
inputShape_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
inputShape_.add(input.readMessage(caffe.Caffe.BlobShape.PARSER, extensionRegistry));
break;
}
case 802: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
layer_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
layer_.add(input.readMessage(caffe.Caffe.LayerParameter.PARSER, extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
layers_ = java.util.Collections.unmodifiableList(layers_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
input_ = new com.google.protobuf.UnmodifiableLazyStringList(input_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
inputDim_ = java.util.Collections.unmodifiableList(inputDim_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
inputShape_ = java.util.Collections.unmodifiableList(inputShape_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
layer_ = java.util.Collections.unmodifiableList(layer_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetParameter.class, caffe.Caffe.NetParameter.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public NetParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NetParameter(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional string name = 1;
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.Object name_;
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated string input = 3;
public static final int INPUT_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList input_;
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public java.util.List
getInputList() {
return input_;
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public int getInputCount() {
return input_.size();
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public java.lang.String getInput(int index) {
return input_.get(index);
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public com.google.protobuf.ByteString
getInputBytes(int index) {
return input_.getByteString(index);
}
// repeated .caffe.BlobShape input_shape = 8;
public static final int INPUT_SHAPE_FIELD_NUMBER = 8;
private java.util.List inputShape_;
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public java.util.List getInputShapeList() {
return inputShape_;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public java.util.List extends caffe.Caffe.BlobShapeOrBuilder>
getInputShapeOrBuilderList() {
return inputShape_;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public int getInputShapeCount() {
return inputShape_.size();
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShape getInputShape(int index) {
return inputShape_.get(index);
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShapeOrBuilder getInputShapeOrBuilder(
int index) {
return inputShape_.get(index);
}
// repeated int32 input_dim = 4;
public static final int INPUT_DIM_FIELD_NUMBER = 4;
private java.util.List inputDim_;
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public java.util.List
getInputDimList() {
return inputDim_;
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public int getInputDimCount() {
return inputDim_.size();
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public int getInputDim(int index) {
return inputDim_.get(index);
}
// optional bool force_backward = 5 [default = false];
public static final int FORCE_BACKWARD_FIELD_NUMBER = 5;
private boolean forceBackward_;
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public boolean hasForceBackward() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public boolean getForceBackward() {
return forceBackward_;
}
// optional .caffe.NetState state = 6;
public static final int STATE_FIELD_NUMBER = 6;
private caffe.Caffe.NetState state_;
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public boolean hasState() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public caffe.Caffe.NetState getState() {
return state_;
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public caffe.Caffe.NetStateOrBuilder getStateOrBuilder() {
return state_;
}
// optional bool debug_info = 7 [default = false];
public static final int DEBUG_INFO_FIELD_NUMBER = 7;
private boolean debugInfo_;
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public boolean hasDebugInfo() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public boolean getDebugInfo() {
return debugInfo_;
}
// repeated .caffe.LayerParameter layer = 100;
public static final int LAYER_FIELD_NUMBER = 100;
private java.util.List layer_;
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public java.util.List getLayerList() {
return layer_;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public java.util.List extends caffe.Caffe.LayerParameterOrBuilder>
getLayerOrBuilderList() {
return layer_;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public int getLayerCount() {
return layer_.size();
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameter getLayer(int index) {
return layer_.get(index);
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameterOrBuilder getLayerOrBuilder(
int index) {
return layer_.get(index);
}
// repeated .caffe.V1LayerParameter layers = 2;
public static final int LAYERS_FIELD_NUMBER = 2;
private java.util.List layers_;
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public java.util.List getLayersList() {
return layers_;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public java.util.List extends caffe.Caffe.V1LayerParameterOrBuilder>
getLayersOrBuilderList() {
return layers_;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public int getLayersCount() {
return layers_.size();
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameter getLayers(int index) {
return layers_.get(index);
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameterOrBuilder getLayersOrBuilder(
int index) {
return layers_.get(index);
}
private void initFields() {
name_ = "";
input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
inputShape_ = java.util.Collections.emptyList();
inputDim_ = java.util.Collections.emptyList();
forceBackward_ = false;
state_ = caffe.Caffe.NetState.getDefaultInstance();
debugInfo_ = false;
layer_ = java.util.Collections.emptyList();
layers_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getNameBytes());
}
for (int i = 0; i < layers_.size(); i++) {
output.writeMessage(2, layers_.get(i));
}
for (int i = 0; i < input_.size(); i++) {
output.writeBytes(3, input_.getByteString(i));
}
for (int i = 0; i < inputDim_.size(); i++) {
output.writeInt32(4, inputDim_.get(i));
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBool(5, forceBackward_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(6, state_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBool(7, debugInfo_);
}
for (int i = 0; i < inputShape_.size(); i++) {
output.writeMessage(8, inputShape_.get(i));
}
for (int i = 0; i < layer_.size(); i++) {
output.writeMessage(100, layer_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getNameBytes());
}
for (int i = 0; i < layers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, layers_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < input_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(input_.getByteString(i));
}
size += dataSize;
size += 1 * getInputList().size();
}
{
int dataSize = 0;
for (int i = 0; i < inputDim_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(inputDim_.get(i));
}
size += dataSize;
size += 1 * getInputDimList().size();
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, forceBackward_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, state_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, debugInfo_);
}
for (int i = 0; i < inputShape_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, inputShape_.get(i));
}
for (int i = 0; i < layer_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(100, layer_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.NetParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.NetParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.NetParameter prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.NetParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.NetParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetParameter.class, caffe.Caffe.NetParameter.Builder.class);
}
// Construct using caffe.Caffe.NetParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getInputShapeFieldBuilder();
getStateFieldBuilder();
getLayerFieldBuilder();
getLayersFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
if (inputShapeBuilder_ == null) {
inputShape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
inputShapeBuilder_.clear();
}
inputDim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
forceBackward_ = false;
bitField0_ = (bitField0_ & ~0x00000010);
if (stateBuilder_ == null) {
state_ = caffe.Caffe.NetState.getDefaultInstance();
} else {
stateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
debugInfo_ = false;
bitField0_ = (bitField0_ & ~0x00000040);
if (layerBuilder_ == null) {
layer_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
} else {
layerBuilder_.clear();
}
if (layersBuilder_ == null) {
layers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
} else {
layersBuilder_.clear();
}
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_NetParameter_descriptor;
}
public caffe.Caffe.NetParameter getDefaultInstanceForType() {
return caffe.Caffe.NetParameter.getDefaultInstance();
}
public caffe.Caffe.NetParameter build() {
caffe.Caffe.NetParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.NetParameter buildPartial() {
caffe.Caffe.NetParameter result = new caffe.Caffe.NetParameter(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
input_ = new com.google.protobuf.UnmodifiableLazyStringList(
input_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.input_ = input_;
if (inputShapeBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
inputShape_ = java.util.Collections.unmodifiableList(inputShape_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.inputShape_ = inputShape_;
} else {
result.inputShape_ = inputShapeBuilder_.build();
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
inputDim_ = java.util.Collections.unmodifiableList(inputDim_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.inputDim_ = inputDim_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000002;
}
result.forceBackward_ = forceBackward_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000004;
}
if (stateBuilder_ == null) {
result.state_ = state_;
} else {
result.state_ = stateBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000008;
}
result.debugInfo_ = debugInfo_;
if (layerBuilder_ == null) {
if (((bitField0_ & 0x00000080) == 0x00000080)) {
layer_ = java.util.Collections.unmodifiableList(layer_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.layer_ = layer_;
} else {
result.layer_ = layerBuilder_.build();
}
if (layersBuilder_ == null) {
if (((bitField0_ & 0x00000100) == 0x00000100)) {
layers_ = java.util.Collections.unmodifiableList(layers_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.layers_ = layers_;
} else {
result.layers_ = layersBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.NetParameter) {
return mergeFrom((caffe.Caffe.NetParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.NetParameter other) {
if (other == caffe.Caffe.NetParameter.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (!other.input_.isEmpty()) {
if (input_.isEmpty()) {
input_ = other.input_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureInputIsMutable();
input_.addAll(other.input_);
}
onChanged();
}
if (inputShapeBuilder_ == null) {
if (!other.inputShape_.isEmpty()) {
if (inputShape_.isEmpty()) {
inputShape_ = other.inputShape_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureInputShapeIsMutable();
inputShape_.addAll(other.inputShape_);
}
onChanged();
}
} else {
if (!other.inputShape_.isEmpty()) {
if (inputShapeBuilder_.isEmpty()) {
inputShapeBuilder_.dispose();
inputShapeBuilder_ = null;
inputShape_ = other.inputShape_;
bitField0_ = (bitField0_ & ~0x00000004);
inputShapeBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getInputShapeFieldBuilder() : null;
} else {
inputShapeBuilder_.addAllMessages(other.inputShape_);
}
}
}
if (!other.inputDim_.isEmpty()) {
if (inputDim_.isEmpty()) {
inputDim_ = other.inputDim_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureInputDimIsMutable();
inputDim_.addAll(other.inputDim_);
}
onChanged();
}
if (other.hasForceBackward()) {
setForceBackward(other.getForceBackward());
}
if (other.hasState()) {
mergeState(other.getState());
}
if (other.hasDebugInfo()) {
setDebugInfo(other.getDebugInfo());
}
if (layerBuilder_ == null) {
if (!other.layer_.isEmpty()) {
if (layer_.isEmpty()) {
layer_ = other.layer_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureLayerIsMutable();
layer_.addAll(other.layer_);
}
onChanged();
}
} else {
if (!other.layer_.isEmpty()) {
if (layerBuilder_.isEmpty()) {
layerBuilder_.dispose();
layerBuilder_ = null;
layer_ = other.layer_;
bitField0_ = (bitField0_ & ~0x00000080);
layerBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getLayerFieldBuilder() : null;
} else {
layerBuilder_.addAllMessages(other.layer_);
}
}
}
if (layersBuilder_ == null) {
if (!other.layers_.isEmpty()) {
if (layers_.isEmpty()) {
layers_ = other.layers_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureLayersIsMutable();
layers_.addAll(other.layers_);
}
onChanged();
}
} else {
if (!other.layers_.isEmpty()) {
if (layersBuilder_.isEmpty()) {
layersBuilder_.dispose();
layersBuilder_ = null;
layers_ = other.layers_;
bitField0_ = (bitField0_ & ~0x00000100);
layersBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getLayersFieldBuilder() : null;
} else {
layersBuilder_.addAllMessages(other.layers_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.NetParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.NetParameter) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string name = 1;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
*
*
* consider giving the network a name
*
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
// repeated string input = 3;
private com.google.protobuf.LazyStringList input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureInputIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
input_ = new com.google.protobuf.LazyStringArrayList(input_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public java.util.List
getInputList() {
return java.util.Collections.unmodifiableList(input_);
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public int getInputCount() {
return input_.size();
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public java.lang.String getInput(int index) {
return input_.get(index);
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public com.google.protobuf.ByteString
getInputBytes(int index) {
return input_.getByteString(index);
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public Builder setInput(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputIsMutable();
input_.set(index, value);
onChanged();
return this;
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public Builder addInput(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputIsMutable();
input_.add(value);
onChanged();
return this;
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public Builder addAllInput(
java.lang.Iterable values) {
ensureInputIsMutable();
super.addAll(values, input_);
onChanged();
return this;
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public Builder clearInput() {
input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string input = 3;
*
*
* DEPRECATED. See InputParameter. The input blobs to the network.
*
*/
public Builder addInputBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputIsMutable();
input_.add(value);
onChanged();
return this;
}
// repeated .caffe.BlobShape input_shape = 8;
private java.util.List inputShape_ =
java.util.Collections.emptyList();
private void ensureInputShapeIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
inputShape_ = new java.util.ArrayList(inputShape_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> inputShapeBuilder_;
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public java.util.List getInputShapeList() {
if (inputShapeBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputShape_);
} else {
return inputShapeBuilder_.getMessageList();
}
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public int getInputShapeCount() {
if (inputShapeBuilder_ == null) {
return inputShape_.size();
} else {
return inputShapeBuilder_.getCount();
}
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShape getInputShape(int index) {
if (inputShapeBuilder_ == null) {
return inputShape_.get(index);
} else {
return inputShapeBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder setInputShape(
int index, caffe.Caffe.BlobShape value) {
if (inputShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputShapeIsMutable();
inputShape_.set(index, value);
onChanged();
} else {
inputShapeBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder setInputShape(
int index, caffe.Caffe.BlobShape.Builder builderForValue) {
if (inputShapeBuilder_ == null) {
ensureInputShapeIsMutable();
inputShape_.set(index, builderForValue.build());
onChanged();
} else {
inputShapeBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder addInputShape(caffe.Caffe.BlobShape value) {
if (inputShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputShapeIsMutable();
inputShape_.add(value);
onChanged();
} else {
inputShapeBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder addInputShape(
int index, caffe.Caffe.BlobShape value) {
if (inputShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputShapeIsMutable();
inputShape_.add(index, value);
onChanged();
} else {
inputShapeBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder addInputShape(
caffe.Caffe.BlobShape.Builder builderForValue) {
if (inputShapeBuilder_ == null) {
ensureInputShapeIsMutable();
inputShape_.add(builderForValue.build());
onChanged();
} else {
inputShapeBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder addInputShape(
int index, caffe.Caffe.BlobShape.Builder builderForValue) {
if (inputShapeBuilder_ == null) {
ensureInputShapeIsMutable();
inputShape_.add(index, builderForValue.build());
onChanged();
} else {
inputShapeBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder addAllInputShape(
java.lang.Iterable extends caffe.Caffe.BlobShape> values) {
if (inputShapeBuilder_ == null) {
ensureInputShapeIsMutable();
super.addAll(values, inputShape_);
onChanged();
} else {
inputShapeBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder clearInputShape() {
if (inputShapeBuilder_ == null) {
inputShape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
inputShapeBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public Builder removeInputShape(int index) {
if (inputShapeBuilder_ == null) {
ensureInputShapeIsMutable();
inputShape_.remove(index);
onChanged();
} else {
inputShapeBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShape.Builder getInputShapeBuilder(
int index) {
return getInputShapeFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShapeOrBuilder getInputShapeOrBuilder(
int index) {
if (inputShapeBuilder_ == null) {
return inputShape_.get(index); } else {
return inputShapeBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public java.util.List extends caffe.Caffe.BlobShapeOrBuilder>
getInputShapeOrBuilderList() {
if (inputShapeBuilder_ != null) {
return inputShapeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inputShape_);
}
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShape.Builder addInputShapeBuilder() {
return getInputShapeFieldBuilder().addBuilder(
caffe.Caffe.BlobShape.getDefaultInstance());
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public caffe.Caffe.BlobShape.Builder addInputShapeBuilder(
int index) {
return getInputShapeFieldBuilder().addBuilder(
index, caffe.Caffe.BlobShape.getDefaultInstance());
}
/**
* repeated .caffe.BlobShape input_shape = 8;
*
*
* DEPRECATED. See InputParameter. The shape of the input blobs.
*
*/
public java.util.List
getInputShapeBuilderList() {
return getInputShapeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>
getInputShapeFieldBuilder() {
if (inputShapeBuilder_ == null) {
inputShapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>(
inputShape_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
inputShape_ = null;
}
return inputShapeBuilder_;
}
// repeated int32 input_dim = 4;
private java.util.List inputDim_ = java.util.Collections.emptyList();
private void ensureInputDimIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
inputDim_ = new java.util.ArrayList(inputDim_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public java.util.List
getInputDimList() {
return java.util.Collections.unmodifiableList(inputDim_);
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public int getInputDimCount() {
return inputDim_.size();
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public int getInputDim(int index) {
return inputDim_.get(index);
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public Builder setInputDim(
int index, int value) {
ensureInputDimIsMutable();
inputDim_.set(index, value);
onChanged();
return this;
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public Builder addInputDim(int value) {
ensureInputDimIsMutable();
inputDim_.add(value);
onChanged();
return this;
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public Builder addAllInputDim(
java.lang.Iterable extends java.lang.Integer> values) {
ensureInputDimIsMutable();
super.addAll(values, inputDim_);
onChanged();
return this;
}
/**
* repeated int32 input_dim = 4;
*
*
* 4D input dimensions -- deprecated. Use "input_shape" instead.
* If specified, for each input blob there should be four
* values specifying the num, channels, height and width of the input blob.
* Thus, there should be a total of (4 * #input) numbers.
*
*/
public Builder clearInputDim() {
inputDim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
// optional bool force_backward = 5 [default = false];
private boolean forceBackward_ ;
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public boolean hasForceBackward() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public boolean getForceBackward() {
return forceBackward_;
}
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public Builder setForceBackward(boolean value) {
bitField0_ |= 0x00000010;
forceBackward_ = value;
onChanged();
return this;
}
/**
* optional bool force_backward = 5 [default = false];
*
*
* Whether the network will force every layer to carry out backward operation.
* If set False, then whether to carry out backward is determined
* automatically according to the net structure and learning rates.
*
*/
public Builder clearForceBackward() {
bitField0_ = (bitField0_ & ~0x00000010);
forceBackward_ = false;
onChanged();
return this;
}
// optional .caffe.NetState state = 6;
private caffe.Caffe.NetState state_ = caffe.Caffe.NetState.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> stateBuilder_;
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public boolean hasState() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public caffe.Caffe.NetState getState() {
if (stateBuilder_ == null) {
return state_;
} else {
return stateBuilder_.getMessage();
}
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public Builder setState(caffe.Caffe.NetState value) {
if (stateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
state_ = value;
onChanged();
} else {
stateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public Builder setState(
caffe.Caffe.NetState.Builder builderForValue) {
if (stateBuilder_ == null) {
state_ = builderForValue.build();
onChanged();
} else {
stateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public Builder mergeState(caffe.Caffe.NetState value) {
if (stateBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020) &&
state_ != caffe.Caffe.NetState.getDefaultInstance()) {
state_ =
caffe.Caffe.NetState.newBuilder(state_).mergeFrom(value).buildPartial();
} else {
state_ = value;
}
onChanged();
} else {
stateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public Builder clearState() {
if (stateBuilder_ == null) {
state_ = caffe.Caffe.NetState.getDefaultInstance();
onChanged();
} else {
stateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public caffe.Caffe.NetState.Builder getStateBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getStateFieldBuilder().getBuilder();
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
public caffe.Caffe.NetStateOrBuilder getStateOrBuilder() {
if (stateBuilder_ != null) {
return stateBuilder_.getMessageOrBuilder();
} else {
return state_;
}
}
/**
* optional .caffe.NetState state = 6;
*
*
* The current "state" of the network, including the phase, level, and stage.
* Some layers may be included/excluded depending on this state and the states
* specified in the layers' include and exclude fields.
*
*/
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>
getStateFieldBuilder() {
if (stateBuilder_ == null) {
stateBuilder_ = new com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>(
state_,
getParentForChildren(),
isClean());
state_ = null;
}
return stateBuilder_;
}
// optional bool debug_info = 7 [default = false];
private boolean debugInfo_ ;
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public boolean hasDebugInfo() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public boolean getDebugInfo() {
return debugInfo_;
}
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public Builder setDebugInfo(boolean value) {
bitField0_ |= 0x00000040;
debugInfo_ = value;
onChanged();
return this;
}
/**
* optional bool debug_info = 7 [default = false];
*
*
* Print debugging information about results while running Net::Forward,
* Net::Backward, and Net::Update.
*
*/
public Builder clearDebugInfo() {
bitField0_ = (bitField0_ & ~0x00000040);
debugInfo_ = false;
onChanged();
return this;
}
// repeated .caffe.LayerParameter layer = 100;
private java.util.List layer_ =
java.util.Collections.emptyList();
private void ensureLayerIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
layer_ = new java.util.ArrayList(layer_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.LayerParameter, caffe.Caffe.LayerParameter.Builder, caffe.Caffe.LayerParameterOrBuilder> layerBuilder_;
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public java.util.List getLayerList() {
if (layerBuilder_ == null) {
return java.util.Collections.unmodifiableList(layer_);
} else {
return layerBuilder_.getMessageList();
}
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public int getLayerCount() {
if (layerBuilder_ == null) {
return layer_.size();
} else {
return layerBuilder_.getCount();
}
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameter getLayer(int index) {
if (layerBuilder_ == null) {
return layer_.get(index);
} else {
return layerBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder setLayer(
int index, caffe.Caffe.LayerParameter value) {
if (layerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerIsMutable();
layer_.set(index, value);
onChanged();
} else {
layerBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder setLayer(
int index, caffe.Caffe.LayerParameter.Builder builderForValue) {
if (layerBuilder_ == null) {
ensureLayerIsMutable();
layer_.set(index, builderForValue.build());
onChanged();
} else {
layerBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder addLayer(caffe.Caffe.LayerParameter value) {
if (layerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerIsMutable();
layer_.add(value);
onChanged();
} else {
layerBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder addLayer(
int index, caffe.Caffe.LayerParameter value) {
if (layerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerIsMutable();
layer_.add(index, value);
onChanged();
} else {
layerBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder addLayer(
caffe.Caffe.LayerParameter.Builder builderForValue) {
if (layerBuilder_ == null) {
ensureLayerIsMutable();
layer_.add(builderForValue.build());
onChanged();
} else {
layerBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder addLayer(
int index, caffe.Caffe.LayerParameter.Builder builderForValue) {
if (layerBuilder_ == null) {
ensureLayerIsMutable();
layer_.add(index, builderForValue.build());
onChanged();
} else {
layerBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder addAllLayer(
java.lang.Iterable extends caffe.Caffe.LayerParameter> values) {
if (layerBuilder_ == null) {
ensureLayerIsMutable();
super.addAll(values, layer_);
onChanged();
} else {
layerBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder clearLayer() {
if (layerBuilder_ == null) {
layer_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
layerBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public Builder removeLayer(int index) {
if (layerBuilder_ == null) {
ensureLayerIsMutable();
layer_.remove(index);
onChanged();
} else {
layerBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameter.Builder getLayerBuilder(
int index) {
return getLayerFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameterOrBuilder getLayerOrBuilder(
int index) {
if (layerBuilder_ == null) {
return layer_.get(index); } else {
return layerBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public java.util.List extends caffe.Caffe.LayerParameterOrBuilder>
getLayerOrBuilderList() {
if (layerBuilder_ != null) {
return layerBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(layer_);
}
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameter.Builder addLayerBuilder() {
return getLayerFieldBuilder().addBuilder(
caffe.Caffe.LayerParameter.getDefaultInstance());
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public caffe.Caffe.LayerParameter.Builder addLayerBuilder(
int index) {
return getLayerFieldBuilder().addBuilder(
index, caffe.Caffe.LayerParameter.getDefaultInstance());
}
/**
* repeated .caffe.LayerParameter layer = 100;
*
*
* The layers that make up the net. Each of their configurations, including
* connectivity and behavior, is specified as a LayerParameter.
*
*/
public java.util.List
getLayerBuilderList() {
return getLayerFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.LayerParameter, caffe.Caffe.LayerParameter.Builder, caffe.Caffe.LayerParameterOrBuilder>
getLayerFieldBuilder() {
if (layerBuilder_ == null) {
layerBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.LayerParameter, caffe.Caffe.LayerParameter.Builder, caffe.Caffe.LayerParameterOrBuilder>(
layer_,
((bitField0_ & 0x00000080) == 0x00000080),
getParentForChildren(),
isClean());
layer_ = null;
}
return layerBuilder_;
}
// repeated .caffe.V1LayerParameter layers = 2;
private java.util.List layers_ =
java.util.Collections.emptyList();
private void ensureLayersIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
layers_ = new java.util.ArrayList(layers_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.V1LayerParameter, caffe.Caffe.V1LayerParameter.Builder, caffe.Caffe.V1LayerParameterOrBuilder> layersBuilder_;
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public java.util.List getLayersList() {
if (layersBuilder_ == null) {
return java.util.Collections.unmodifiableList(layers_);
} else {
return layersBuilder_.getMessageList();
}
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public int getLayersCount() {
if (layersBuilder_ == null) {
return layers_.size();
} else {
return layersBuilder_.getCount();
}
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameter getLayers(int index) {
if (layersBuilder_ == null) {
return layers_.get(index);
} else {
return layersBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder setLayers(
int index, caffe.Caffe.V1LayerParameter value) {
if (layersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayersIsMutable();
layers_.set(index, value);
onChanged();
} else {
layersBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder setLayers(
int index, caffe.Caffe.V1LayerParameter.Builder builderForValue) {
if (layersBuilder_ == null) {
ensureLayersIsMutable();
layers_.set(index, builderForValue.build());
onChanged();
} else {
layersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder addLayers(caffe.Caffe.V1LayerParameter value) {
if (layersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayersIsMutable();
layers_.add(value);
onChanged();
} else {
layersBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder addLayers(
int index, caffe.Caffe.V1LayerParameter value) {
if (layersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayersIsMutable();
layers_.add(index, value);
onChanged();
} else {
layersBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder addLayers(
caffe.Caffe.V1LayerParameter.Builder builderForValue) {
if (layersBuilder_ == null) {
ensureLayersIsMutable();
layers_.add(builderForValue.build());
onChanged();
} else {
layersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder addLayers(
int index, caffe.Caffe.V1LayerParameter.Builder builderForValue) {
if (layersBuilder_ == null) {
ensureLayersIsMutable();
layers_.add(index, builderForValue.build());
onChanged();
} else {
layersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder addAllLayers(
java.lang.Iterable extends caffe.Caffe.V1LayerParameter> values) {
if (layersBuilder_ == null) {
ensureLayersIsMutable();
super.addAll(values, layers_);
onChanged();
} else {
layersBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder clearLayers() {
if (layersBuilder_ == null) {
layers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
layersBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public Builder removeLayers(int index) {
if (layersBuilder_ == null) {
ensureLayersIsMutable();
layers_.remove(index);
onChanged();
} else {
layersBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameter.Builder getLayersBuilder(
int index) {
return getLayersFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameterOrBuilder getLayersOrBuilder(
int index) {
if (layersBuilder_ == null) {
return layers_.get(index); } else {
return layersBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public java.util.List extends caffe.Caffe.V1LayerParameterOrBuilder>
getLayersOrBuilderList() {
if (layersBuilder_ != null) {
return layersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(layers_);
}
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameter.Builder addLayersBuilder() {
return getLayersFieldBuilder().addBuilder(
caffe.Caffe.V1LayerParameter.getDefaultInstance());
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public caffe.Caffe.V1LayerParameter.Builder addLayersBuilder(
int index) {
return getLayersFieldBuilder().addBuilder(
index, caffe.Caffe.V1LayerParameter.getDefaultInstance());
}
/**
* repeated .caffe.V1LayerParameter layers = 2;
*
*
* DEPRECATED: use 'layer' instead.
*
*/
public java.util.List
getLayersBuilderList() {
return getLayersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.V1LayerParameter, caffe.Caffe.V1LayerParameter.Builder, caffe.Caffe.V1LayerParameterOrBuilder>
getLayersFieldBuilder() {
if (layersBuilder_ == null) {
layersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.V1LayerParameter, caffe.Caffe.V1LayerParameter.Builder, caffe.Caffe.V1LayerParameterOrBuilder>(
layers_,
((bitField0_ & 0x00000100) == 0x00000100),
getParentForChildren(),
isClean());
layers_ = null;
}
return layersBuilder_;
}
// @@protoc_insertion_point(builder_scope:caffe.NetParameter)
}
static {
defaultInstance = new NetParameter(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.NetParameter)
}
public interface SolverParameterOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string net = 24;
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
boolean hasNet();
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
java.lang.String getNet();
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
com.google.protobuf.ByteString
getNetBytes();
// optional .caffe.NetParameter net_param = 25;
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
boolean hasNetParam();
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
caffe.Caffe.NetParameter getNetParam();
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
caffe.Caffe.NetParameterOrBuilder getNetParamOrBuilder();
// optional string train_net = 1;
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
boolean hasTrainNet();
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
java.lang.String getTrainNet();
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
com.google.protobuf.ByteString
getTrainNetBytes();
// repeated string test_net = 2;
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
java.util.List
getTestNetList();
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
int getTestNetCount();
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
java.lang.String getTestNet(int index);
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
com.google.protobuf.ByteString
getTestNetBytes(int index);
// optional .caffe.NetParameter train_net_param = 21;
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
boolean hasTrainNetParam();
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
caffe.Caffe.NetParameter getTrainNetParam();
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
caffe.Caffe.NetParameterOrBuilder getTrainNetParamOrBuilder();
// repeated .caffe.NetParameter test_net_param = 22;
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
java.util.List
getTestNetParamList();
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
caffe.Caffe.NetParameter getTestNetParam(int index);
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
int getTestNetParamCount();
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
java.util.List extends caffe.Caffe.NetParameterOrBuilder>
getTestNetParamOrBuilderList();
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
caffe.Caffe.NetParameterOrBuilder getTestNetParamOrBuilder(
int index);
// optional .caffe.NetState train_state = 26;
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
boolean hasTrainState();
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
caffe.Caffe.NetState getTrainState();
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder();
// repeated .caffe.NetState test_state = 27;
/**
* repeated .caffe.NetState test_state = 27;
*/
java.util.List
getTestStateList();
/**
* repeated .caffe.NetState test_state = 27;
*/
caffe.Caffe.NetState getTestState(int index);
/**
* repeated .caffe.NetState test_state = 27;
*/
int getTestStateCount();
/**
* repeated .caffe.NetState test_state = 27;
*/
java.util.List extends caffe.Caffe.NetStateOrBuilder>
getTestStateOrBuilderList();
/**
* repeated .caffe.NetState test_state = 27;
*/
caffe.Caffe.NetStateOrBuilder getTestStateOrBuilder(
int index);
// repeated int32 test_iter = 3;
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
java.util.List getTestIterList();
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
int getTestIterCount();
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
int getTestIter(int index);
// optional int32 test_interval = 4 [default = 0];
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
boolean hasTestInterval();
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
int getTestInterval();
// optional bool test_compute_loss = 19 [default = false];
/**
* optional bool test_compute_loss = 19 [default = false];
*/
boolean hasTestComputeLoss();
/**
* optional bool test_compute_loss = 19 [default = false];
*/
boolean getTestComputeLoss();
// optional bool test_initialization = 32 [default = true];
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
boolean hasTestInitialization();
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
boolean getTestInitialization();
// optional float base_lr = 5;
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
boolean hasBaseLr();
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
float getBaseLr();
// optional int32 display = 6;
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
boolean hasDisplay();
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
int getDisplay();
// optional int32 average_loss = 33 [default = 1];
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
boolean hasAverageLoss();
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
int getAverageLoss();
// optional int32 max_iter = 7;
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
boolean hasMaxIter();
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
int getMaxIter();
// optional int32 iter_size = 36 [default = 1];
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
boolean hasIterSize();
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
int getIterSize();
// optional string lr_policy = 8;
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
boolean hasLrPolicy();
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
java.lang.String getLrPolicy();
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
com.google.protobuf.ByteString
getLrPolicyBytes();
// optional float gamma = 9;
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
boolean hasGamma();
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
float getGamma();
// optional float power = 10;
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
boolean hasPower();
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
float getPower();
// optional float momentum = 11;
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
boolean hasMomentum();
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
float getMomentum();
// optional float weight_decay = 12;
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
boolean hasWeightDecay();
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
float getWeightDecay();
// optional string regularization_type = 29 [default = "L2"];
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
boolean hasRegularizationType();
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
java.lang.String getRegularizationType();
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
com.google.protobuf.ByteString
getRegularizationTypeBytes();
// optional int32 stepsize = 13;
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
boolean hasStepsize();
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
int getStepsize();
// repeated int32 stepvalue = 34;
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
java.util.List getStepvalueList();
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
int getStepvalueCount();
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
int getStepvalue(int index);
// repeated int32 plateau_winsize = 41;
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
java.util.List getPlateauWinsizeList();
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
int getPlateauWinsizeCount();
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
int getPlateauWinsize(int index);
// optional float clip_gradients = 35 [default = -1];
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
boolean hasClipGradients();
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
float getClipGradients();
// optional int32 snapshot = 14 [default = 0];
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
boolean hasSnapshot();
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
int getSnapshot();
// optional string snapshot_prefix = 15;
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
boolean hasSnapshotPrefix();
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
java.lang.String getSnapshotPrefix();
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
com.google.protobuf.ByteString
getSnapshotPrefixBytes();
// optional bool snapshot_diff = 16 [default = false];
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
boolean hasSnapshotDiff();
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
boolean getSnapshotDiff();
// optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
boolean hasSnapshotFormat();
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
caffe.Caffe.SolverParameter.SnapshotFormat getSnapshotFormat();
// optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
boolean hasSolverMode();
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
caffe.Caffe.SolverParameter.SolverMode getSolverMode();
// optional int32 device_id = 18 [default = 0];
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
boolean hasDeviceId();
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
int getDeviceId();
// optional int64 random_seed = 20 [default = -1];
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
boolean hasRandomSeed();
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
long getRandomSeed();
// optional string type = 40 [default = "SGD"];
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
boolean hasType();
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
java.lang.String getType();
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
com.google.protobuf.ByteString
getTypeBytes();
// optional float delta = 31 [default = 1e-08];
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
boolean hasDelta();
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
float getDelta();
// optional float momentum2 = 39 [default = 0.999];
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
boolean hasMomentum2();
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
float getMomentum2();
// optional float rms_decay = 38 [default = 0.99];
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
boolean hasRmsDecay();
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
float getRmsDecay();
// optional bool debug_info = 23 [default = false];
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
boolean hasDebugInfo();
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
boolean getDebugInfo();
// optional bool snapshot_after_train = 28 [default = true];
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
boolean hasSnapshotAfterTrain();
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
boolean getSnapshotAfterTrain();
// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
boolean hasSolverType();
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
caffe.Caffe.SolverParameter.SolverType getSolverType();
}
/**
* Protobuf type {@code caffe.SolverParameter}
*
*
* NOTE
* Update the next available ID when you add a new SolverParameter field.
*
* SolverParameter next available ID: 42 (last added: plateau_winsize)
*
*/
public static final class SolverParameter extends
com.google.protobuf.GeneratedMessage
implements SolverParameterOrBuilder {
// Use SolverParameter.newBuilder() to construct.
private SolverParameter(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private SolverParameter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final SolverParameter defaultInstance;
public static SolverParameter getDefaultInstance() {
return defaultInstance;
}
public SolverParameter getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SolverParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
int mutable_bitField1_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000004;
trainNet_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
testNet_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
testNet_.add(input.readBytes());
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
testIter_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
testIter_.add(input.readInt32());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) {
testIter_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
while (input.getBytesUntilLimit() > 0) {
testIter_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 32: {
bitField0_ |= 0x00000020;
testInterval_ = input.readInt32();
break;
}
case 45: {
bitField0_ |= 0x00000100;
baseLr_ = input.readFloat();
break;
}
case 48: {
bitField0_ |= 0x00000200;
display_ = input.readInt32();
break;
}
case 56: {
bitField0_ |= 0x00000800;
maxIter_ = input.readInt32();
break;
}
case 66: {
bitField0_ |= 0x00002000;
lrPolicy_ = input.readBytes();
break;
}
case 77: {
bitField0_ |= 0x00004000;
gamma_ = input.readFloat();
break;
}
case 85: {
bitField0_ |= 0x00008000;
power_ = input.readFloat();
break;
}
case 93: {
bitField0_ |= 0x00010000;
momentum_ = input.readFloat();
break;
}
case 101: {
bitField0_ |= 0x00020000;
weightDecay_ = input.readFloat();
break;
}
case 104: {
bitField0_ |= 0x00080000;
stepsize_ = input.readInt32();
break;
}
case 112: {
bitField0_ |= 0x00200000;
snapshot_ = input.readInt32();
break;
}
case 122: {
bitField0_ |= 0x00400000;
snapshotPrefix_ = input.readBytes();
break;
}
case 128: {
bitField0_ |= 0x00800000;
snapshotDiff_ = input.readBool();
break;
}
case 136: {
int rawValue = input.readEnum();
caffe.Caffe.SolverParameter.SolverMode value = caffe.Caffe.SolverParameter.SolverMode.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(17, rawValue);
} else {
bitField0_ |= 0x02000000;
solverMode_ = value;
}
break;
}
case 144: {
bitField0_ |= 0x04000000;
deviceId_ = input.readInt32();
break;
}
case 152: {
bitField0_ |= 0x00000040;
testComputeLoss_ = input.readBool();
break;
}
case 160: {
bitField0_ |= 0x08000000;
randomSeed_ = input.readInt64();
break;
}
case 170: {
caffe.Caffe.NetParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = trainNetParam_.toBuilder();
}
trainNetParam_ = input.readMessage(caffe.Caffe.NetParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trainNetParam_);
trainNetParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 178: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
testNetParam_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
testNetParam_.add(input.readMessage(caffe.Caffe.NetParameter.PARSER, extensionRegistry));
break;
}
case 184: {
bitField1_ |= 0x00000001;
debugInfo_ = input.readBool();
break;
}
case 194: {
bitField0_ |= 0x00000001;
net_ = input.readBytes();
break;
}
case 202: {
caffe.Caffe.NetParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = netParam_.toBuilder();
}
netParam_ = input.readMessage(caffe.Caffe.NetParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(netParam_);
netParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 210: {
caffe.Caffe.NetState.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = trainState_.toBuilder();
}
trainState_ = input.readMessage(caffe.Caffe.NetState.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trainState_);
trainState_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
case 218: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
testState_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
testState_.add(input.readMessage(caffe.Caffe.NetState.PARSER, extensionRegistry));
break;
}
case 224: {
bitField1_ |= 0x00000002;
snapshotAfterTrain_ = input.readBool();
break;
}
case 234: {
bitField0_ |= 0x00040000;
regularizationType_ = input.readBytes();
break;
}
case 240: {
int rawValue = input.readEnum();
caffe.Caffe.SolverParameter.SolverType value = caffe.Caffe.SolverParameter.SolverType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(30, rawValue);
} else {
bitField1_ |= 0x00000004;
solverType_ = value;
}
break;
}
case 253: {
bitField0_ |= 0x20000000;
delta_ = input.readFloat();
break;
}
case 256: {
bitField0_ |= 0x00000080;
testInitialization_ = input.readBool();
break;
}
case 264: {
bitField0_ |= 0x00000400;
averageLoss_ = input.readInt32();
break;
}
case 272: {
if (!((mutable_bitField0_ & 0x01000000) == 0x01000000)) {
stepvalue_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x01000000;
}
stepvalue_.add(input.readInt32());
break;
}
case 274: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x01000000) == 0x01000000) && input.getBytesUntilLimit() > 0) {
stepvalue_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x01000000;
}
while (input.getBytesUntilLimit() > 0) {
stepvalue_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 285: {
bitField0_ |= 0x00100000;
clipGradients_ = input.readFloat();
break;
}
case 288: {
bitField0_ |= 0x00001000;
iterSize_ = input.readInt32();
break;
}
case 296: {
int rawValue = input.readEnum();
caffe.Caffe.SolverParameter.SnapshotFormat value = caffe.Caffe.SolverParameter.SnapshotFormat.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(37, rawValue);
} else {
bitField0_ |= 0x01000000;
snapshotFormat_ = value;
}
break;
}
case 309: {
bitField0_ |= 0x80000000;
rmsDecay_ = input.readFloat();
break;
}
case 317: {
bitField0_ |= 0x40000000;
momentum2_ = input.readFloat();
break;
}
case 322: {
bitField0_ |= 0x10000000;
type_ = input.readBytes();
break;
}
case 328: {
if (!((mutable_bitField0_ & 0x02000000) == 0x02000000)) {
plateauWinsize_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x02000000;
}
plateauWinsize_.add(input.readInt32());
break;
}
case 330: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x02000000) == 0x02000000) && input.getBytesUntilLimit() > 0) {
plateauWinsize_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x02000000;
}
while (input.getBytesUntilLimit() > 0) {
plateauWinsize_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
testNet_ = new com.google.protobuf.UnmodifiableLazyStringList(testNet_);
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
testIter_ = java.util.Collections.unmodifiableList(testIter_);
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
testNetParam_ = java.util.Collections.unmodifiableList(testNetParam_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
testState_ = java.util.Collections.unmodifiableList(testState_);
}
if (((mutable_bitField0_ & 0x01000000) == 0x01000000)) {
stepvalue_ = java.util.Collections.unmodifiableList(stepvalue_);
}
if (((mutable_bitField0_ & 0x02000000) == 0x02000000)) {
plateauWinsize_ = java.util.Collections.unmodifiableList(plateauWinsize_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_SolverParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_SolverParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.SolverParameter.class, caffe.Caffe.SolverParameter.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public SolverParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SolverParameter(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code caffe.SolverParameter.SnapshotFormat}
*/
public enum SnapshotFormat
implements com.google.protobuf.ProtocolMessageEnum {
/**
* HDF5 = 0;
*/
HDF5(0, 0),
/**
* BINARYPROTO = 1;
*/
BINARYPROTO(1, 1),
;
/**
* HDF5 = 0;
*/
public static final int HDF5_VALUE = 0;
/**
* BINARYPROTO = 1;
*/
public static final int BINARYPROTO_VALUE = 1;
public final int getNumber() { return value; }
public static SnapshotFormat valueOf(int value) {
switch (value) {
case 0: return HDF5;
case 1: return BINARYPROTO;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SnapshotFormat findValueByNumber(int number) {
return SnapshotFormat.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.SolverParameter.getDescriptor().getEnumTypes().get(0);
}
private static final SnapshotFormat[] VALUES = values();
public static SnapshotFormat valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private SnapshotFormat(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.SolverParameter.SnapshotFormat)
}
/**
* Protobuf enum {@code caffe.SolverParameter.SolverMode}
*
*
* the mode solver will use: 0 for CPU and 1 for GPU. Use GPU in default.
*
*/
public enum SolverMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CPU = 0;
*/
CPU(0, 0),
/**
* GPU = 1;
*/
GPU(1, 1),
;
/**
* CPU = 0;
*/
public static final int CPU_VALUE = 0;
/**
* GPU = 1;
*/
public static final int GPU_VALUE = 1;
public final int getNumber() { return value; }
public static SolverMode valueOf(int value) {
switch (value) {
case 0: return CPU;
case 1: return GPU;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SolverMode findValueByNumber(int number) {
return SolverMode.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.SolverParameter.getDescriptor().getEnumTypes().get(1);
}
private static final SolverMode[] VALUES = values();
public static SolverMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private SolverMode(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.SolverParameter.SolverMode)
}
/**
* Protobuf enum {@code caffe.SolverParameter.SolverType}
*
*
* DEPRECATED: old solver enum types, use string instead
*
*/
public enum SolverType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* SGD = 0;
*/
SGD(0, 0),
/**
* NESTEROV = 1;
*/
NESTEROV(1, 1),
/**
* ADAGRAD = 2;
*/
ADAGRAD(2, 2),
/**
* RMSPROP = 3;
*/
RMSPROP(3, 3),
/**
* ADADELTA = 4;
*/
ADADELTA(4, 4),
/**
* ADAM = 5;
*/
ADAM(5, 5),
;
/**
* SGD = 0;
*/
public static final int SGD_VALUE = 0;
/**
* NESTEROV = 1;
*/
public static final int NESTEROV_VALUE = 1;
/**
* ADAGRAD = 2;
*/
public static final int ADAGRAD_VALUE = 2;
/**
* RMSPROP = 3;
*/
public static final int RMSPROP_VALUE = 3;
/**
* ADADELTA = 4;
*/
public static final int ADADELTA_VALUE = 4;
/**
* ADAM = 5;
*/
public static final int ADAM_VALUE = 5;
public final int getNumber() { return value; }
public static SolverType valueOf(int value) {
switch (value) {
case 0: return SGD;
case 1: return NESTEROV;
case 2: return ADAGRAD;
case 3: return RMSPROP;
case 4: return ADADELTA;
case 5: return ADAM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SolverType findValueByNumber(int number) {
return SolverType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.SolverParameter.getDescriptor().getEnumTypes().get(2);
}
private static final SolverType[] VALUES = values();
public static SolverType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private SolverType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.SolverParameter.SolverType)
}
private int bitField0_;
private int bitField1_;
// optional string net = 24;
public static final int NET_FIELD_NUMBER = 24;
private java.lang.Object net_;
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public boolean hasNet() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public java.lang.String getNet() {
java.lang.Object ref = net_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
net_ = s;
}
return s;
}
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public com.google.protobuf.ByteString
getNetBytes() {
java.lang.Object ref = net_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
net_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional .caffe.NetParameter net_param = 25;
public static final int NET_PARAM_FIELD_NUMBER = 25;
private caffe.Caffe.NetParameter netParam_;
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public boolean hasNetParam() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public caffe.Caffe.NetParameter getNetParam() {
return netParam_;
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public caffe.Caffe.NetParameterOrBuilder getNetParamOrBuilder() {
return netParam_;
}
// optional string train_net = 1;
public static final int TRAIN_NET_FIELD_NUMBER = 1;
private java.lang.Object trainNet_;
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public boolean hasTrainNet() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public java.lang.String getTrainNet() {
java.lang.Object ref = trainNet_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
trainNet_ = s;
}
return s;
}
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public com.google.protobuf.ByteString
getTrainNetBytes() {
java.lang.Object ref = trainNet_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
trainNet_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated string test_net = 2;
public static final int TEST_NET_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList testNet_;
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public java.util.List
getTestNetList() {
return testNet_;
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public int getTestNetCount() {
return testNet_.size();
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public java.lang.String getTestNet(int index) {
return testNet_.get(index);
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public com.google.protobuf.ByteString
getTestNetBytes(int index) {
return testNet_.getByteString(index);
}
// optional .caffe.NetParameter train_net_param = 21;
public static final int TRAIN_NET_PARAM_FIELD_NUMBER = 21;
private caffe.Caffe.NetParameter trainNetParam_;
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public boolean hasTrainNetParam() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public caffe.Caffe.NetParameter getTrainNetParam() {
return trainNetParam_;
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public caffe.Caffe.NetParameterOrBuilder getTrainNetParamOrBuilder() {
return trainNetParam_;
}
// repeated .caffe.NetParameter test_net_param = 22;
public static final int TEST_NET_PARAM_FIELD_NUMBER = 22;
private java.util.List testNetParam_;
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public java.util.List getTestNetParamList() {
return testNetParam_;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public java.util.List extends caffe.Caffe.NetParameterOrBuilder>
getTestNetParamOrBuilderList() {
return testNetParam_;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public int getTestNetParamCount() {
return testNetParam_.size();
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameter getTestNetParam(int index) {
return testNetParam_.get(index);
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameterOrBuilder getTestNetParamOrBuilder(
int index) {
return testNetParam_.get(index);
}
// optional .caffe.NetState train_state = 26;
public static final int TRAIN_STATE_FIELD_NUMBER = 26;
private caffe.Caffe.NetState trainState_;
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public boolean hasTrainState() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public caffe.Caffe.NetState getTrainState() {
return trainState_;
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() {
return trainState_;
}
// repeated .caffe.NetState test_state = 27;
public static final int TEST_STATE_FIELD_NUMBER = 27;
private java.util.List testState_;
/**
* repeated .caffe.NetState test_state = 27;
*/
public java.util.List getTestStateList() {
return testState_;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public java.util.List extends caffe.Caffe.NetStateOrBuilder>
getTestStateOrBuilderList() {
return testState_;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public int getTestStateCount() {
return testState_.size();
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetState getTestState(int index) {
return testState_.get(index);
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetStateOrBuilder getTestStateOrBuilder(
int index) {
return testState_.get(index);
}
// repeated int32 test_iter = 3;
public static final int TEST_ITER_FIELD_NUMBER = 3;
private java.util.List testIter_;
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public java.util.List
getTestIterList() {
return testIter_;
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public int getTestIterCount() {
return testIter_.size();
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public int getTestIter(int index) {
return testIter_.get(index);
}
// optional int32 test_interval = 4 [default = 0];
public static final int TEST_INTERVAL_FIELD_NUMBER = 4;
private int testInterval_;
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public boolean hasTestInterval() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public int getTestInterval() {
return testInterval_;
}
// optional bool test_compute_loss = 19 [default = false];
public static final int TEST_COMPUTE_LOSS_FIELD_NUMBER = 19;
private boolean testComputeLoss_;
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public boolean hasTestComputeLoss() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public boolean getTestComputeLoss() {
return testComputeLoss_;
}
// optional bool test_initialization = 32 [default = true];
public static final int TEST_INITIALIZATION_FIELD_NUMBER = 32;
private boolean testInitialization_;
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public boolean hasTestInitialization() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public boolean getTestInitialization() {
return testInitialization_;
}
// optional float base_lr = 5;
public static final int BASE_LR_FIELD_NUMBER = 5;
private float baseLr_;
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public boolean hasBaseLr() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public float getBaseLr() {
return baseLr_;
}
// optional int32 display = 6;
public static final int DISPLAY_FIELD_NUMBER = 6;
private int display_;
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public boolean hasDisplay() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public int getDisplay() {
return display_;
}
// optional int32 average_loss = 33 [default = 1];
public static final int AVERAGE_LOSS_FIELD_NUMBER = 33;
private int averageLoss_;
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public boolean hasAverageLoss() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public int getAverageLoss() {
return averageLoss_;
}
// optional int32 max_iter = 7;
public static final int MAX_ITER_FIELD_NUMBER = 7;
private int maxIter_;
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public boolean hasMaxIter() {
return ((bitField0_ & 0x00000800) == 0x00000800);
}
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public int getMaxIter() {
return maxIter_;
}
// optional int32 iter_size = 36 [default = 1];
public static final int ITER_SIZE_FIELD_NUMBER = 36;
private int iterSize_;
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public boolean hasIterSize() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public int getIterSize() {
return iterSize_;
}
// optional string lr_policy = 8;
public static final int LR_POLICY_FIELD_NUMBER = 8;
private java.lang.Object lrPolicy_;
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public boolean hasLrPolicy() {
return ((bitField0_ & 0x00002000) == 0x00002000);
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public java.lang.String getLrPolicy() {
java.lang.Object ref = lrPolicy_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
lrPolicy_ = s;
}
return s;
}
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public com.google.protobuf.ByteString
getLrPolicyBytes() {
java.lang.Object ref = lrPolicy_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
lrPolicy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional float gamma = 9;
public static final int GAMMA_FIELD_NUMBER = 9;
private float gamma_;
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public boolean hasGamma() {
return ((bitField0_ & 0x00004000) == 0x00004000);
}
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public float getGamma() {
return gamma_;
}
// optional float power = 10;
public static final int POWER_FIELD_NUMBER = 10;
private float power_;
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public boolean hasPower() {
return ((bitField0_ & 0x00008000) == 0x00008000);
}
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public float getPower() {
return power_;
}
// optional float momentum = 11;
public static final int MOMENTUM_FIELD_NUMBER = 11;
private float momentum_;
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public boolean hasMomentum() {
return ((bitField0_ & 0x00010000) == 0x00010000);
}
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public float getMomentum() {
return momentum_;
}
// optional float weight_decay = 12;
public static final int WEIGHT_DECAY_FIELD_NUMBER = 12;
private float weightDecay_;
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public boolean hasWeightDecay() {
return ((bitField0_ & 0x00020000) == 0x00020000);
}
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public float getWeightDecay() {
return weightDecay_;
}
// optional string regularization_type = 29 [default = "L2"];
public static final int REGULARIZATION_TYPE_FIELD_NUMBER = 29;
private java.lang.Object regularizationType_;
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public boolean hasRegularizationType() {
return ((bitField0_ & 0x00040000) == 0x00040000);
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public java.lang.String getRegularizationType() {
java.lang.Object ref = regularizationType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
regularizationType_ = s;
}
return s;
}
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public com.google.protobuf.ByteString
getRegularizationTypeBytes() {
java.lang.Object ref = regularizationType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
regularizationType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional int32 stepsize = 13;
public static final int STEPSIZE_FIELD_NUMBER = 13;
private int stepsize_;
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public boolean hasStepsize() {
return ((bitField0_ & 0x00080000) == 0x00080000);
}
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public int getStepsize() {
return stepsize_;
}
// repeated int32 stepvalue = 34;
public static final int STEPVALUE_FIELD_NUMBER = 34;
private java.util.List stepvalue_;
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public java.util.List
getStepvalueList() {
return stepvalue_;
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public int getStepvalueCount() {
return stepvalue_.size();
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public int getStepvalue(int index) {
return stepvalue_.get(index);
}
// repeated int32 plateau_winsize = 41;
public static final int PLATEAU_WINSIZE_FIELD_NUMBER = 41;
private java.util.List plateauWinsize_;
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public java.util.List
getPlateauWinsizeList() {
return plateauWinsize_;
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public int getPlateauWinsizeCount() {
return plateauWinsize_.size();
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public int getPlateauWinsize(int index) {
return plateauWinsize_.get(index);
}
// optional float clip_gradients = 35 [default = -1];
public static final int CLIP_GRADIENTS_FIELD_NUMBER = 35;
private float clipGradients_;
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public boolean hasClipGradients() {
return ((bitField0_ & 0x00100000) == 0x00100000);
}
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public float getClipGradients() {
return clipGradients_;
}
// optional int32 snapshot = 14 [default = 0];
public static final int SNAPSHOT_FIELD_NUMBER = 14;
private int snapshot_;
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public boolean hasSnapshot() {
return ((bitField0_ & 0x00200000) == 0x00200000);
}
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public int getSnapshot() {
return snapshot_;
}
// optional string snapshot_prefix = 15;
public static final int SNAPSHOT_PREFIX_FIELD_NUMBER = 15;
private java.lang.Object snapshotPrefix_;
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public boolean hasSnapshotPrefix() {
return ((bitField0_ & 0x00400000) == 0x00400000);
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public java.lang.String getSnapshotPrefix() {
java.lang.Object ref = snapshotPrefix_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
snapshotPrefix_ = s;
}
return s;
}
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public com.google.protobuf.ByteString
getSnapshotPrefixBytes() {
java.lang.Object ref = snapshotPrefix_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
snapshotPrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional bool snapshot_diff = 16 [default = false];
public static final int SNAPSHOT_DIFF_FIELD_NUMBER = 16;
private boolean snapshotDiff_;
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public boolean hasSnapshotDiff() {
return ((bitField0_ & 0x00800000) == 0x00800000);
}
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public boolean getSnapshotDiff() {
return snapshotDiff_;
}
// optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
public static final int SNAPSHOT_FORMAT_FIELD_NUMBER = 37;
private caffe.Caffe.SolverParameter.SnapshotFormat snapshotFormat_;
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public boolean hasSnapshotFormat() {
return ((bitField0_ & 0x01000000) == 0x01000000);
}
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public caffe.Caffe.SolverParameter.SnapshotFormat getSnapshotFormat() {
return snapshotFormat_;
}
// optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
public static final int SOLVER_MODE_FIELD_NUMBER = 17;
private caffe.Caffe.SolverParameter.SolverMode solverMode_;
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public boolean hasSolverMode() {
return ((bitField0_ & 0x02000000) == 0x02000000);
}
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public caffe.Caffe.SolverParameter.SolverMode getSolverMode() {
return solverMode_;
}
// optional int32 device_id = 18 [default = 0];
public static final int DEVICE_ID_FIELD_NUMBER = 18;
private int deviceId_;
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public boolean hasDeviceId() {
return ((bitField0_ & 0x04000000) == 0x04000000);
}
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public int getDeviceId() {
return deviceId_;
}
// optional int64 random_seed = 20 [default = -1];
public static final int RANDOM_SEED_FIELD_NUMBER = 20;
private long randomSeed_;
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public boolean hasRandomSeed() {
return ((bitField0_ & 0x08000000) == 0x08000000);
}
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public long getRandomSeed() {
return randomSeed_;
}
// optional string type = 40 [default = "SGD"];
public static final int TYPE_FIELD_NUMBER = 40;
private java.lang.Object type_;
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public boolean hasType() {
return ((bitField0_ & 0x10000000) == 0x10000000);
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional float delta = 31 [default = 1e-08];
public static final int DELTA_FIELD_NUMBER = 31;
private float delta_;
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public boolean hasDelta() {
return ((bitField0_ & 0x20000000) == 0x20000000);
}
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public float getDelta() {
return delta_;
}
// optional float momentum2 = 39 [default = 0.999];
public static final int MOMENTUM2_FIELD_NUMBER = 39;
private float momentum2_;
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public boolean hasMomentum2() {
return ((bitField0_ & 0x40000000) == 0x40000000);
}
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public float getMomentum2() {
return momentum2_;
}
// optional float rms_decay = 38 [default = 0.99];
public static final int RMS_DECAY_FIELD_NUMBER = 38;
private float rmsDecay_;
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public boolean hasRmsDecay() {
return ((bitField0_ & 0x80000000) == 0x80000000);
}
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public float getRmsDecay() {
return rmsDecay_;
}
// optional bool debug_info = 23 [default = false];
public static final int DEBUG_INFO_FIELD_NUMBER = 23;
private boolean debugInfo_;
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public boolean hasDebugInfo() {
return ((bitField1_ & 0x00000001) == 0x00000001);
}
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public boolean getDebugInfo() {
return debugInfo_;
}
// optional bool snapshot_after_train = 28 [default = true];
public static final int SNAPSHOT_AFTER_TRAIN_FIELD_NUMBER = 28;
private boolean snapshotAfterTrain_;
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public boolean hasSnapshotAfterTrain() {
return ((bitField1_ & 0x00000002) == 0x00000002);
}
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public boolean getSnapshotAfterTrain() {
return snapshotAfterTrain_;
}
// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
public static final int SOLVER_TYPE_FIELD_NUMBER = 30;
private caffe.Caffe.SolverParameter.SolverType solverType_;
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public boolean hasSolverType() {
return ((bitField1_ & 0x00000004) == 0x00000004);
}
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public caffe.Caffe.SolverParameter.SolverType getSolverType() {
return solverType_;
}
private void initFields() {
net_ = "";
netParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
trainNet_ = "";
testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY;
trainNetParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
testNetParam_ = java.util.Collections.emptyList();
trainState_ = caffe.Caffe.NetState.getDefaultInstance();
testState_ = java.util.Collections.emptyList();
testIter_ = java.util.Collections.emptyList();
testInterval_ = 0;
testComputeLoss_ = false;
testInitialization_ = true;
baseLr_ = 0F;
display_ = 0;
averageLoss_ = 1;
maxIter_ = 0;
iterSize_ = 1;
lrPolicy_ = "";
gamma_ = 0F;
power_ = 0F;
momentum_ = 0F;
weightDecay_ = 0F;
regularizationType_ = "L2";
stepsize_ = 0;
stepvalue_ = java.util.Collections.emptyList();
plateauWinsize_ = java.util.Collections.emptyList();
clipGradients_ = -1F;
snapshot_ = 0;
snapshotPrefix_ = "";
snapshotDiff_ = false;
snapshotFormat_ = caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO;
solverMode_ = caffe.Caffe.SolverParameter.SolverMode.GPU;
deviceId_ = 0;
randomSeed_ = -1L;
type_ = "SGD";
delta_ = 1e-08F;
momentum2_ = 0.999F;
rmsDecay_ = 0.99F;
debugInfo_ = false;
snapshotAfterTrain_ = true;
solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(1, getTrainNetBytes());
}
for (int i = 0; i < testNet_.size(); i++) {
output.writeBytes(2, testNet_.getByteString(i));
}
for (int i = 0; i < testIter_.size(); i++) {
output.writeInt32(3, testIter_.get(i));
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeInt32(4, testInterval_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeFloat(5, baseLr_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeInt32(6, display_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
output.writeInt32(7, maxIter_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
output.writeBytes(8, getLrPolicyBytes());
}
if (((bitField0_ & 0x00004000) == 0x00004000)) {
output.writeFloat(9, gamma_);
}
if (((bitField0_ & 0x00008000) == 0x00008000)) {
output.writeFloat(10, power_);
}
if (((bitField0_ & 0x00010000) == 0x00010000)) {
output.writeFloat(11, momentum_);
}
if (((bitField0_ & 0x00020000) == 0x00020000)) {
output.writeFloat(12, weightDecay_);
}
if (((bitField0_ & 0x00080000) == 0x00080000)) {
output.writeInt32(13, stepsize_);
}
if (((bitField0_ & 0x00200000) == 0x00200000)) {
output.writeInt32(14, snapshot_);
}
if (((bitField0_ & 0x00400000) == 0x00400000)) {
output.writeBytes(15, getSnapshotPrefixBytes());
}
if (((bitField0_ & 0x00800000) == 0x00800000)) {
output.writeBool(16, snapshotDiff_);
}
if (((bitField0_ & 0x02000000) == 0x02000000)) {
output.writeEnum(17, solverMode_.getNumber());
}
if (((bitField0_ & 0x04000000) == 0x04000000)) {
output.writeInt32(18, deviceId_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeBool(19, testComputeLoss_);
}
if (((bitField0_ & 0x08000000) == 0x08000000)) {
output.writeInt64(20, randomSeed_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(21, trainNetParam_);
}
for (int i = 0; i < testNetParam_.size(); i++) {
output.writeMessage(22, testNetParam_.get(i));
}
if (((bitField1_ & 0x00000001) == 0x00000001)) {
output.writeBool(23, debugInfo_);
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(24, getNetBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(25, netParam_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(26, trainState_);
}
for (int i = 0; i < testState_.size(); i++) {
output.writeMessage(27, testState_.get(i));
}
if (((bitField1_ & 0x00000002) == 0x00000002)) {
output.writeBool(28, snapshotAfterTrain_);
}
if (((bitField0_ & 0x00040000) == 0x00040000)) {
output.writeBytes(29, getRegularizationTypeBytes());
}
if (((bitField1_ & 0x00000004) == 0x00000004)) {
output.writeEnum(30, solverType_.getNumber());
}
if (((bitField0_ & 0x20000000) == 0x20000000)) {
output.writeFloat(31, delta_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeBool(32, testInitialization_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
output.writeInt32(33, averageLoss_);
}
for (int i = 0; i < stepvalue_.size(); i++) {
output.writeInt32(34, stepvalue_.get(i));
}
if (((bitField0_ & 0x00100000) == 0x00100000)) {
output.writeFloat(35, clipGradients_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
output.writeInt32(36, iterSize_);
}
if (((bitField0_ & 0x01000000) == 0x01000000)) {
output.writeEnum(37, snapshotFormat_.getNumber());
}
if (((bitField0_ & 0x80000000) == 0x80000000)) {
output.writeFloat(38, rmsDecay_);
}
if (((bitField0_ & 0x40000000) == 0x40000000)) {
output.writeFloat(39, momentum2_);
}
if (((bitField0_ & 0x10000000) == 0x10000000)) {
output.writeBytes(40, getTypeBytes());
}
for (int i = 0; i < plateauWinsize_.size(); i++) {
output.writeInt32(41, plateauWinsize_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getTrainNetBytes());
}
{
int dataSize = 0;
for (int i = 0; i < testNet_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(testNet_.getByteString(i));
}
size += dataSize;
size += 1 * getTestNetList().size();
}
{
int dataSize = 0;
for (int i = 0; i < testIter_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(testIter_.get(i));
}
size += dataSize;
size += 1 * getTestIterList().size();
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, testInterval_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, baseLr_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, display_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, maxIter_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, getLrPolicyBytes());
}
if (((bitField0_ & 0x00004000) == 0x00004000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(9, gamma_);
}
if (((bitField0_ & 0x00008000) == 0x00008000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(10, power_);
}
if (((bitField0_ & 0x00010000) == 0x00010000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(11, momentum_);
}
if (((bitField0_ & 0x00020000) == 0x00020000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(12, weightDecay_);
}
if (((bitField0_ & 0x00080000) == 0x00080000)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(13, stepsize_);
}
if (((bitField0_ & 0x00200000) == 0x00200000)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(14, snapshot_);
}
if (((bitField0_ & 0x00400000) == 0x00400000)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(15, getSnapshotPrefixBytes());
}
if (((bitField0_ & 0x00800000) == 0x00800000)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(16, snapshotDiff_);
}
if (((bitField0_ & 0x02000000) == 0x02000000)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(17, solverMode_.getNumber());
}
if (((bitField0_ & 0x04000000) == 0x04000000)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(18, deviceId_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(19, testComputeLoss_);
}
if (((bitField0_ & 0x08000000) == 0x08000000)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(20, randomSeed_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, trainNetParam_);
}
for (int i = 0; i < testNetParam_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, testNetParam_.get(i));
}
if (((bitField1_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(23, debugInfo_);
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(24, getNetBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(25, netParam_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(26, trainState_);
}
for (int i = 0; i < testState_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, testState_.get(i));
}
if (((bitField1_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(28, snapshotAfterTrain_);
}
if (((bitField0_ & 0x00040000) == 0x00040000)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(29, getRegularizationTypeBytes());
}
if (((bitField1_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(30, solverType_.getNumber());
}
if (((bitField0_ & 0x20000000) == 0x20000000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(31, delta_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(32, testInitialization_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(33, averageLoss_);
}
{
int dataSize = 0;
for (int i = 0; i < stepvalue_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(stepvalue_.get(i));
}
size += dataSize;
size += 2 * getStepvalueList().size();
}
if (((bitField0_ & 0x00100000) == 0x00100000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(35, clipGradients_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(36, iterSize_);
}
if (((bitField0_ & 0x01000000) == 0x01000000)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(37, snapshotFormat_.getNumber());
}
if (((bitField0_ & 0x80000000) == 0x80000000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(38, rmsDecay_);
}
if (((bitField0_ & 0x40000000) == 0x40000000)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(39, momentum2_);
}
if (((bitField0_ & 0x10000000) == 0x10000000)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(40, getTypeBytes());
}
{
int dataSize = 0;
for (int i = 0; i < plateauWinsize_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(plateauWinsize_.get(i));
}
size += dataSize;
size += 2 * getPlateauWinsizeList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.SolverParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.SolverParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.SolverParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.SolverParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.SolverParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.SolverParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.SolverParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.SolverParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.SolverParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.SolverParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.SolverParameter prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.SolverParameter}
*
*
* NOTE
* Update the next available ID when you add a new SolverParameter field.
*
* SolverParameter next available ID: 42 (last added: plateau_winsize)
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.SolverParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_SolverParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_SolverParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.SolverParameter.class, caffe.Caffe.SolverParameter.Builder.class);
}
// Construct using caffe.Caffe.SolverParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getNetParamFieldBuilder();
getTrainNetParamFieldBuilder();
getTestNetParamFieldBuilder();
getTrainStateFieldBuilder();
getTestStateFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
net_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (netParamBuilder_ == null) {
netParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
} else {
netParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
trainNet_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
if (trainNetParamBuilder_ == null) {
trainNetParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
} else {
trainNetParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (testNetParamBuilder_ == null) {
testNetParam_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
} else {
testNetParamBuilder_.clear();
}
if (trainStateBuilder_ == null) {
trainState_ = caffe.Caffe.NetState.getDefaultInstance();
} else {
trainStateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
if (testStateBuilder_ == null) {
testState_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
} else {
testStateBuilder_.clear();
}
testIter_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
testInterval_ = 0;
bitField0_ = (bitField0_ & ~0x00000200);
testComputeLoss_ = false;
bitField0_ = (bitField0_ & ~0x00000400);
testInitialization_ = true;
bitField0_ = (bitField0_ & ~0x00000800);
baseLr_ = 0F;
bitField0_ = (bitField0_ & ~0x00001000);
display_ = 0;
bitField0_ = (bitField0_ & ~0x00002000);
averageLoss_ = 1;
bitField0_ = (bitField0_ & ~0x00004000);
maxIter_ = 0;
bitField0_ = (bitField0_ & ~0x00008000);
iterSize_ = 1;
bitField0_ = (bitField0_ & ~0x00010000);
lrPolicy_ = "";
bitField0_ = (bitField0_ & ~0x00020000);
gamma_ = 0F;
bitField0_ = (bitField0_ & ~0x00040000);
power_ = 0F;
bitField0_ = (bitField0_ & ~0x00080000);
momentum_ = 0F;
bitField0_ = (bitField0_ & ~0x00100000);
weightDecay_ = 0F;
bitField0_ = (bitField0_ & ~0x00200000);
regularizationType_ = "L2";
bitField0_ = (bitField0_ & ~0x00400000);
stepsize_ = 0;
bitField0_ = (bitField0_ & ~0x00800000);
stepvalue_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x01000000);
plateauWinsize_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x02000000);
clipGradients_ = -1F;
bitField0_ = (bitField0_ & ~0x04000000);
snapshot_ = 0;
bitField0_ = (bitField0_ & ~0x08000000);
snapshotPrefix_ = "";
bitField0_ = (bitField0_ & ~0x10000000);
snapshotDiff_ = false;
bitField0_ = (bitField0_ & ~0x20000000);
snapshotFormat_ = caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO;
bitField0_ = (bitField0_ & ~0x40000000);
solverMode_ = caffe.Caffe.SolverParameter.SolverMode.GPU;
bitField0_ = (bitField0_ & ~0x80000000);
deviceId_ = 0;
bitField1_ = (bitField1_ & ~0x00000001);
randomSeed_ = -1L;
bitField1_ = (bitField1_ & ~0x00000002);
type_ = "SGD";
bitField1_ = (bitField1_ & ~0x00000004);
delta_ = 1e-08F;
bitField1_ = (bitField1_ & ~0x00000008);
momentum2_ = 0.999F;
bitField1_ = (bitField1_ & ~0x00000010);
rmsDecay_ = 0.99F;
bitField1_ = (bitField1_ & ~0x00000020);
debugInfo_ = false;
bitField1_ = (bitField1_ & ~0x00000040);
snapshotAfterTrain_ = true;
bitField1_ = (bitField1_ & ~0x00000080);
solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
bitField1_ = (bitField1_ & ~0x00000100);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_SolverParameter_descriptor;
}
public caffe.Caffe.SolverParameter getDefaultInstanceForType() {
return caffe.Caffe.SolverParameter.getDefaultInstance();
}
public caffe.Caffe.SolverParameter build() {
caffe.Caffe.SolverParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.SolverParameter buildPartial() {
caffe.Caffe.SolverParameter result = new caffe.Caffe.SolverParameter(this);
int from_bitField0_ = bitField0_;
int from_bitField1_ = bitField1_;
int to_bitField0_ = 0;
int to_bitField1_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.net_ = net_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (netParamBuilder_ == null) {
result.netParam_ = netParam_;
} else {
result.netParam_ = netParamBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.trainNet_ = trainNet_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
testNet_ = new com.google.protobuf.UnmodifiableLazyStringList(
testNet_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.testNet_ = testNet_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
if (trainNetParamBuilder_ == null) {
result.trainNetParam_ = trainNetParam_;
} else {
result.trainNetParam_ = trainNetParamBuilder_.build();
}
if (testNetParamBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020)) {
testNetParam_ = java.util.Collections.unmodifiableList(testNetParam_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.testNetParam_ = testNetParam_;
} else {
result.testNetParam_ = testNetParamBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000010;
}
if (trainStateBuilder_ == null) {
result.trainState_ = trainState_;
} else {
result.trainState_ = trainStateBuilder_.build();
}
if (testStateBuilder_ == null) {
if (((bitField0_ & 0x00000080) == 0x00000080)) {
testState_ = java.util.Collections.unmodifiableList(testState_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.testState_ = testState_;
} else {
result.testState_ = testStateBuilder_.build();
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
testIter_ = java.util.Collections.unmodifiableList(testIter_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.testIter_ = testIter_;
if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
to_bitField0_ |= 0x00000020;
}
result.testInterval_ = testInterval_;
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000040;
}
result.testComputeLoss_ = testComputeLoss_;
if (((from_bitField0_ & 0x00000800) == 0x00000800)) {
to_bitField0_ |= 0x00000080;
}
result.testInitialization_ = testInitialization_;
if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
to_bitField0_ |= 0x00000100;
}
result.baseLr_ = baseLr_;
if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
to_bitField0_ |= 0x00000200;
}
result.display_ = display_;
if (((from_bitField0_ & 0x00004000) == 0x00004000)) {
to_bitField0_ |= 0x00000400;
}
result.averageLoss_ = averageLoss_;
if (((from_bitField0_ & 0x00008000) == 0x00008000)) {
to_bitField0_ |= 0x00000800;
}
result.maxIter_ = maxIter_;
if (((from_bitField0_ & 0x00010000) == 0x00010000)) {
to_bitField0_ |= 0x00001000;
}
result.iterSize_ = iterSize_;
if (((from_bitField0_ & 0x00020000) == 0x00020000)) {
to_bitField0_ |= 0x00002000;
}
result.lrPolicy_ = lrPolicy_;
if (((from_bitField0_ & 0x00040000) == 0x00040000)) {
to_bitField0_ |= 0x00004000;
}
result.gamma_ = gamma_;
if (((from_bitField0_ & 0x00080000) == 0x00080000)) {
to_bitField0_ |= 0x00008000;
}
result.power_ = power_;
if (((from_bitField0_ & 0x00100000) == 0x00100000)) {
to_bitField0_ |= 0x00010000;
}
result.momentum_ = momentum_;
if (((from_bitField0_ & 0x00200000) == 0x00200000)) {
to_bitField0_ |= 0x00020000;
}
result.weightDecay_ = weightDecay_;
if (((from_bitField0_ & 0x00400000) == 0x00400000)) {
to_bitField0_ |= 0x00040000;
}
result.regularizationType_ = regularizationType_;
if (((from_bitField0_ & 0x00800000) == 0x00800000)) {
to_bitField0_ |= 0x00080000;
}
result.stepsize_ = stepsize_;
if (((bitField0_ & 0x01000000) == 0x01000000)) {
stepvalue_ = java.util.Collections.unmodifiableList(stepvalue_);
bitField0_ = (bitField0_ & ~0x01000000);
}
result.stepvalue_ = stepvalue_;
if (((bitField0_ & 0x02000000) == 0x02000000)) {
plateauWinsize_ = java.util.Collections.unmodifiableList(plateauWinsize_);
bitField0_ = (bitField0_ & ~0x02000000);
}
result.plateauWinsize_ = plateauWinsize_;
if (((from_bitField0_ & 0x04000000) == 0x04000000)) {
to_bitField0_ |= 0x00100000;
}
result.clipGradients_ = clipGradients_;
if (((from_bitField0_ & 0x08000000) == 0x08000000)) {
to_bitField0_ |= 0x00200000;
}
result.snapshot_ = snapshot_;
if (((from_bitField0_ & 0x10000000) == 0x10000000)) {
to_bitField0_ |= 0x00400000;
}
result.snapshotPrefix_ = snapshotPrefix_;
if (((from_bitField0_ & 0x20000000) == 0x20000000)) {
to_bitField0_ |= 0x00800000;
}
result.snapshotDiff_ = snapshotDiff_;
if (((from_bitField0_ & 0x40000000) == 0x40000000)) {
to_bitField0_ |= 0x01000000;
}
result.snapshotFormat_ = snapshotFormat_;
if (((from_bitField0_ & 0x80000000) == 0x80000000)) {
to_bitField0_ |= 0x02000000;
}
result.solverMode_ = solverMode_;
if (((from_bitField1_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x04000000;
}
result.deviceId_ = deviceId_;
if (((from_bitField1_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x08000000;
}
result.randomSeed_ = randomSeed_;
if (((from_bitField1_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x10000000;
}
result.type_ = type_;
if (((from_bitField1_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x20000000;
}
result.delta_ = delta_;
if (((from_bitField1_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x40000000;
}
result.momentum2_ = momentum2_;
if (((from_bitField1_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x80000000;
}
result.rmsDecay_ = rmsDecay_;
if (((from_bitField1_ & 0x00000040) == 0x00000040)) {
to_bitField1_ |= 0x00000001;
}
result.debugInfo_ = debugInfo_;
if (((from_bitField1_ & 0x00000080) == 0x00000080)) {
to_bitField1_ |= 0x00000002;
}
result.snapshotAfterTrain_ = snapshotAfterTrain_;
if (((from_bitField1_ & 0x00000100) == 0x00000100)) {
to_bitField1_ |= 0x00000004;
}
result.solverType_ = solverType_;
result.bitField0_ = to_bitField0_;
result.bitField1_ = to_bitField1_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.SolverParameter) {
return mergeFrom((caffe.Caffe.SolverParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.SolverParameter other) {
if (other == caffe.Caffe.SolverParameter.getDefaultInstance()) return this;
if (other.hasNet()) {
bitField0_ |= 0x00000001;
net_ = other.net_;
onChanged();
}
if (other.hasNetParam()) {
mergeNetParam(other.getNetParam());
}
if (other.hasTrainNet()) {
bitField0_ |= 0x00000004;
trainNet_ = other.trainNet_;
onChanged();
}
if (!other.testNet_.isEmpty()) {
if (testNet_.isEmpty()) {
testNet_ = other.testNet_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureTestNetIsMutable();
testNet_.addAll(other.testNet_);
}
onChanged();
}
if (other.hasTrainNetParam()) {
mergeTrainNetParam(other.getTrainNetParam());
}
if (testNetParamBuilder_ == null) {
if (!other.testNetParam_.isEmpty()) {
if (testNetParam_.isEmpty()) {
testNetParam_ = other.testNetParam_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureTestNetParamIsMutable();
testNetParam_.addAll(other.testNetParam_);
}
onChanged();
}
} else {
if (!other.testNetParam_.isEmpty()) {
if (testNetParamBuilder_.isEmpty()) {
testNetParamBuilder_.dispose();
testNetParamBuilder_ = null;
testNetParam_ = other.testNetParam_;
bitField0_ = (bitField0_ & ~0x00000020);
testNetParamBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getTestNetParamFieldBuilder() : null;
} else {
testNetParamBuilder_.addAllMessages(other.testNetParam_);
}
}
}
if (other.hasTrainState()) {
mergeTrainState(other.getTrainState());
}
if (testStateBuilder_ == null) {
if (!other.testState_.isEmpty()) {
if (testState_.isEmpty()) {
testState_ = other.testState_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureTestStateIsMutable();
testState_.addAll(other.testState_);
}
onChanged();
}
} else {
if (!other.testState_.isEmpty()) {
if (testStateBuilder_.isEmpty()) {
testStateBuilder_.dispose();
testStateBuilder_ = null;
testState_ = other.testState_;
bitField0_ = (bitField0_ & ~0x00000080);
testStateBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getTestStateFieldBuilder() : null;
} else {
testStateBuilder_.addAllMessages(other.testState_);
}
}
}
if (!other.testIter_.isEmpty()) {
if (testIter_.isEmpty()) {
testIter_ = other.testIter_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureTestIterIsMutable();
testIter_.addAll(other.testIter_);
}
onChanged();
}
if (other.hasTestInterval()) {
setTestInterval(other.getTestInterval());
}
if (other.hasTestComputeLoss()) {
setTestComputeLoss(other.getTestComputeLoss());
}
if (other.hasTestInitialization()) {
setTestInitialization(other.getTestInitialization());
}
if (other.hasBaseLr()) {
setBaseLr(other.getBaseLr());
}
if (other.hasDisplay()) {
setDisplay(other.getDisplay());
}
if (other.hasAverageLoss()) {
setAverageLoss(other.getAverageLoss());
}
if (other.hasMaxIter()) {
setMaxIter(other.getMaxIter());
}
if (other.hasIterSize()) {
setIterSize(other.getIterSize());
}
if (other.hasLrPolicy()) {
bitField0_ |= 0x00020000;
lrPolicy_ = other.lrPolicy_;
onChanged();
}
if (other.hasGamma()) {
setGamma(other.getGamma());
}
if (other.hasPower()) {
setPower(other.getPower());
}
if (other.hasMomentum()) {
setMomentum(other.getMomentum());
}
if (other.hasWeightDecay()) {
setWeightDecay(other.getWeightDecay());
}
if (other.hasRegularizationType()) {
bitField0_ |= 0x00400000;
regularizationType_ = other.regularizationType_;
onChanged();
}
if (other.hasStepsize()) {
setStepsize(other.getStepsize());
}
if (!other.stepvalue_.isEmpty()) {
if (stepvalue_.isEmpty()) {
stepvalue_ = other.stepvalue_;
bitField0_ = (bitField0_ & ~0x01000000);
} else {
ensureStepvalueIsMutable();
stepvalue_.addAll(other.stepvalue_);
}
onChanged();
}
if (!other.plateauWinsize_.isEmpty()) {
if (plateauWinsize_.isEmpty()) {
plateauWinsize_ = other.plateauWinsize_;
bitField0_ = (bitField0_ & ~0x02000000);
} else {
ensurePlateauWinsizeIsMutable();
plateauWinsize_.addAll(other.plateauWinsize_);
}
onChanged();
}
if (other.hasClipGradients()) {
setClipGradients(other.getClipGradients());
}
if (other.hasSnapshot()) {
setSnapshot(other.getSnapshot());
}
if (other.hasSnapshotPrefix()) {
bitField0_ |= 0x10000000;
snapshotPrefix_ = other.snapshotPrefix_;
onChanged();
}
if (other.hasSnapshotDiff()) {
setSnapshotDiff(other.getSnapshotDiff());
}
if (other.hasSnapshotFormat()) {
setSnapshotFormat(other.getSnapshotFormat());
}
if (other.hasSolverMode()) {
setSolverMode(other.getSolverMode());
}
if (other.hasDeviceId()) {
setDeviceId(other.getDeviceId());
}
if (other.hasRandomSeed()) {
setRandomSeed(other.getRandomSeed());
}
if (other.hasType()) {
bitField1_ |= 0x00000004;
type_ = other.type_;
onChanged();
}
if (other.hasDelta()) {
setDelta(other.getDelta());
}
if (other.hasMomentum2()) {
setMomentum2(other.getMomentum2());
}
if (other.hasRmsDecay()) {
setRmsDecay(other.getRmsDecay());
}
if (other.hasDebugInfo()) {
setDebugInfo(other.getDebugInfo());
}
if (other.hasSnapshotAfterTrain()) {
setSnapshotAfterTrain(other.getSnapshotAfterTrain());
}
if (other.hasSolverType()) {
setSolverType(other.getSolverType());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.SolverParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.SolverParameter) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int bitField1_;
// optional string net = 24;
private java.lang.Object net_ = "";
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public boolean hasNet() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public java.lang.String getNet() {
java.lang.Object ref = net_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
net_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public com.google.protobuf.ByteString
getNetBytes() {
java.lang.Object ref = net_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
net_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public Builder setNet(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
net_ = value;
onChanged();
return this;
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public Builder clearNet() {
bitField0_ = (bitField0_ & ~0x00000001);
net_ = getDefaultInstance().getNet();
onChanged();
return this;
}
/**
* optional string net = 24;
*
*
* Proto filename for the train net, possibly combined with one or more
* test nets.
*
*/
public Builder setNetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
net_ = value;
onChanged();
return this;
}
// optional .caffe.NetParameter net_param = 25;
private caffe.Caffe.NetParameter netParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder> netParamBuilder_;
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public boolean hasNetParam() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public caffe.Caffe.NetParameter getNetParam() {
if (netParamBuilder_ == null) {
return netParam_;
} else {
return netParamBuilder_.getMessage();
}
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public Builder setNetParam(caffe.Caffe.NetParameter value) {
if (netParamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
netParam_ = value;
onChanged();
} else {
netParamBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public Builder setNetParam(
caffe.Caffe.NetParameter.Builder builderForValue) {
if (netParamBuilder_ == null) {
netParam_ = builderForValue.build();
onChanged();
} else {
netParamBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public Builder mergeNetParam(caffe.Caffe.NetParameter value) {
if (netParamBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
netParam_ != caffe.Caffe.NetParameter.getDefaultInstance()) {
netParam_ =
caffe.Caffe.NetParameter.newBuilder(netParam_).mergeFrom(value).buildPartial();
} else {
netParam_ = value;
}
onChanged();
} else {
netParamBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public Builder clearNetParam() {
if (netParamBuilder_ == null) {
netParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
onChanged();
} else {
netParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public caffe.Caffe.NetParameter.Builder getNetParamBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getNetParamFieldBuilder().getBuilder();
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
public caffe.Caffe.NetParameterOrBuilder getNetParamOrBuilder() {
if (netParamBuilder_ != null) {
return netParamBuilder_.getMessageOrBuilder();
} else {
return netParam_;
}
}
/**
* optional .caffe.NetParameter net_param = 25;
*
*
* Inline train net param, possibly combined with one or more test nets.
*
*/
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>
getNetParamFieldBuilder() {
if (netParamBuilder_ == null) {
netParamBuilder_ = new com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>(
netParam_,
getParentForChildren(),
isClean());
netParam_ = null;
}
return netParamBuilder_;
}
// optional string train_net = 1;
private java.lang.Object trainNet_ = "";
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public boolean hasTrainNet() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public java.lang.String getTrainNet() {
java.lang.Object ref = trainNet_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
trainNet_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public com.google.protobuf.ByteString
getTrainNetBytes() {
java.lang.Object ref = trainNet_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
trainNet_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public Builder setTrainNet(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
trainNet_ = value;
onChanged();
return this;
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public Builder clearTrainNet() {
bitField0_ = (bitField0_ & ~0x00000004);
trainNet_ = getDefaultInstance().getTrainNet();
onChanged();
return this;
}
/**
* optional string train_net = 1;
*
*
* Proto filename for the train net.
*
*/
public Builder setTrainNetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
trainNet_ = value;
onChanged();
return this;
}
// repeated string test_net = 2;
private com.google.protobuf.LazyStringList testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTestNetIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
testNet_ = new com.google.protobuf.LazyStringArrayList(testNet_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public java.util.List
getTestNetList() {
return java.util.Collections.unmodifiableList(testNet_);
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public int getTestNetCount() {
return testNet_.size();
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public java.lang.String getTestNet(int index) {
return testNet_.get(index);
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public com.google.protobuf.ByteString
getTestNetBytes(int index) {
return testNet_.getByteString(index);
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public Builder setTestNet(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetIsMutable();
testNet_.set(index, value);
onChanged();
return this;
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public Builder addTestNet(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetIsMutable();
testNet_.add(value);
onChanged();
return this;
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public Builder addAllTestNet(
java.lang.Iterable values) {
ensureTestNetIsMutable();
super.addAll(values, testNet_);
onChanged();
return this;
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public Builder clearTestNet() {
testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* repeated string test_net = 2;
*
*
* Proto filenames for the test nets.
*
*/
public Builder addTestNetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetIsMutable();
testNet_.add(value);
onChanged();
return this;
}
// optional .caffe.NetParameter train_net_param = 21;
private caffe.Caffe.NetParameter trainNetParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder> trainNetParamBuilder_;
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public boolean hasTrainNetParam() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public caffe.Caffe.NetParameter getTrainNetParam() {
if (trainNetParamBuilder_ == null) {
return trainNetParam_;
} else {
return trainNetParamBuilder_.getMessage();
}
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public Builder setTrainNetParam(caffe.Caffe.NetParameter value) {
if (trainNetParamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trainNetParam_ = value;
onChanged();
} else {
trainNetParamBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public Builder setTrainNetParam(
caffe.Caffe.NetParameter.Builder builderForValue) {
if (trainNetParamBuilder_ == null) {
trainNetParam_ = builderForValue.build();
onChanged();
} else {
trainNetParamBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public Builder mergeTrainNetParam(caffe.Caffe.NetParameter value) {
if (trainNetParamBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
trainNetParam_ != caffe.Caffe.NetParameter.getDefaultInstance()) {
trainNetParam_ =
caffe.Caffe.NetParameter.newBuilder(trainNetParam_).mergeFrom(value).buildPartial();
} else {
trainNetParam_ = value;
}
onChanged();
} else {
trainNetParamBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public Builder clearTrainNetParam() {
if (trainNetParamBuilder_ == null) {
trainNetParam_ = caffe.Caffe.NetParameter.getDefaultInstance();
onChanged();
} else {
trainNetParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public caffe.Caffe.NetParameter.Builder getTrainNetParamBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getTrainNetParamFieldBuilder().getBuilder();
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
public caffe.Caffe.NetParameterOrBuilder getTrainNetParamOrBuilder() {
if (trainNetParamBuilder_ != null) {
return trainNetParamBuilder_.getMessageOrBuilder();
} else {
return trainNetParam_;
}
}
/**
* optional .caffe.NetParameter train_net_param = 21;
*
*
* Inline train net params.
*
*/
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>
getTrainNetParamFieldBuilder() {
if (trainNetParamBuilder_ == null) {
trainNetParamBuilder_ = new com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>(
trainNetParam_,
getParentForChildren(),
isClean());
trainNetParam_ = null;
}
return trainNetParamBuilder_;
}
// repeated .caffe.NetParameter test_net_param = 22;
private java.util.List testNetParam_ =
java.util.Collections.emptyList();
private void ensureTestNetParamIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
testNetParam_ = new java.util.ArrayList(testNetParam_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder> testNetParamBuilder_;
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public java.util.List getTestNetParamList() {
if (testNetParamBuilder_ == null) {
return java.util.Collections.unmodifiableList(testNetParam_);
} else {
return testNetParamBuilder_.getMessageList();
}
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public int getTestNetParamCount() {
if (testNetParamBuilder_ == null) {
return testNetParam_.size();
} else {
return testNetParamBuilder_.getCount();
}
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameter getTestNetParam(int index) {
if (testNetParamBuilder_ == null) {
return testNetParam_.get(index);
} else {
return testNetParamBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder setTestNetParam(
int index, caffe.Caffe.NetParameter value) {
if (testNetParamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetParamIsMutable();
testNetParam_.set(index, value);
onChanged();
} else {
testNetParamBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder setTestNetParam(
int index, caffe.Caffe.NetParameter.Builder builderForValue) {
if (testNetParamBuilder_ == null) {
ensureTestNetParamIsMutable();
testNetParam_.set(index, builderForValue.build());
onChanged();
} else {
testNetParamBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder addTestNetParam(caffe.Caffe.NetParameter value) {
if (testNetParamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetParamIsMutable();
testNetParam_.add(value);
onChanged();
} else {
testNetParamBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder addTestNetParam(
int index, caffe.Caffe.NetParameter value) {
if (testNetParamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestNetParamIsMutable();
testNetParam_.add(index, value);
onChanged();
} else {
testNetParamBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder addTestNetParam(
caffe.Caffe.NetParameter.Builder builderForValue) {
if (testNetParamBuilder_ == null) {
ensureTestNetParamIsMutable();
testNetParam_.add(builderForValue.build());
onChanged();
} else {
testNetParamBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder addTestNetParam(
int index, caffe.Caffe.NetParameter.Builder builderForValue) {
if (testNetParamBuilder_ == null) {
ensureTestNetParamIsMutable();
testNetParam_.add(index, builderForValue.build());
onChanged();
} else {
testNetParamBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder addAllTestNetParam(
java.lang.Iterable extends caffe.Caffe.NetParameter> values) {
if (testNetParamBuilder_ == null) {
ensureTestNetParamIsMutable();
super.addAll(values, testNetParam_);
onChanged();
} else {
testNetParamBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder clearTestNetParam() {
if (testNetParamBuilder_ == null) {
testNetParam_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
testNetParamBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public Builder removeTestNetParam(int index) {
if (testNetParamBuilder_ == null) {
ensureTestNetParamIsMutable();
testNetParam_.remove(index);
onChanged();
} else {
testNetParamBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameter.Builder getTestNetParamBuilder(
int index) {
return getTestNetParamFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameterOrBuilder getTestNetParamOrBuilder(
int index) {
if (testNetParamBuilder_ == null) {
return testNetParam_.get(index); } else {
return testNetParamBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public java.util.List extends caffe.Caffe.NetParameterOrBuilder>
getTestNetParamOrBuilderList() {
if (testNetParamBuilder_ != null) {
return testNetParamBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(testNetParam_);
}
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameter.Builder addTestNetParamBuilder() {
return getTestNetParamFieldBuilder().addBuilder(
caffe.Caffe.NetParameter.getDefaultInstance());
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public caffe.Caffe.NetParameter.Builder addTestNetParamBuilder(
int index) {
return getTestNetParamFieldBuilder().addBuilder(
index, caffe.Caffe.NetParameter.getDefaultInstance());
}
/**
* repeated .caffe.NetParameter test_net_param = 22;
*
*
* Inline test net params.
*
*/
public java.util.List
getTestNetParamBuilderList() {
return getTestNetParamFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>
getTestNetParamFieldBuilder() {
if (testNetParamBuilder_ == null) {
testNetParamBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetParameter, caffe.Caffe.NetParameter.Builder, caffe.Caffe.NetParameterOrBuilder>(
testNetParam_,
((bitField0_ & 0x00000020) == 0x00000020),
getParentForChildren(),
isClean());
testNetParam_ = null;
}
return testNetParamBuilder_;
}
// optional .caffe.NetState train_state = 26;
private caffe.Caffe.NetState trainState_ = caffe.Caffe.NetState.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> trainStateBuilder_;
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public boolean hasTrainState() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public caffe.Caffe.NetState getTrainState() {
if (trainStateBuilder_ == null) {
return trainState_;
} else {
return trainStateBuilder_.getMessage();
}
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public Builder setTrainState(caffe.Caffe.NetState value) {
if (trainStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trainState_ = value;
onChanged();
} else {
trainStateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
return this;
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public Builder setTrainState(
caffe.Caffe.NetState.Builder builderForValue) {
if (trainStateBuilder_ == null) {
trainState_ = builderForValue.build();
onChanged();
} else {
trainStateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
return this;
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public Builder mergeTrainState(caffe.Caffe.NetState value) {
if (trainStateBuilder_ == null) {
if (((bitField0_ & 0x00000040) == 0x00000040) &&
trainState_ != caffe.Caffe.NetState.getDefaultInstance()) {
trainState_ =
caffe.Caffe.NetState.newBuilder(trainState_).mergeFrom(value).buildPartial();
} else {
trainState_ = value;
}
onChanged();
} else {
trainStateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
return this;
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public Builder clearTrainState() {
if (trainStateBuilder_ == null) {
trainState_ = caffe.Caffe.NetState.getDefaultInstance();
onChanged();
} else {
trainStateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public caffe.Caffe.NetState.Builder getTrainStateBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getTrainStateFieldBuilder().getBuilder();
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() {
if (trainStateBuilder_ != null) {
return trainStateBuilder_.getMessageOrBuilder();
} else {
return trainState_;
}
}
/**
* optional .caffe.NetState train_state = 26;
*
*
* The states for the train/test nets. Must be unspecified or
* specified once per net.
*
* By default, all states will have solver = true;
* train_state will have phase = TRAIN,
* and all test_state's will have phase = TEST.
* Other defaults are set according to the NetState defaults.
*
*/
private com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>
getTrainStateFieldBuilder() {
if (trainStateBuilder_ == null) {
trainStateBuilder_ = new com.google.protobuf.SingleFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>(
trainState_,
getParentForChildren(),
isClean());
trainState_ = null;
}
return trainStateBuilder_;
}
// repeated .caffe.NetState test_state = 27;
private java.util.List testState_ =
java.util.Collections.emptyList();
private void ensureTestStateIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
testState_ = new java.util.ArrayList(testState_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> testStateBuilder_;
/**
* repeated .caffe.NetState test_state = 27;
*/
public java.util.List getTestStateList() {
if (testStateBuilder_ == null) {
return java.util.Collections.unmodifiableList(testState_);
} else {
return testStateBuilder_.getMessageList();
}
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public int getTestStateCount() {
if (testStateBuilder_ == null) {
return testState_.size();
} else {
return testStateBuilder_.getCount();
}
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetState getTestState(int index) {
if (testStateBuilder_ == null) {
return testState_.get(index);
} else {
return testStateBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder setTestState(
int index, caffe.Caffe.NetState value) {
if (testStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestStateIsMutable();
testState_.set(index, value);
onChanged();
} else {
testStateBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder setTestState(
int index, caffe.Caffe.NetState.Builder builderForValue) {
if (testStateBuilder_ == null) {
ensureTestStateIsMutable();
testState_.set(index, builderForValue.build());
onChanged();
} else {
testStateBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder addTestState(caffe.Caffe.NetState value) {
if (testStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestStateIsMutable();
testState_.add(value);
onChanged();
} else {
testStateBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder addTestState(
int index, caffe.Caffe.NetState value) {
if (testStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTestStateIsMutable();
testState_.add(index, value);
onChanged();
} else {
testStateBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder addTestState(
caffe.Caffe.NetState.Builder builderForValue) {
if (testStateBuilder_ == null) {
ensureTestStateIsMutable();
testState_.add(builderForValue.build());
onChanged();
} else {
testStateBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder addTestState(
int index, caffe.Caffe.NetState.Builder builderForValue) {
if (testStateBuilder_ == null) {
ensureTestStateIsMutable();
testState_.add(index, builderForValue.build());
onChanged();
} else {
testStateBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder addAllTestState(
java.lang.Iterable extends caffe.Caffe.NetState> values) {
if (testStateBuilder_ == null) {
ensureTestStateIsMutable();
super.addAll(values, testState_);
onChanged();
} else {
testStateBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder clearTestState() {
if (testStateBuilder_ == null) {
testState_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
testStateBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public Builder removeTestState(int index) {
if (testStateBuilder_ == null) {
ensureTestStateIsMutable();
testState_.remove(index);
onChanged();
} else {
testStateBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetState.Builder getTestStateBuilder(
int index) {
return getTestStateFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetStateOrBuilder getTestStateOrBuilder(
int index) {
if (testStateBuilder_ == null) {
return testState_.get(index); } else {
return testStateBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public java.util.List extends caffe.Caffe.NetStateOrBuilder>
getTestStateOrBuilderList() {
if (testStateBuilder_ != null) {
return testStateBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(testState_);
}
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetState.Builder addTestStateBuilder() {
return getTestStateFieldBuilder().addBuilder(
caffe.Caffe.NetState.getDefaultInstance());
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public caffe.Caffe.NetState.Builder addTestStateBuilder(
int index) {
return getTestStateFieldBuilder().addBuilder(
index, caffe.Caffe.NetState.getDefaultInstance());
}
/**
* repeated .caffe.NetState test_state = 27;
*/
public java.util.List
getTestStateBuilderList() {
return getTestStateFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>
getTestStateFieldBuilder() {
if (testStateBuilder_ == null) {
testStateBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>(
testState_,
((bitField0_ & 0x00000080) == 0x00000080),
getParentForChildren(),
isClean());
testState_ = null;
}
return testStateBuilder_;
}
// repeated int32 test_iter = 3;
private java.util.List testIter_ = java.util.Collections.emptyList();
private void ensureTestIterIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
testIter_ = new java.util.ArrayList(testIter_);
bitField0_ |= 0x00000100;
}
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public java.util.List
getTestIterList() {
return java.util.Collections.unmodifiableList(testIter_);
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public int getTestIterCount() {
return testIter_.size();
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public int getTestIter(int index) {
return testIter_.get(index);
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public Builder setTestIter(
int index, int value) {
ensureTestIterIsMutable();
testIter_.set(index, value);
onChanged();
return this;
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public Builder addTestIter(int value) {
ensureTestIterIsMutable();
testIter_.add(value);
onChanged();
return this;
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public Builder addAllTestIter(
java.lang.Iterable extends java.lang.Integer> values) {
ensureTestIterIsMutable();
super.addAll(values, testIter_);
onChanged();
return this;
}
/**
* repeated int32 test_iter = 3;
*
*
* The number of iterations for each test net.
*
*/
public Builder clearTestIter() {
testIter_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
// optional int32 test_interval = 4 [default = 0];
private int testInterval_ ;
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public boolean hasTestInterval() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public int getTestInterval() {
return testInterval_;
}
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public Builder setTestInterval(int value) {
bitField0_ |= 0x00000200;
testInterval_ = value;
onChanged();
return this;
}
/**
* optional int32 test_interval = 4 [default = 0];
*
*
* The number of iterations between two testing phases.
*
*/
public Builder clearTestInterval() {
bitField0_ = (bitField0_ & ~0x00000200);
testInterval_ = 0;
onChanged();
return this;
}
// optional bool test_compute_loss = 19 [default = false];
private boolean testComputeLoss_ ;
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public boolean hasTestComputeLoss() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public boolean getTestComputeLoss() {
return testComputeLoss_;
}
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public Builder setTestComputeLoss(boolean value) {
bitField0_ |= 0x00000400;
testComputeLoss_ = value;
onChanged();
return this;
}
/**
* optional bool test_compute_loss = 19 [default = false];
*/
public Builder clearTestComputeLoss() {
bitField0_ = (bitField0_ & ~0x00000400);
testComputeLoss_ = false;
onChanged();
return this;
}
// optional bool test_initialization = 32 [default = true];
private boolean testInitialization_ = true;
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public boolean hasTestInitialization() {
return ((bitField0_ & 0x00000800) == 0x00000800);
}
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public boolean getTestInitialization() {
return testInitialization_;
}
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public Builder setTestInitialization(boolean value) {
bitField0_ |= 0x00000800;
testInitialization_ = value;
onChanged();
return this;
}
/**
* optional bool test_initialization = 32 [default = true];
*
*
* If true, run an initial test pass before the first iteration,
* ensuring memory availability and printing the starting value of the loss.
*
*/
public Builder clearTestInitialization() {
bitField0_ = (bitField0_ & ~0x00000800);
testInitialization_ = true;
onChanged();
return this;
}
// optional float base_lr = 5;
private float baseLr_ ;
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public boolean hasBaseLr() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public float getBaseLr() {
return baseLr_;
}
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public Builder setBaseLr(float value) {
bitField0_ |= 0x00001000;
baseLr_ = value;
onChanged();
return this;
}
/**
* optional float base_lr = 5;
*
*
* The base learning rate
*
*/
public Builder clearBaseLr() {
bitField0_ = (bitField0_ & ~0x00001000);
baseLr_ = 0F;
onChanged();
return this;
}
// optional int32 display = 6;
private int display_ ;
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public boolean hasDisplay() {
return ((bitField0_ & 0x00002000) == 0x00002000);
}
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public int getDisplay() {
return display_;
}
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public Builder setDisplay(int value) {
bitField0_ |= 0x00002000;
display_ = value;
onChanged();
return this;
}
/**
* optional int32 display = 6;
*
*
* the number of iterations between displaying info. If display = 0, no info
* will be displayed.
*
*/
public Builder clearDisplay() {
bitField0_ = (bitField0_ & ~0x00002000);
display_ = 0;
onChanged();
return this;
}
// optional int32 average_loss = 33 [default = 1];
private int averageLoss_ = 1;
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public boolean hasAverageLoss() {
return ((bitField0_ & 0x00004000) == 0x00004000);
}
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public int getAverageLoss() {
return averageLoss_;
}
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public Builder setAverageLoss(int value) {
bitField0_ |= 0x00004000;
averageLoss_ = value;
onChanged();
return this;
}
/**
* optional int32 average_loss = 33 [default = 1];
*
*
* Display the loss averaged over the last average_loss iterations
*
*/
public Builder clearAverageLoss() {
bitField0_ = (bitField0_ & ~0x00004000);
averageLoss_ = 1;
onChanged();
return this;
}
// optional int32 max_iter = 7;
private int maxIter_ ;
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public boolean hasMaxIter() {
return ((bitField0_ & 0x00008000) == 0x00008000);
}
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public int getMaxIter() {
return maxIter_;
}
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public Builder setMaxIter(int value) {
bitField0_ |= 0x00008000;
maxIter_ = value;
onChanged();
return this;
}
/**
* optional int32 max_iter = 7;
*
*
* the maximum number of iterations
*
*/
public Builder clearMaxIter() {
bitField0_ = (bitField0_ & ~0x00008000);
maxIter_ = 0;
onChanged();
return this;
}
// optional int32 iter_size = 36 [default = 1];
private int iterSize_ = 1;
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public boolean hasIterSize() {
return ((bitField0_ & 0x00010000) == 0x00010000);
}
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public int getIterSize() {
return iterSize_;
}
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public Builder setIterSize(int value) {
bitField0_ |= 0x00010000;
iterSize_ = value;
onChanged();
return this;
}
/**
* optional int32 iter_size = 36 [default = 1];
*
*
* accumulate gradients over `iter_size` x `batch_size` instances
*
*/
public Builder clearIterSize() {
bitField0_ = (bitField0_ & ~0x00010000);
iterSize_ = 1;
onChanged();
return this;
}
// optional string lr_policy = 8;
private java.lang.Object lrPolicy_ = "";
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public boolean hasLrPolicy() {
return ((bitField0_ & 0x00020000) == 0x00020000);
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public java.lang.String getLrPolicy() {
java.lang.Object ref = lrPolicy_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
lrPolicy_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public com.google.protobuf.ByteString
getLrPolicyBytes() {
java.lang.Object ref = lrPolicy_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
lrPolicy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public Builder setLrPolicy(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00020000;
lrPolicy_ = value;
onChanged();
return this;
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public Builder clearLrPolicy() {
bitField0_ = (bitField0_ & ~0x00020000);
lrPolicy_ = getDefaultInstance().getLrPolicy();
onChanged();
return this;
}
/**
* optional string lr_policy = 8;
*
*
* The learning rate decay policy. The currently implemented learning rate
* policies are as follows:
* - fixed: always return base_lr.
* - step: return base_lr * gamma ^ (floor(iter / step))
* - exp: return base_lr * gamma ^ iter
* - inv: return base_lr * (1 + gamma * iter) ^ (- power)
* - multistep: similar to step but it allows non uniform steps defined by
* stepvalue
* - poly: the effective learning rate follows a polynomial decay, to be
* zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
* - sigmoid: the effective learning rate follows a sigmod decay
* return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
* - plateau: decreases lr
* if the minimum loss isn't updated for 'plateau_winsize' iters
*
* where base_lr, max_iter, gamma, step, stepvalue and power are defined
* in the solver parameter protocol buffer, and iter is the current iteration.
*
*/
public Builder setLrPolicyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00020000;
lrPolicy_ = value;
onChanged();
return this;
}
// optional float gamma = 9;
private float gamma_ ;
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public boolean hasGamma() {
return ((bitField0_ & 0x00040000) == 0x00040000);
}
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public float getGamma() {
return gamma_;
}
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public Builder setGamma(float value) {
bitField0_ |= 0x00040000;
gamma_ = value;
onChanged();
return this;
}
/**
* optional float gamma = 9;
*
*
* The parameter to compute the learning rate.
*
*/
public Builder clearGamma() {
bitField0_ = (bitField0_ & ~0x00040000);
gamma_ = 0F;
onChanged();
return this;
}
// optional float power = 10;
private float power_ ;
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public boolean hasPower() {
return ((bitField0_ & 0x00080000) == 0x00080000);
}
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public float getPower() {
return power_;
}
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public Builder setPower(float value) {
bitField0_ |= 0x00080000;
power_ = value;
onChanged();
return this;
}
/**
* optional float power = 10;
*
*
* The parameter to compute the learning rate.
*
*/
public Builder clearPower() {
bitField0_ = (bitField0_ & ~0x00080000);
power_ = 0F;
onChanged();
return this;
}
// optional float momentum = 11;
private float momentum_ ;
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public boolean hasMomentum() {
return ((bitField0_ & 0x00100000) == 0x00100000);
}
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public float getMomentum() {
return momentum_;
}
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public Builder setMomentum(float value) {
bitField0_ |= 0x00100000;
momentum_ = value;
onChanged();
return this;
}
/**
* optional float momentum = 11;
*
*
* The momentum value.
*
*/
public Builder clearMomentum() {
bitField0_ = (bitField0_ & ~0x00100000);
momentum_ = 0F;
onChanged();
return this;
}
// optional float weight_decay = 12;
private float weightDecay_ ;
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public boolean hasWeightDecay() {
return ((bitField0_ & 0x00200000) == 0x00200000);
}
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public float getWeightDecay() {
return weightDecay_;
}
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public Builder setWeightDecay(float value) {
bitField0_ |= 0x00200000;
weightDecay_ = value;
onChanged();
return this;
}
/**
* optional float weight_decay = 12;
*
*
* The weight decay.
*
*/
public Builder clearWeightDecay() {
bitField0_ = (bitField0_ & ~0x00200000);
weightDecay_ = 0F;
onChanged();
return this;
}
// optional string regularization_type = 29 [default = "L2"];
private java.lang.Object regularizationType_ = "L2";
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public boolean hasRegularizationType() {
return ((bitField0_ & 0x00400000) == 0x00400000);
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public java.lang.String getRegularizationType() {
java.lang.Object ref = regularizationType_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
regularizationType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public com.google.protobuf.ByteString
getRegularizationTypeBytes() {
java.lang.Object ref = regularizationType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
regularizationType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public Builder setRegularizationType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00400000;
regularizationType_ = value;
onChanged();
return this;
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public Builder clearRegularizationType() {
bitField0_ = (bitField0_ & ~0x00400000);
regularizationType_ = getDefaultInstance().getRegularizationType();
onChanged();
return this;
}
/**
* optional string regularization_type = 29 [default = "L2"];
*
*
* regularization types supported: L1 and L2
* controlled by weight_decay
*
*/
public Builder setRegularizationTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00400000;
regularizationType_ = value;
onChanged();
return this;
}
// optional int32 stepsize = 13;
private int stepsize_ ;
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public boolean hasStepsize() {
return ((bitField0_ & 0x00800000) == 0x00800000);
}
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public int getStepsize() {
return stepsize_;
}
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public Builder setStepsize(int value) {
bitField0_ |= 0x00800000;
stepsize_ = value;
onChanged();
return this;
}
/**
* optional int32 stepsize = 13;
*
*
* the stepsize for learning rate policy "step"
*
*/
public Builder clearStepsize() {
bitField0_ = (bitField0_ & ~0x00800000);
stepsize_ = 0;
onChanged();
return this;
}
// repeated int32 stepvalue = 34;
private java.util.List stepvalue_ = java.util.Collections.emptyList();
private void ensureStepvalueIsMutable() {
if (!((bitField0_ & 0x01000000) == 0x01000000)) {
stepvalue_ = new java.util.ArrayList(stepvalue_);
bitField0_ |= 0x01000000;
}
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public java.util.List
getStepvalueList() {
return java.util.Collections.unmodifiableList(stepvalue_);
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public int getStepvalueCount() {
return stepvalue_.size();
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public int getStepvalue(int index) {
return stepvalue_.get(index);
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public Builder setStepvalue(
int index, int value) {
ensureStepvalueIsMutable();
stepvalue_.set(index, value);
onChanged();
return this;
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public Builder addStepvalue(int value) {
ensureStepvalueIsMutable();
stepvalue_.add(value);
onChanged();
return this;
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public Builder addAllStepvalue(
java.lang.Iterable extends java.lang.Integer> values) {
ensureStepvalueIsMutable();
super.addAll(values, stepvalue_);
onChanged();
return this;
}
/**
* repeated int32 stepvalue = 34;
*
*
* the stepsize for learning rate policy "multistep"
*
*/
public Builder clearStepvalue() {
stepvalue_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x01000000);
onChanged();
return this;
}
// repeated int32 plateau_winsize = 41;
private java.util.List plateauWinsize_ = java.util.Collections.emptyList();
private void ensurePlateauWinsizeIsMutable() {
if (!((bitField0_ & 0x02000000) == 0x02000000)) {
plateauWinsize_ = new java.util.ArrayList(plateauWinsize_);
bitField0_ |= 0x02000000;
}
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public java.util.List
getPlateauWinsizeList() {
return java.util.Collections.unmodifiableList(plateauWinsize_);
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public int getPlateauWinsizeCount() {
return plateauWinsize_.size();
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public int getPlateauWinsize(int index) {
return plateauWinsize_.get(index);
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public Builder setPlateauWinsize(
int index, int value) {
ensurePlateauWinsizeIsMutable();
plateauWinsize_.set(index, value);
onChanged();
return this;
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public Builder addPlateauWinsize(int value) {
ensurePlateauWinsizeIsMutable();
plateauWinsize_.add(value);
onChanged();
return this;
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public Builder addAllPlateauWinsize(
java.lang.Iterable extends java.lang.Integer> values) {
ensurePlateauWinsizeIsMutable();
super.addAll(values, plateauWinsize_);
onChanged();
return this;
}
/**
* repeated int32 plateau_winsize = 41;
*
*
* the stepsize for learning rate policy "plateau"
*
*/
public Builder clearPlateauWinsize() {
plateauWinsize_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x02000000);
onChanged();
return this;
}
// optional float clip_gradients = 35 [default = -1];
private float clipGradients_ = -1F;
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public boolean hasClipGradients() {
return ((bitField0_ & 0x04000000) == 0x04000000);
}
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public float getClipGradients() {
return clipGradients_;
}
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public Builder setClipGradients(float value) {
bitField0_ |= 0x04000000;
clipGradients_ = value;
onChanged();
return this;
}
/**
* optional float clip_gradients = 35 [default = -1];
*
*
* Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm,
* whenever their actual L2 norm is larger.
*
*/
public Builder clearClipGradients() {
bitField0_ = (bitField0_ & ~0x04000000);
clipGradients_ = -1F;
onChanged();
return this;
}
// optional int32 snapshot = 14 [default = 0];
private int snapshot_ ;
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public boolean hasSnapshot() {
return ((bitField0_ & 0x08000000) == 0x08000000);
}
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public int getSnapshot() {
return snapshot_;
}
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public Builder setSnapshot(int value) {
bitField0_ |= 0x08000000;
snapshot_ = value;
onChanged();
return this;
}
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public Builder clearSnapshot() {
bitField0_ = (bitField0_ & ~0x08000000);
snapshot_ = 0;
onChanged();
return this;
}
// optional string snapshot_prefix = 15;
private java.lang.Object snapshotPrefix_ = "";
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public boolean hasSnapshotPrefix() {
return ((bitField0_ & 0x10000000) == 0x10000000);
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public java.lang.String getSnapshotPrefix() {
java.lang.Object ref = snapshotPrefix_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
snapshotPrefix_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public com.google.protobuf.ByteString
getSnapshotPrefixBytes() {
java.lang.Object ref = snapshotPrefix_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
snapshotPrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public Builder setSnapshotPrefix(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x10000000;
snapshotPrefix_ = value;
onChanged();
return this;
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public Builder clearSnapshotPrefix() {
bitField0_ = (bitField0_ & ~0x10000000);
snapshotPrefix_ = getDefaultInstance().getSnapshotPrefix();
onChanged();
return this;
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public Builder setSnapshotPrefixBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x10000000;
snapshotPrefix_ = value;
onChanged();
return this;
}
// optional bool snapshot_diff = 16 [default = false];
private boolean snapshotDiff_ ;
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public boolean hasSnapshotDiff() {
return ((bitField0_ & 0x20000000) == 0x20000000);
}
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public boolean getSnapshotDiff() {
return snapshotDiff_;
}
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public Builder setSnapshotDiff(boolean value) {
bitField0_ |= 0x20000000;
snapshotDiff_ = value;
onChanged();
return this;
}
/**
* optional bool snapshot_diff = 16 [default = false];
*
*
* whether to snapshot diff in the results or not. Snapshotting diff will help
* debugging but the final protocol buffer size will be much larger.
*
*/
public Builder clearSnapshotDiff() {
bitField0_ = (bitField0_ & ~0x20000000);
snapshotDiff_ = false;
onChanged();
return this;
}
// optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
private caffe.Caffe.SolverParameter.SnapshotFormat snapshotFormat_ = caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO;
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public boolean hasSnapshotFormat() {
return ((bitField0_ & 0x40000000) == 0x40000000);
}
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public caffe.Caffe.SolverParameter.SnapshotFormat getSnapshotFormat() {
return snapshotFormat_;
}
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public Builder setSnapshotFormat(caffe.Caffe.SolverParameter.SnapshotFormat value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x40000000;
snapshotFormat_ = value;
onChanged();
return this;
}
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public Builder clearSnapshotFormat() {
bitField0_ = (bitField0_ & ~0x40000000);
snapshotFormat_ = caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO;
onChanged();
return this;
}
// optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
private caffe.Caffe.SolverParameter.SolverMode solverMode_ = caffe.Caffe.SolverParameter.SolverMode.GPU;
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public boolean hasSolverMode() {
return ((bitField0_ & 0x80000000) == 0x80000000);
}
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public caffe.Caffe.SolverParameter.SolverMode getSolverMode() {
return solverMode_;
}
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public Builder setSolverMode(caffe.Caffe.SolverParameter.SolverMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x80000000;
solverMode_ = value;
onChanged();
return this;
}
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public Builder clearSolverMode() {
bitField0_ = (bitField0_ & ~0x80000000);
solverMode_ = caffe.Caffe.SolverParameter.SolverMode.GPU;
onChanged();
return this;
}
// optional int32 device_id = 18 [default = 0];
private int deviceId_ ;
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public boolean hasDeviceId() {
return ((bitField1_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public int getDeviceId() {
return deviceId_;
}
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public Builder setDeviceId(int value) {
bitField1_ |= 0x00000001;
deviceId_ = value;
onChanged();
return this;
}
/**
* optional int32 device_id = 18 [default = 0];
*
*
* the device_id will that be used in GPU mode. Use device_id = 0 in default.
*
*/
public Builder clearDeviceId() {
bitField1_ = (bitField1_ & ~0x00000001);
deviceId_ = 0;
onChanged();
return this;
}
// optional int64 random_seed = 20 [default = -1];
private long randomSeed_ = -1L;
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public boolean hasRandomSeed() {
return ((bitField1_ & 0x00000002) == 0x00000002);
}
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public long getRandomSeed() {
return randomSeed_;
}
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public Builder setRandomSeed(long value) {
bitField1_ |= 0x00000002;
randomSeed_ = value;
onChanged();
return this;
}
/**
* optional int64 random_seed = 20 [default = -1];
*
*
* If non-negative, the seed with which the Solver will initialize the Caffe
* random number generator -- useful for reproducible results. Otherwise,
* (and by default) initialize using a seed derived from the system clock.
*
*/
public Builder clearRandomSeed() {
bitField1_ = (bitField1_ & ~0x00000002);
randomSeed_ = -1L;
onChanged();
return this;
}
// optional string type = 40 [default = "SGD"];
private java.lang.Object type_ = "SGD";
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public boolean hasType() {
return ((bitField1_ & 0x00000004) == 0x00000004);
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField1_ |= 0x00000004;
type_ = value;
onChanged();
return this;
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public Builder clearType() {
bitField1_ = (bitField1_ & ~0x00000004);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField1_ |= 0x00000004;
type_ = value;
onChanged();
return this;
}
// optional float delta = 31 [default = 1e-08];
private float delta_ = 1e-08F;
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public boolean hasDelta() {
return ((bitField1_ & 0x00000008) == 0x00000008);
}
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public float getDelta() {
return delta_;
}
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public Builder setDelta(float value) {
bitField1_ |= 0x00000008;
delta_ = value;
onChanged();
return this;
}
/**
* optional float delta = 31 [default = 1e-08];
*
*
* numerical stability for RMSProp, AdaGrad and AdaDelta and Adam
*
*/
public Builder clearDelta() {
bitField1_ = (bitField1_ & ~0x00000008);
delta_ = 1e-08F;
onChanged();
return this;
}
// optional float momentum2 = 39 [default = 0.999];
private float momentum2_ = 0.999F;
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public boolean hasMomentum2() {
return ((bitField1_ & 0x00000010) == 0x00000010);
}
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public float getMomentum2() {
return momentum2_;
}
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public Builder setMomentum2(float value) {
bitField1_ |= 0x00000010;
momentum2_ = value;
onChanged();
return this;
}
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public Builder clearMomentum2() {
bitField1_ = (bitField1_ & ~0x00000010);
momentum2_ = 0.999F;
onChanged();
return this;
}
// optional float rms_decay = 38 [default = 0.99];
private float rmsDecay_ = 0.99F;
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public boolean hasRmsDecay() {
return ((bitField1_ & 0x00000020) == 0x00000020);
}
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public float getRmsDecay() {
return rmsDecay_;
}
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public Builder setRmsDecay(float value) {
bitField1_ |= 0x00000020;
rmsDecay_ = value;
onChanged();
return this;
}
/**
* optional float rms_decay = 38 [default = 0.99];
*
*
* RMSProp decay value
* MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
*
*/
public Builder clearRmsDecay() {
bitField1_ = (bitField1_ & ~0x00000020);
rmsDecay_ = 0.99F;
onChanged();
return this;
}
// optional bool debug_info = 23 [default = false];
private boolean debugInfo_ ;
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public boolean hasDebugInfo() {
return ((bitField1_ & 0x00000040) == 0x00000040);
}
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public boolean getDebugInfo() {
return debugInfo_;
}
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public Builder setDebugInfo(boolean value) {
bitField1_ |= 0x00000040;
debugInfo_ = value;
onChanged();
return this;
}
/**
* optional bool debug_info = 23 [default = false];
*
*
* If true, print information about the state of the net that may help with
* debugging learning problems.
*
*/
public Builder clearDebugInfo() {
bitField1_ = (bitField1_ & ~0x00000040);
debugInfo_ = false;
onChanged();
return this;
}
// optional bool snapshot_after_train = 28 [default = true];
private boolean snapshotAfterTrain_ = true;
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public boolean hasSnapshotAfterTrain() {
return ((bitField1_ & 0x00000080) == 0x00000080);
}
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public boolean getSnapshotAfterTrain() {
return snapshotAfterTrain_;
}
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public Builder setSnapshotAfterTrain(boolean value) {
bitField1_ |= 0x00000080;
snapshotAfterTrain_ = value;
onChanged();
return this;
}
/**
* optional bool snapshot_after_train = 28 [default = true];
*
*
* If false, don't save a snapshot after training finishes.
*
*/
public Builder clearSnapshotAfterTrain() {
bitField1_ = (bitField1_ & ~0x00000080);
snapshotAfterTrain_ = true;
onChanged();
return this;
}
// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
private caffe.Caffe.SolverParameter.SolverType solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public boolean hasSolverType() {
return ((bitField1_ & 0x00000100) == 0x00000100);
}
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public caffe.Caffe.SolverParameter.SolverType getSolverType() {
return solverType_;
}
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public Builder setSolverType(caffe.Caffe.SolverParameter.SolverType value) {
if (value == null) {
throw new NullPointerException();
}
bitField1_ |= 0x00000100;
solverType_ = value;
onChanged();
return this;
}
/**
* optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
*
*
* DEPRECATED: use type instead of solver_type
*
*/
public Builder clearSolverType() {
bitField1_ = (bitField1_ & ~0x00000100);
solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.SolverParameter)
}
static {
defaultInstance = new SolverParameter(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.SolverParameter)
}
public interface SolverStateOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional int32 iter = 1;
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
boolean hasIter();
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
int getIter();
// optional string learned_net = 2;
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
boolean hasLearnedNet();
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
java.lang.String getLearnedNet();
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
com.google.protobuf.ByteString
getLearnedNetBytes();
// repeated .caffe.BlobProto history = 3;
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
java.util.List
getHistoryList();
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
caffe.Caffe.BlobProto getHistory(int index);
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
int getHistoryCount();
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getHistoryOrBuilderList();
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
caffe.Caffe.BlobProtoOrBuilder getHistoryOrBuilder(
int index);
// optional int32 current_step = 4 [default = 0];
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
boolean hasCurrentStep();
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
int getCurrentStep();
// optional float minimum_loss = 5 [default = 1e+38];
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
boolean hasMinimumLoss();
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
float getMinimumLoss();
// optional int32 iter_last_event = 6 [default = 0];
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
boolean hasIterLastEvent();
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
int getIterLastEvent();
}
/**
* Protobuf type {@code caffe.SolverState}
*
*
* A message that stores the solver snapshots
*
*/
public static final class SolverState extends
com.google.protobuf.GeneratedMessage
implements SolverStateOrBuilder {
// Use SolverState.newBuilder() to construct.
private SolverState(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private SolverState(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final SolverState defaultInstance;
public static SolverState getDefaultInstance() {
return defaultInstance;
}
public SolverState getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SolverState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
iter_ = input.readInt32();
break;
}
case 18: {
bitField0_ |= 0x00000002;
learnedNet_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
history_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
history_.add(input.readMessage(caffe.Caffe.BlobProto.PARSER, extensionRegistry));
break;
}
case 32: {
bitField0_ |= 0x00000004;
currentStep_ = input.readInt32();
break;
}
case 45: {
bitField0_ |= 0x00000008;
minimumLoss_ = input.readFloat();
break;
}
case 48: {
bitField0_ |= 0x00000010;
iterLastEvent_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
history_ = java.util.Collections.unmodifiableList(history_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_SolverState_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_SolverState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.SolverState.class, caffe.Caffe.SolverState.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public SolverState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SolverState(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional int32 iter = 1;
public static final int ITER_FIELD_NUMBER = 1;
private int iter_;
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public boolean hasIter() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public int getIter() {
return iter_;
}
// optional string learned_net = 2;
public static final int LEARNED_NET_FIELD_NUMBER = 2;
private java.lang.Object learnedNet_;
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public boolean hasLearnedNet() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public java.lang.String getLearnedNet() {
java.lang.Object ref = learnedNet_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
learnedNet_ = s;
}
return s;
}
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public com.google.protobuf.ByteString
getLearnedNetBytes() {
java.lang.Object ref = learnedNet_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
learnedNet_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated .caffe.BlobProto history = 3;
public static final int HISTORY_FIELD_NUMBER = 3;
private java.util.List history_;
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public java.util.List getHistoryList() {
return history_;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getHistoryOrBuilderList() {
return history_;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public int getHistoryCount() {
return history_.size();
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProto getHistory(int index) {
return history_.get(index);
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProtoOrBuilder getHistoryOrBuilder(
int index) {
return history_.get(index);
}
// optional int32 current_step = 4 [default = 0];
public static final int CURRENT_STEP_FIELD_NUMBER = 4;
private int currentStep_;
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public boolean hasCurrentStep() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public int getCurrentStep() {
return currentStep_;
}
// optional float minimum_loss = 5 [default = 1e+38];
public static final int MINIMUM_LOSS_FIELD_NUMBER = 5;
private float minimumLoss_;
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public boolean hasMinimumLoss() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public float getMinimumLoss() {
return minimumLoss_;
}
// optional int32 iter_last_event = 6 [default = 0];
public static final int ITER_LAST_EVENT_FIELD_NUMBER = 6;
private int iterLastEvent_;
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public boolean hasIterLastEvent() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public int getIterLastEvent() {
return iterLastEvent_;
}
private void initFields() {
iter_ = 0;
learnedNet_ = "";
history_ = java.util.Collections.emptyList();
currentStep_ = 0;
minimumLoss_ = 1e+38F;
iterLastEvent_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, iter_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getLearnedNetBytes());
}
for (int i = 0; i < history_.size(); i++) {
output.writeMessage(3, history_.get(i));
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(4, currentStep_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeFloat(5, minimumLoss_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(6, iterLastEvent_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, iter_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getLearnedNetBytes());
}
for (int i = 0; i < history_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, history_.get(i));
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, currentStep_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, minimumLoss_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, iterLastEvent_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.SolverState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.SolverState parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.SolverState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.SolverState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.SolverState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.SolverState parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.SolverState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.SolverState parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.SolverState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.SolverState parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.SolverState prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.SolverState}
*
*
* A message that stores the solver snapshots
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.SolverStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_SolverState_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_SolverState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.SolverState.class, caffe.Caffe.SolverState.Builder.class);
}
// Construct using caffe.Caffe.SolverState.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getHistoryFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
iter_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
learnedNet_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (historyBuilder_ == null) {
history_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
historyBuilder_.clear();
}
currentStep_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
minimumLoss_ = 1e+38F;
bitField0_ = (bitField0_ & ~0x00000010);
iterLastEvent_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_SolverState_descriptor;
}
public caffe.Caffe.SolverState getDefaultInstanceForType() {
return caffe.Caffe.SolverState.getDefaultInstance();
}
public caffe.Caffe.SolverState build() {
caffe.Caffe.SolverState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.SolverState buildPartial() {
caffe.Caffe.SolverState result = new caffe.Caffe.SolverState(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.iter_ = iter_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.learnedNet_ = learnedNet_;
if (historyBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
history_ = java.util.Collections.unmodifiableList(history_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.history_ = history_;
} else {
result.history_ = historyBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
result.currentStep_ = currentStep_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
result.minimumLoss_ = minimumLoss_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000010;
}
result.iterLastEvent_ = iterLastEvent_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.SolverState) {
return mergeFrom((caffe.Caffe.SolverState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.SolverState other) {
if (other == caffe.Caffe.SolverState.getDefaultInstance()) return this;
if (other.hasIter()) {
setIter(other.getIter());
}
if (other.hasLearnedNet()) {
bitField0_ |= 0x00000002;
learnedNet_ = other.learnedNet_;
onChanged();
}
if (historyBuilder_ == null) {
if (!other.history_.isEmpty()) {
if (history_.isEmpty()) {
history_ = other.history_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureHistoryIsMutable();
history_.addAll(other.history_);
}
onChanged();
}
} else {
if (!other.history_.isEmpty()) {
if (historyBuilder_.isEmpty()) {
historyBuilder_.dispose();
historyBuilder_ = null;
history_ = other.history_;
bitField0_ = (bitField0_ & ~0x00000004);
historyBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getHistoryFieldBuilder() : null;
} else {
historyBuilder_.addAllMessages(other.history_);
}
}
}
if (other.hasCurrentStep()) {
setCurrentStep(other.getCurrentStep());
}
if (other.hasMinimumLoss()) {
setMinimumLoss(other.getMinimumLoss());
}
if (other.hasIterLastEvent()) {
setIterLastEvent(other.getIterLastEvent());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.SolverState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.SolverState) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional int32 iter = 1;
private int iter_ ;
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public boolean hasIter() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public int getIter() {
return iter_;
}
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public Builder setIter(int value) {
bitField0_ |= 0x00000001;
iter_ = value;
onChanged();
return this;
}
/**
* optional int32 iter = 1;
*
*
* The current iteration
*
*/
public Builder clearIter() {
bitField0_ = (bitField0_ & ~0x00000001);
iter_ = 0;
onChanged();
return this;
}
// optional string learned_net = 2;
private java.lang.Object learnedNet_ = "";
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public boolean hasLearnedNet() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public java.lang.String getLearnedNet() {
java.lang.Object ref = learnedNet_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
learnedNet_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public com.google.protobuf.ByteString
getLearnedNetBytes() {
java.lang.Object ref = learnedNet_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
learnedNet_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public Builder setLearnedNet(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
learnedNet_ = value;
onChanged();
return this;
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public Builder clearLearnedNet() {
bitField0_ = (bitField0_ & ~0x00000002);
learnedNet_ = getDefaultInstance().getLearnedNet();
onChanged();
return this;
}
/**
* optional string learned_net = 2;
*
*
* The file that stores the learned net.
*
*/
public Builder setLearnedNetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
learnedNet_ = value;
onChanged();
return this;
}
// repeated .caffe.BlobProto history = 3;
private java.util.List history_ =
java.util.Collections.emptyList();
private void ensureHistoryIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
history_ = new java.util.ArrayList(history_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> historyBuilder_;
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public java.util.List getHistoryList() {
if (historyBuilder_ == null) {
return java.util.Collections.unmodifiableList(history_);
} else {
return historyBuilder_.getMessageList();
}
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public int getHistoryCount() {
if (historyBuilder_ == null) {
return history_.size();
} else {
return historyBuilder_.getCount();
}
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProto getHistory(int index) {
if (historyBuilder_ == null) {
return history_.get(index);
} else {
return historyBuilder_.getMessage(index);
}
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder setHistory(
int index, caffe.Caffe.BlobProto value) {
if (historyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistoryIsMutable();
history_.set(index, value);
onChanged();
} else {
historyBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder setHistory(
int index, caffe.Caffe.BlobProto.Builder builderForValue) {
if (historyBuilder_ == null) {
ensureHistoryIsMutable();
history_.set(index, builderForValue.build());
onChanged();
} else {
historyBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder addHistory(caffe.Caffe.BlobProto value) {
if (historyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistoryIsMutable();
history_.add(value);
onChanged();
} else {
historyBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder addHistory(
int index, caffe.Caffe.BlobProto value) {
if (historyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistoryIsMutable();
history_.add(index, value);
onChanged();
} else {
historyBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder addHistory(
caffe.Caffe.BlobProto.Builder builderForValue) {
if (historyBuilder_ == null) {
ensureHistoryIsMutable();
history_.add(builderForValue.build());
onChanged();
} else {
historyBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder addHistory(
int index, caffe.Caffe.BlobProto.Builder builderForValue) {
if (historyBuilder_ == null) {
ensureHistoryIsMutable();
history_.add(index, builderForValue.build());
onChanged();
} else {
historyBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder addAllHistory(
java.lang.Iterable extends caffe.Caffe.BlobProto> values) {
if (historyBuilder_ == null) {
ensureHistoryIsMutable();
super.addAll(values, history_);
onChanged();
} else {
historyBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder clearHistory() {
if (historyBuilder_ == null) {
history_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
historyBuilder_.clear();
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public Builder removeHistory(int index) {
if (historyBuilder_ == null) {
ensureHistoryIsMutable();
history_.remove(index);
onChanged();
} else {
historyBuilder_.remove(index);
}
return this;
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProto.Builder getHistoryBuilder(
int index) {
return getHistoryFieldBuilder().getBuilder(index);
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProtoOrBuilder getHistoryOrBuilder(
int index) {
if (historyBuilder_ == null) {
return history_.get(index); } else {
return historyBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getHistoryOrBuilderList() {
if (historyBuilder_ != null) {
return historyBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(history_);
}
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProto.Builder addHistoryBuilder() {
return getHistoryFieldBuilder().addBuilder(
caffe.Caffe.BlobProto.getDefaultInstance());
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public caffe.Caffe.BlobProto.Builder addHistoryBuilder(
int index) {
return getHistoryFieldBuilder().addBuilder(
index, caffe.Caffe.BlobProto.getDefaultInstance());
}
/**
* repeated .caffe.BlobProto history = 3;
*
*
* The history for sgd solvers
*
*/
public java.util.List
getHistoryBuilderList() {
return getHistoryFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder>
getHistoryFieldBuilder() {
if (historyBuilder_ == null) {
historyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder>(
history_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
history_ = null;
}
return historyBuilder_;
}
// optional int32 current_step = 4 [default = 0];
private int currentStep_ ;
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public boolean hasCurrentStep() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public int getCurrentStep() {
return currentStep_;
}
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public Builder setCurrentStep(int value) {
bitField0_ |= 0x00000008;
currentStep_ = value;
onChanged();
return this;
}
/**
* optional int32 current_step = 4 [default = 0];
*
*
* The current step for learning rate
*
*/
public Builder clearCurrentStep() {
bitField0_ = (bitField0_ & ~0x00000008);
currentStep_ = 0;
onChanged();
return this;
}
// optional float minimum_loss = 5 [default = 1e+38];
private float minimumLoss_ = 1e+38F;
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public boolean hasMinimumLoss() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public float getMinimumLoss() {
return minimumLoss_;
}
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public Builder setMinimumLoss(float value) {
bitField0_ |= 0x00000010;
minimumLoss_ = value;
onChanged();
return this;
}
/**
* optional float minimum_loss = 5 [default = 1e+38];
*
*
* Historical minimum loss
*
*/
public Builder clearMinimumLoss() {
bitField0_ = (bitField0_ & ~0x00000010);
minimumLoss_ = 1e+38F;
onChanged();
return this;
}
// optional int32 iter_last_event = 6 [default = 0];
private int iterLastEvent_ ;
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public boolean hasIterLastEvent() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public int getIterLastEvent() {
return iterLastEvent_;
}
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public Builder setIterLastEvent(int value) {
bitField0_ |= 0x00000020;
iterLastEvent_ = value;
onChanged();
return this;
}
/**
* optional int32 iter_last_event = 6 [default = 0];
*
*
* The iteration when last lr-update or min_loss-update happend
*
*/
public Builder clearIterLastEvent() {
bitField0_ = (bitField0_ & ~0x00000020);
iterLastEvent_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.SolverState)
}
static {
defaultInstance = new SolverState(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.SolverState)
}
public interface NetStateOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .caffe.Phase phase = 1 [default = TEST];
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
boolean hasPhase();
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
caffe.Caffe.Phase getPhase();
// optional int32 level = 2 [default = 0];
/**
* optional int32 level = 2 [default = 0];
*/
boolean hasLevel();
/**
* optional int32 level = 2 [default = 0];
*/
int getLevel();
// repeated string stage = 3;
/**
* repeated string stage = 3;
*/
java.util.List
getStageList();
/**
* repeated string stage = 3;
*/
int getStageCount();
/**
* repeated string stage = 3;
*/
java.lang.String getStage(int index);
/**
* repeated string stage = 3;
*/
com.google.protobuf.ByteString
getStageBytes(int index);
}
/**
* Protobuf type {@code caffe.NetState}
*/
public static final class NetState extends
com.google.protobuf.GeneratedMessage
implements NetStateOrBuilder {
// Use NetState.newBuilder() to construct.
private NetState(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private NetState(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final NetState defaultInstance;
public static NetState getDefaultInstance() {
return defaultInstance;
}
public NetState getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NetState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
caffe.Caffe.Phase value = caffe.Caffe.Phase.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
phase_ = value;
}
break;
}
case 16: {
bitField0_ |= 0x00000002;
level_ = input.readInt32();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
stage_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
stage_.add(input.readBytes());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
stage_ = new com.google.protobuf.UnmodifiableLazyStringList(stage_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetState_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetState.class, caffe.Caffe.NetState.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public NetState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NetState(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .caffe.Phase phase = 1 [default = TEST];
public static final int PHASE_FIELD_NUMBER = 1;
private caffe.Caffe.Phase phase_;
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
// optional int32 level = 2 [default = 0];
public static final int LEVEL_FIELD_NUMBER = 2;
private int level_;
/**
* optional int32 level = 2 [default = 0];
*/
public boolean hasLevel() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 level = 2 [default = 0];
*/
public int getLevel() {
return level_;
}
// repeated string stage = 3;
public static final int STAGE_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList stage_;
/**
* repeated string stage = 3;
*/
public java.util.List
getStageList() {
return stage_;
}
/**
* repeated string stage = 3;
*/
public int getStageCount() {
return stage_.size();
}
/**
* repeated string stage = 3;
*/
public java.lang.String getStage(int index) {
return stage_.get(index);
}
/**
* repeated string stage = 3;
*/
public com.google.protobuf.ByteString
getStageBytes(int index) {
return stage_.getByteString(index);
}
private void initFields() {
phase_ = caffe.Caffe.Phase.TEST;
level_ = 0;
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, phase_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, level_);
}
for (int i = 0; i < stage_.size(); i++) {
output.writeBytes(3, stage_.getByteString(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, phase_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, level_);
}
{
int dataSize = 0;
for (int i = 0; i < stage_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(stage_.getByteString(i));
}
size += dataSize;
size += 1 * getStageList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.NetState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetState parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetState parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.NetState parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetState parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.NetState prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.NetState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.NetStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetState_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetState.class, caffe.Caffe.NetState.Builder.class);
}
// Construct using caffe.Caffe.NetState.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
phase_ = caffe.Caffe.Phase.TEST;
bitField0_ = (bitField0_ & ~0x00000001);
level_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_NetState_descriptor;
}
public caffe.Caffe.NetState getDefaultInstanceForType() {
return caffe.Caffe.NetState.getDefaultInstance();
}
public caffe.Caffe.NetState build() {
caffe.Caffe.NetState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.NetState buildPartial() {
caffe.Caffe.NetState result = new caffe.Caffe.NetState(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.phase_ = phase_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.level_ = level_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
stage_ = new com.google.protobuf.UnmodifiableLazyStringList(
stage_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.stage_ = stage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.NetState) {
return mergeFrom((caffe.Caffe.NetState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.NetState other) {
if (other == caffe.Caffe.NetState.getDefaultInstance()) return this;
if (other.hasPhase()) {
setPhase(other.getPhase());
}
if (other.hasLevel()) {
setLevel(other.getLevel());
}
if (!other.stage_.isEmpty()) {
if (stage_.isEmpty()) {
stage_ = other.stage_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureStageIsMutable();
stage_.addAll(other.stage_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.NetState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.NetState) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .caffe.Phase phase = 1 [default = TEST];
private caffe.Caffe.Phase phase_ = caffe.Caffe.Phase.TEST;
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public Builder setPhase(caffe.Caffe.Phase value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
phase_ = value;
onChanged();
return this;
}
/**
* optional .caffe.Phase phase = 1 [default = TEST];
*/
public Builder clearPhase() {
bitField0_ = (bitField0_ & ~0x00000001);
phase_ = caffe.Caffe.Phase.TEST;
onChanged();
return this;
}
// optional int32 level = 2 [default = 0];
private int level_ ;
/**
* optional int32 level = 2 [default = 0];
*/
public boolean hasLevel() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 level = 2 [default = 0];
*/
public int getLevel() {
return level_;
}
/**
* optional int32 level = 2 [default = 0];
*/
public Builder setLevel(int value) {
bitField0_ |= 0x00000002;
level_ = value;
onChanged();
return this;
}
/**
* optional int32 level = 2 [default = 0];
*/
public Builder clearLevel() {
bitField0_ = (bitField0_ & ~0x00000002);
level_ = 0;
onChanged();
return this;
}
// repeated string stage = 3;
private com.google.protobuf.LazyStringList stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureStageIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
stage_ = new com.google.protobuf.LazyStringArrayList(stage_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated string stage = 3;
*/
public java.util.List
getStageList() {
return java.util.Collections.unmodifiableList(stage_);
}
/**
* repeated string stage = 3;
*/
public int getStageCount() {
return stage_.size();
}
/**
* repeated string stage = 3;
*/
public java.lang.String getStage(int index) {
return stage_.get(index);
}
/**
* repeated string stage = 3;
*/
public com.google.protobuf.ByteString
getStageBytes(int index) {
return stage_.getByteString(index);
}
/**
* repeated string stage = 3;
*/
public Builder setStage(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.set(index, value);
onChanged();
return this;
}
/**
* repeated string stage = 3;
*/
public Builder addStage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.add(value);
onChanged();
return this;
}
/**
* repeated string stage = 3;
*/
public Builder addAllStage(
java.lang.Iterable values) {
ensureStageIsMutable();
super.addAll(values, stage_);
onChanged();
return this;
}
/**
* repeated string stage = 3;
*/
public Builder clearStage() {
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* repeated string stage = 3;
*/
public Builder addStageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.add(value);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.NetState)
}
static {
defaultInstance = new NetState(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.NetState)
}
public interface NetStateRuleOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .caffe.Phase phase = 1;
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
boolean hasPhase();
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
caffe.Caffe.Phase getPhase();
// optional int32 min_level = 2;
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
boolean hasMinLevel();
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
int getMinLevel();
// optional int32 max_level = 3;
/**
* optional int32 max_level = 3;
*/
boolean hasMaxLevel();
/**
* optional int32 max_level = 3;
*/
int getMaxLevel();
// repeated string stage = 4;
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
java.util.List
getStageList();
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
int getStageCount();
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
java.lang.String getStage(int index);
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
com.google.protobuf.ByteString
getStageBytes(int index);
// repeated string not_stage = 5;
/**
* repeated string not_stage = 5;
*/
java.util.List
getNotStageList();
/**
* repeated string not_stage = 5;
*/
int getNotStageCount();
/**
* repeated string not_stage = 5;
*/
java.lang.String getNotStage(int index);
/**
* repeated string not_stage = 5;
*/
com.google.protobuf.ByteString
getNotStageBytes(int index);
}
/**
* Protobuf type {@code caffe.NetStateRule}
*/
public static final class NetStateRule extends
com.google.protobuf.GeneratedMessage
implements NetStateRuleOrBuilder {
// Use NetStateRule.newBuilder() to construct.
private NetStateRule(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private NetStateRule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final NetStateRule defaultInstance;
public static NetStateRule getDefaultInstance() {
return defaultInstance;
}
public NetStateRule getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NetStateRule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
caffe.Caffe.Phase value = caffe.Caffe.Phase.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
phase_ = value;
}
break;
}
case 16: {
bitField0_ |= 0x00000002;
minLevel_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
maxLevel_ = input.readInt32();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
stage_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
stage_.add(input.readBytes());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
notStage_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
notStage_.add(input.readBytes());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
stage_ = new com.google.protobuf.UnmodifiableLazyStringList(stage_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
notStage_ = new com.google.protobuf.UnmodifiableLazyStringList(notStage_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetStateRule_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetStateRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetStateRule.class, caffe.Caffe.NetStateRule.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public NetStateRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NetStateRule(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .caffe.Phase phase = 1;
public static final int PHASE_FIELD_NUMBER = 1;
private caffe.Caffe.Phase phase_;
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
// optional int32 min_level = 2;
public static final int MIN_LEVEL_FIELD_NUMBER = 2;
private int minLevel_;
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public boolean hasMinLevel() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public int getMinLevel() {
return minLevel_;
}
// optional int32 max_level = 3;
public static final int MAX_LEVEL_FIELD_NUMBER = 3;
private int maxLevel_;
/**
* optional int32 max_level = 3;
*/
public boolean hasMaxLevel() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 max_level = 3;
*/
public int getMaxLevel() {
return maxLevel_;
}
// repeated string stage = 4;
public static final int STAGE_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList stage_;
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public java.util.List
getStageList() {
return stage_;
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public int getStageCount() {
return stage_.size();
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public java.lang.String getStage(int index) {
return stage_.get(index);
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public com.google.protobuf.ByteString
getStageBytes(int index) {
return stage_.getByteString(index);
}
// repeated string not_stage = 5;
public static final int NOT_STAGE_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList notStage_;
/**
* repeated string not_stage = 5;
*/
public java.util.List
getNotStageList() {
return notStage_;
}
/**
* repeated string not_stage = 5;
*/
public int getNotStageCount() {
return notStage_.size();
}
/**
* repeated string not_stage = 5;
*/
public java.lang.String getNotStage(int index) {
return notStage_.get(index);
}
/**
* repeated string not_stage = 5;
*/
public com.google.protobuf.ByteString
getNotStageBytes(int index) {
return notStage_.getByteString(index);
}
private void initFields() {
phase_ = caffe.Caffe.Phase.TRAIN;
minLevel_ = 0;
maxLevel_ = 0;
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, phase_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, minLevel_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, maxLevel_);
}
for (int i = 0; i < stage_.size(); i++) {
output.writeBytes(4, stage_.getByteString(i));
}
for (int i = 0; i < notStage_.size(); i++) {
output.writeBytes(5, notStage_.getByteString(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, phase_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, minLevel_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, maxLevel_);
}
{
int dataSize = 0;
for (int i = 0; i < stage_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(stage_.getByteString(i));
}
size += dataSize;
size += 1 * getStageList().size();
}
{
int dataSize = 0;
for (int i = 0; i < notStage_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(notStage_.getByteString(i));
}
size += dataSize;
size += 1 * getNotStageList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.NetStateRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetStateRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetStateRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.NetStateRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.NetStateRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetStateRule parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetStateRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.NetStateRule parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.NetStateRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.NetStateRule parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.NetStateRule prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.NetStateRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.NetStateRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_NetStateRule_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_NetStateRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.NetStateRule.class, caffe.Caffe.NetStateRule.Builder.class);
}
// Construct using caffe.Caffe.NetStateRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
phase_ = caffe.Caffe.Phase.TRAIN;
bitField0_ = (bitField0_ & ~0x00000001);
minLevel_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
maxLevel_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_NetStateRule_descriptor;
}
public caffe.Caffe.NetStateRule getDefaultInstanceForType() {
return caffe.Caffe.NetStateRule.getDefaultInstance();
}
public caffe.Caffe.NetStateRule build() {
caffe.Caffe.NetStateRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.NetStateRule buildPartial() {
caffe.Caffe.NetStateRule result = new caffe.Caffe.NetStateRule(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.phase_ = phase_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.minLevel_ = minLevel_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.maxLevel_ = maxLevel_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
stage_ = new com.google.protobuf.UnmodifiableLazyStringList(
stage_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.stage_ = stage_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
notStage_ = new com.google.protobuf.UnmodifiableLazyStringList(
notStage_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.notStage_ = notStage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.NetStateRule) {
return mergeFrom((caffe.Caffe.NetStateRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.NetStateRule other) {
if (other == caffe.Caffe.NetStateRule.getDefaultInstance()) return this;
if (other.hasPhase()) {
setPhase(other.getPhase());
}
if (other.hasMinLevel()) {
setMinLevel(other.getMinLevel());
}
if (other.hasMaxLevel()) {
setMaxLevel(other.getMaxLevel());
}
if (!other.stage_.isEmpty()) {
if (stage_.isEmpty()) {
stage_ = other.stage_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureStageIsMutable();
stage_.addAll(other.stage_);
}
onChanged();
}
if (!other.notStage_.isEmpty()) {
if (notStage_.isEmpty()) {
notStage_ = other.notStage_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureNotStageIsMutable();
notStage_.addAll(other.notStage_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.NetStateRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.NetStateRule) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .caffe.Phase phase = 1;
private caffe.Caffe.Phase phase_ = caffe.Caffe.Phase.TRAIN;
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public Builder setPhase(caffe.Caffe.Phase value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
phase_ = value;
onChanged();
return this;
}
/**
* optional .caffe.Phase phase = 1;
*
*
* Set phase to require the NetState have a particular phase (TRAIN or TEST)
* to meet this rule.
*
*/
public Builder clearPhase() {
bitField0_ = (bitField0_ & ~0x00000001);
phase_ = caffe.Caffe.Phase.TRAIN;
onChanged();
return this;
}
// optional int32 min_level = 2;
private int minLevel_ ;
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public boolean hasMinLevel() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public int getMinLevel() {
return minLevel_;
}
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public Builder setMinLevel(int value) {
bitField0_ |= 0x00000002;
minLevel_ = value;
onChanged();
return this;
}
/**
* optional int32 min_level = 2;
*
*
* Set the minimum and/or maximum levels in which the layer should be used.
* Leave undefined to meet the rule regardless of level.
*
*/
public Builder clearMinLevel() {
bitField0_ = (bitField0_ & ~0x00000002);
minLevel_ = 0;
onChanged();
return this;
}
// optional int32 max_level = 3;
private int maxLevel_ ;
/**
* optional int32 max_level = 3;
*/
public boolean hasMaxLevel() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 max_level = 3;
*/
public int getMaxLevel() {
return maxLevel_;
}
/**
* optional int32 max_level = 3;
*/
public Builder setMaxLevel(int value) {
bitField0_ |= 0x00000004;
maxLevel_ = value;
onChanged();
return this;
}
/**
* optional int32 max_level = 3;
*/
public Builder clearMaxLevel() {
bitField0_ = (bitField0_ & ~0x00000004);
maxLevel_ = 0;
onChanged();
return this;
}
// repeated string stage = 4;
private com.google.protobuf.LazyStringList stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureStageIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
stage_ = new com.google.protobuf.LazyStringArrayList(stage_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public java.util.List
getStageList() {
return java.util.Collections.unmodifiableList(stage_);
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public int getStageCount() {
return stage_.size();
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public java.lang.String getStage(int index) {
return stage_.get(index);
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public com.google.protobuf.ByteString
getStageBytes(int index) {
return stage_.getByteString(index);
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public Builder setStage(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.set(index, value);
onChanged();
return this;
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public Builder addStage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.add(value);
onChanged();
return this;
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public Builder addAllStage(
java.lang.Iterable values) {
ensureStageIsMutable();
super.addAll(values, stage_);
onChanged();
return this;
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public Builder clearStage() {
stage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* repeated string stage = 4;
*
*
* Customizable sets of stages to include or exclude.
* The net must have ALL of the specified stages and NONE of the specified
* "not_stage"s to meet the rule.
* (Use multiple NetStateRules to specify conjunctions of stages.)
*
*/
public Builder addStageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStageIsMutable();
stage_.add(value);
onChanged();
return this;
}
// repeated string not_stage = 5;
private com.google.protobuf.LazyStringList notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNotStageIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
notStage_ = new com.google.protobuf.LazyStringArrayList(notStage_);
bitField0_ |= 0x00000010;
}
}
/**
* repeated string not_stage = 5;
*/
public java.util.List
getNotStageList() {
return java.util.Collections.unmodifiableList(notStage_);
}
/**
* repeated string not_stage = 5;
*/
public int getNotStageCount() {
return notStage_.size();
}
/**
* repeated string not_stage = 5;
*/
public java.lang.String getNotStage(int index) {
return notStage_.get(index);
}
/**
* repeated string not_stage = 5;
*/
public com.google.protobuf.ByteString
getNotStageBytes(int index) {
return notStage_.getByteString(index);
}
/**
* repeated string not_stage = 5;
*/
public Builder setNotStage(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotStageIsMutable();
notStage_.set(index, value);
onChanged();
return this;
}
/**
* repeated string not_stage = 5;
*/
public Builder addNotStage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotStageIsMutable();
notStage_.add(value);
onChanged();
return this;
}
/**
* repeated string not_stage = 5;
*/
public Builder addAllNotStage(
java.lang.Iterable values) {
ensureNotStageIsMutable();
super.addAll(values, notStage_);
onChanged();
return this;
}
/**
* repeated string not_stage = 5;
*/
public Builder clearNotStage() {
notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
* repeated string not_stage = 5;
*/
public Builder addNotStageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotStageIsMutable();
notStage_.add(value);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.NetStateRule)
}
static {
defaultInstance = new NetStateRule(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.NetStateRule)
}
public interface ParamSpecOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string name = 1;
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
boolean hasName();
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
java.lang.String getName();
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
com.google.protobuf.ByteString
getNameBytes();
// optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
boolean hasShareMode();
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
caffe.Caffe.ParamSpec.DimCheckMode getShareMode();
// optional float lr_mult = 3 [default = 1];
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
boolean hasLrMult();
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
float getLrMult();
// optional float decay_mult = 4 [default = 1];
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
boolean hasDecayMult();
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
float getDecayMult();
}
/**
* Protobuf type {@code caffe.ParamSpec}
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public static final class ParamSpec extends
com.google.protobuf.GeneratedMessage
implements ParamSpecOrBuilder {
// Use ParamSpec.newBuilder() to construct.
private ParamSpec(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private ParamSpec(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final ParamSpec defaultInstance;
public static ParamSpec getDefaultInstance() {
return defaultInstance;
}
public ParamSpec getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ParamSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
name_ = input.readBytes();
break;
}
case 16: {
int rawValue = input.readEnum();
caffe.Caffe.ParamSpec.DimCheckMode value = caffe.Caffe.ParamSpec.DimCheckMode.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(2, rawValue);
} else {
bitField0_ |= 0x00000002;
shareMode_ = value;
}
break;
}
case 29: {
bitField0_ |= 0x00000004;
lrMult_ = input.readFloat();
break;
}
case 37: {
bitField0_ |= 0x00000008;
decayMult_ = input.readFloat();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_ParamSpec_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_ParamSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.ParamSpec.class, caffe.Caffe.ParamSpec.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public ParamSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ParamSpec(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code caffe.ParamSpec.DimCheckMode}
*/
public enum DimCheckMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STRICT = 0;
*
*
* STRICT (default) requires that num, channels, height, width each match.
*
*/
STRICT(0, 0),
/**
* PERMISSIVE = 1;
*
*
* PERMISSIVE requires only the count (num*channels*height*width) to match.
*
*/
PERMISSIVE(1, 1),
;
/**
* STRICT = 0;
*
*
* STRICT (default) requires that num, channels, height, width each match.
*
*/
public static final int STRICT_VALUE = 0;
/**
* PERMISSIVE = 1;
*
*
* PERMISSIVE requires only the count (num*channels*height*width) to match.
*
*/
public static final int PERMISSIVE_VALUE = 1;
public final int getNumber() { return value; }
public static DimCheckMode valueOf(int value) {
switch (value) {
case 0: return STRICT;
case 1: return PERMISSIVE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public DimCheckMode findValueByNumber(int number) {
return DimCheckMode.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return caffe.Caffe.ParamSpec.getDescriptor().getEnumTypes().get(0);
}
private static final DimCheckMode[] VALUES = values();
public static DimCheckMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private DimCheckMode(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:caffe.ParamSpec.DimCheckMode)
}
private int bitField0_;
// optional string name = 1;
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.Object name_;
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
public static final int SHARE_MODE_FIELD_NUMBER = 2;
private caffe.Caffe.ParamSpec.DimCheckMode shareMode_;
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public boolean hasShareMode() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public caffe.Caffe.ParamSpec.DimCheckMode getShareMode() {
return shareMode_;
}
// optional float lr_mult = 3 [default = 1];
public static final int LR_MULT_FIELD_NUMBER = 3;
private float lrMult_;
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public boolean hasLrMult() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public float getLrMult() {
return lrMult_;
}
// optional float decay_mult = 4 [default = 1];
public static final int DECAY_MULT_FIELD_NUMBER = 4;
private float decayMult_;
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public boolean hasDecayMult() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public float getDecayMult() {
return decayMult_;
}
private void initFields() {
name_ = "";
shareMode_ = caffe.Caffe.ParamSpec.DimCheckMode.STRICT;
lrMult_ = 1F;
decayMult_ = 1F;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getNameBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeEnum(2, shareMode_.getNumber());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeFloat(3, lrMult_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeFloat(4, decayMult_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getNameBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, shareMode_.getNumber());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, lrMult_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(4, decayMult_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static caffe.Caffe.ParamSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.ParamSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.ParamSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.ParamSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.ParamSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.ParamSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.ParamSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.ParamSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.ParamSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.ParamSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(caffe.Caffe.ParamSpec prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code caffe.ParamSpec}
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.ParamSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_ParamSpec_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_ParamSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.ParamSpec.class, caffe.Caffe.ParamSpec.Builder.class);
}
// Construct using caffe.Caffe.ParamSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
shareMode_ = caffe.Caffe.ParamSpec.DimCheckMode.STRICT;
bitField0_ = (bitField0_ & ~0x00000002);
lrMult_ = 1F;
bitField0_ = (bitField0_ & ~0x00000004);
decayMult_ = 1F;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_ParamSpec_descriptor;
}
public caffe.Caffe.ParamSpec getDefaultInstanceForType() {
return caffe.Caffe.ParamSpec.getDefaultInstance();
}
public caffe.Caffe.ParamSpec build() {
caffe.Caffe.ParamSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.ParamSpec buildPartial() {
caffe.Caffe.ParamSpec result = new caffe.Caffe.ParamSpec(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.shareMode_ = shareMode_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.lrMult_ = lrMult_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.decayMult_ = decayMult_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.ParamSpec) {
return mergeFrom((caffe.Caffe.ParamSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.ParamSpec other) {
if (other == caffe.Caffe.ParamSpec.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasShareMode()) {
setShareMode(other.getShareMode());
}
if (other.hasLrMult()) {
setLrMult(other.getLrMult());
}
if (other.hasDecayMult()) {
setDecayMult(other.getDecayMult());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
caffe.Caffe.ParamSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.ParamSpec) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string name = 1;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
*
*
* The names of the parameter blobs -- useful for sharing parameters among
* layers, but never required otherwise. To share a parameter between two
* layers, give it a (non-empty) name.
*
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
// optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
private caffe.Caffe.ParamSpec.DimCheckMode shareMode_ = caffe.Caffe.ParamSpec.DimCheckMode.STRICT;
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public boolean hasShareMode() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public caffe.Caffe.ParamSpec.DimCheckMode getShareMode() {
return shareMode_;
}
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public Builder setShareMode(caffe.Caffe.ParamSpec.DimCheckMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
shareMode_ = value;
onChanged();
return this;
}
/**
* optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
*
*
* Whether to require shared weights to have the same shape, or just the same
* count -- defaults to STRICT if unspecified.
*
*/
public Builder clearShareMode() {
bitField0_ = (bitField0_ & ~0x00000002);
shareMode_ = caffe.Caffe.ParamSpec.DimCheckMode.STRICT;
onChanged();
return this;
}
// optional float lr_mult = 3 [default = 1];
private float lrMult_ = 1F;
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public boolean hasLrMult() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public float getLrMult() {
return lrMult_;
}
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public Builder setLrMult(float value) {
bitField0_ |= 0x00000004;
lrMult_ = value;
onChanged();
return this;
}
/**
* optional float lr_mult = 3 [default = 1];
*
*
* The multiplier on the global learning rate for this parameter.
*
*/
public Builder clearLrMult() {
bitField0_ = (bitField0_ & ~0x00000004);
lrMult_ = 1F;
onChanged();
return this;
}
// optional float decay_mult = 4 [default = 1];
private float decayMult_ = 1F;
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public boolean hasDecayMult() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public float getDecayMult() {
return decayMult_;
}
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public Builder setDecayMult(float value) {
bitField0_ |= 0x00000008;
decayMult_ = value;
onChanged();
return this;
}
/**
* optional float decay_mult = 4 [default = 1];
*
*
* The multiplier on the global weight decay for this parameter.
*
*/
public Builder clearDecayMult() {
bitField0_ = (bitField0_ & ~0x00000008);
decayMult_ = 1F;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:caffe.ParamSpec)
}
static {
defaultInstance = new ParamSpec(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:caffe.ParamSpec)
}
public interface LayerParameterOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string name = 1;
/**
* optional string name = 1;
*
*
* the layer name
*
*/
boolean hasName();
/**
* optional string name = 1;
*
*
* the layer name
*
*/
java.lang.String getName();
/**
* optional string name = 1;
*
*
* the layer name
*
*/
com.google.protobuf.ByteString
getNameBytes();
// optional string type = 2;
/**
* optional string type = 2;
*
*
* the layer type
*
*/
boolean hasType();
/**
* optional string type = 2;
*
*
* the layer type
*
*/
java.lang.String getType();
/**
* optional string type = 2;
*
*
* the layer type
*
*/
com.google.protobuf.ByteString
getTypeBytes();
// repeated string bottom = 3;
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
java.util.List
getBottomList();
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
int getBottomCount();
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
java.lang.String getBottom(int index);
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
com.google.protobuf.ByteString
getBottomBytes(int index);
// repeated string top = 4;
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
java.util.List
getTopList();
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
int getTopCount();
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
java.lang.String getTop(int index);
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
com.google.protobuf.ByteString
getTopBytes(int index);
// optional .caffe.Phase phase = 10;
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
boolean hasPhase();
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
caffe.Caffe.Phase getPhase();
// repeated float loss_weight = 5;
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
java.util.List getLossWeightList();
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
int getLossWeightCount();
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
float getLossWeight(int index);
// repeated .caffe.ParamSpec param = 6;
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
java.util.List
getParamList();
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
caffe.Caffe.ParamSpec getParam(int index);
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
int getParamCount();
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
java.util.List extends caffe.Caffe.ParamSpecOrBuilder>
getParamOrBuilderList();
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
caffe.Caffe.ParamSpecOrBuilder getParamOrBuilder(
int index);
// repeated .caffe.BlobProto blobs = 7;
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
java.util.List
getBlobsList();
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
caffe.Caffe.BlobProto getBlobs(int index);
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
int getBlobsCount();
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getBlobsOrBuilderList();
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder(
int index);
// repeated bool propagate_down = 11;
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
java.util.List getPropagateDownList();
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
int getPropagateDownCount();
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
boolean getPropagateDown(int index);
// repeated .caffe.NetStateRule include = 8;
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
java.util.List
getIncludeList();
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
caffe.Caffe.NetStateRule getInclude(int index);
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
int getIncludeCount();
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
java.util.List extends caffe.Caffe.NetStateRuleOrBuilder>
getIncludeOrBuilderList();
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder(
int index);
// repeated .caffe.NetStateRule exclude = 9;
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
java.util.List
getExcludeList();
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
caffe.Caffe.NetStateRule getExclude(int index);
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
int getExcludeCount();
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
java.util.List extends caffe.Caffe.NetStateRuleOrBuilder>
getExcludeOrBuilderList();
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder(
int index);
// optional .caffe.TransformationParameter transform_param = 100;
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
boolean hasTransformParam();
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
caffe.Caffe.TransformationParameter getTransformParam();
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder();
// optional .caffe.LossParameter loss_param = 101;
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
boolean hasLossParam();
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
caffe.Caffe.LossParameter getLossParam();
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder();
// optional .caffe.AccuracyParameter accuracy_param = 102;
/**
* optional .caffe.AccuracyParameter accuracy_param = 102;
*
*
* Layer type-specific parameters.
*
* Note: certain layers may have more than one computational engine
* for their implementation. These layers include an Engine type and
* engine parameter for selecting the implementation.
* The default for the engine is set by the ENGINE switch at compile-time.
*
*/
boolean hasAccuracyParam();
/**
* optional .caffe.AccuracyParameter accuracy_param = 102;
*
*
* Layer type-specific parameters.
*
* Note: certain layers may have more than one computational engine
* for their implementation. These layers include an Engine type and
* engine parameter for selecting the implementation.
* The default for the engine is set by the ENGINE switch at compile-time.
*
*/
caffe.Caffe.AccuracyParameter getAccuracyParam();
/**
* optional .caffe.AccuracyParameter accuracy_param = 102;
*
*
* Layer type-specific parameters.
*
* Note: certain layers may have more than one computational engine
* for their implementation. These layers include an Engine type and
* engine parameter for selecting the implementation.
* The default for the engine is set by the ENGINE switch at compile-time.
*
*/
caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder();
// optional .caffe.ArgMaxParameter argmax_param = 103;
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
boolean hasArgmaxParam();
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
caffe.Caffe.ArgMaxParameter getArgmaxParam();
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder();
// optional .caffe.BatchNormParameter batch_norm_param = 139;
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
boolean hasBatchNormParam();
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
caffe.Caffe.BatchNormParameter getBatchNormParam();
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
caffe.Caffe.BatchNormParameterOrBuilder getBatchNormParamOrBuilder();
// optional .caffe.BiasParameter bias_param = 141;
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
boolean hasBiasParam();
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
caffe.Caffe.BiasParameter getBiasParam();
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
caffe.Caffe.BiasParameterOrBuilder getBiasParamOrBuilder();
// optional .caffe.ConcatParameter concat_param = 104;
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
boolean hasConcatParam();
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
caffe.Caffe.ConcatParameter getConcatParam();
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder();
// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
boolean hasContrastiveLossParam();
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam();
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder();
// optional .caffe.ConvolutionParameter convolution_param = 106;
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
boolean hasConvolutionParam();
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
caffe.Caffe.ConvolutionParameter getConvolutionParam();
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder();
// optional .caffe.CropParameter crop_param = 144;
/**
* optional .caffe.CropParameter crop_param = 144;
*/
boolean hasCropParam();
/**
* optional .caffe.CropParameter crop_param = 144;
*/
caffe.Caffe.CropParameter getCropParam();
/**
* optional .caffe.CropParameter crop_param = 144;
*/
caffe.Caffe.CropParameterOrBuilder getCropParamOrBuilder();
// optional .caffe.DataParameter data_param = 107;
/**
* optional .caffe.DataParameter data_param = 107;
*/
boolean hasDataParam();
/**
* optional .caffe.DataParameter data_param = 107;
*/
caffe.Caffe.DataParameter getDataParam();
/**
* optional .caffe.DataParameter data_param = 107;
*/
caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder();
// optional .caffe.DropoutParameter dropout_param = 108;
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
boolean hasDropoutParam();
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
caffe.Caffe.DropoutParameter getDropoutParam();
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder();
// optional .caffe.DummyDataParameter dummy_data_param = 109;
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
boolean hasDummyDataParam();
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
caffe.Caffe.DummyDataParameter getDummyDataParam();
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder();
// optional .caffe.EltwiseParameter eltwise_param = 110;
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
boolean hasEltwiseParam();
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
caffe.Caffe.EltwiseParameter getEltwiseParam();
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder();
// optional .caffe.ELUParameter elu_param = 140;
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
boolean hasEluParam();
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
caffe.Caffe.ELUParameter getEluParam();
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
caffe.Caffe.ELUParameterOrBuilder getEluParamOrBuilder();
// optional .caffe.EmbedParameter embed_param = 137;
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
boolean hasEmbedParam();
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
caffe.Caffe.EmbedParameter getEmbedParam();
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder();
// optional .caffe.ExpParameter exp_param = 111;
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
boolean hasExpParam();
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
caffe.Caffe.ExpParameter getExpParam();
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder();
// optional .caffe.FlattenParameter flatten_param = 135;
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
boolean hasFlattenParam();
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
caffe.Caffe.FlattenParameter getFlattenParam();
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder();
// optional .caffe.HDF5DataParameter hdf5_data_param = 112;
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
boolean hasHdf5DataParam();
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
caffe.Caffe.HDF5DataParameter getHdf5DataParam();
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder();
// optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
boolean hasHdf5OutputParam();
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
caffe.Caffe.HDF5OutputParameter getHdf5OutputParam();
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder();
// optional .caffe.HingeLossParameter hinge_loss_param = 114;
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
boolean hasHingeLossParam();
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
caffe.Caffe.HingeLossParameter getHingeLossParam();
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder();
// optional .caffe.ImageDataParameter image_data_param = 115;
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
boolean hasImageDataParam();
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
caffe.Caffe.ImageDataParameter getImageDataParam();
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder();
// optional .caffe.InfogainLossParameter infogain_loss_param = 116;
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
boolean hasInfogainLossParam();
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
caffe.Caffe.InfogainLossParameter getInfogainLossParam();
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder();
// optional .caffe.InnerProductParameter inner_product_param = 117;
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
boolean hasInnerProductParam();
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
caffe.Caffe.InnerProductParameter getInnerProductParam();
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder();
// optional .caffe.InputParameter input_param = 143;
/**
* optional .caffe.InputParameter input_param = 143;
*/
boolean hasInputParam();
/**
* optional .caffe.InputParameter input_param = 143;
*/
caffe.Caffe.InputParameter getInputParam();
/**
* optional .caffe.InputParameter input_param = 143;
*/
caffe.Caffe.InputParameterOrBuilder getInputParamOrBuilder();
// optional .caffe.LogParameter log_param = 134;
/**
* optional .caffe.LogParameter log_param = 134;
*/
boolean hasLogParam();
/**
* optional .caffe.LogParameter log_param = 134;
*/
caffe.Caffe.LogParameter getLogParam();
/**
* optional .caffe.LogParameter log_param = 134;
*/
caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder();
// optional .caffe.LRNParameter lrn_param = 118;
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
boolean hasLrnParam();
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
caffe.Caffe.LRNParameter getLrnParam();
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder();
// optional .caffe.MemoryDataParameter memory_data_param = 119;
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
boolean hasMemoryDataParam();
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
caffe.Caffe.MemoryDataParameter getMemoryDataParam();
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder();
// optional .caffe.MVNParameter mvn_param = 120;
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
boolean hasMvnParam();
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
caffe.Caffe.MVNParameter getMvnParam();
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder();
// optional .caffe.ParameterParameter parameter_param = 145;
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
boolean hasParameterParam();
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
caffe.Caffe.ParameterParameter getParameterParam();
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
caffe.Caffe.ParameterParameterOrBuilder getParameterParamOrBuilder();
// optional .caffe.PoolingParameter pooling_param = 121;
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
boolean hasPoolingParam();
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
caffe.Caffe.PoolingParameter getPoolingParam();
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder();
// optional .caffe.PowerParameter power_param = 122;
/**
* optional .caffe.PowerParameter power_param = 122;
*/
boolean hasPowerParam();
/**
* optional .caffe.PowerParameter power_param = 122;
*/
caffe.Caffe.PowerParameter getPowerParam();
/**
* optional .caffe.PowerParameter power_param = 122;
*/
caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder();
// optional .caffe.PReLUParameter prelu_param = 131;
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
boolean hasPreluParam();
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
caffe.Caffe.PReLUParameter getPreluParam();
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder();
// optional .caffe.PythonParameter python_param = 130;
/**
* optional .caffe.PythonParameter python_param = 130;
*/
boolean hasPythonParam();
/**
* optional .caffe.PythonParameter python_param = 130;
*/
caffe.Caffe.PythonParameter getPythonParam();
/**
* optional .caffe.PythonParameter python_param = 130;
*/
caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder();
// optional .caffe.RecurrentParameter recurrent_param = 146;
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
boolean hasRecurrentParam();
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
caffe.Caffe.RecurrentParameter getRecurrentParam();
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
caffe.Caffe.RecurrentParameterOrBuilder getRecurrentParamOrBuilder();
// optional .caffe.ReductionParameter reduction_param = 136;
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
boolean hasReductionParam();
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
caffe.Caffe.ReductionParameter getReductionParam();
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder();
// optional .caffe.ReLUParameter relu_param = 123;
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
boolean hasReluParam();
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
caffe.Caffe.ReLUParameter getReluParam();
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder();
// optional .caffe.ReshapeParameter reshape_param = 133;
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
boolean hasReshapeParam();
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
caffe.Caffe.ReshapeParameter getReshapeParam();
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder();
// optional .caffe.ScaleParameter scale_param = 142;
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
boolean hasScaleParam();
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
caffe.Caffe.ScaleParameter getScaleParam();
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
caffe.Caffe.ScaleParameterOrBuilder getScaleParamOrBuilder();
// optional .caffe.SigmoidParameter sigmoid_param = 124;
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
boolean hasSigmoidParam();
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
caffe.Caffe.SigmoidParameter getSigmoidParam();
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder();
// optional .caffe.SoftmaxParameter softmax_param = 125;
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
boolean hasSoftmaxParam();
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
caffe.Caffe.SoftmaxParameter getSoftmaxParam();
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder();
// optional .caffe.SPPParameter spp_param = 132;
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
boolean hasSppParam();
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
caffe.Caffe.SPPParameter getSppParam();
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder();
// optional .caffe.SliceParameter slice_param = 126;
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
boolean hasSliceParam();
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
caffe.Caffe.SliceParameter getSliceParam();
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder();
// optional .caffe.TanHParameter tanh_param = 127;
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
boolean hasTanhParam();
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
caffe.Caffe.TanHParameter getTanhParam();
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder();
// optional .caffe.ThresholdParameter threshold_param = 128;
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
boolean hasThresholdParam();
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
caffe.Caffe.ThresholdParameter getThresholdParam();
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder();
// optional .caffe.TileParameter tile_param = 138;
/**
* optional .caffe.TileParameter tile_param = 138;
*/
boolean hasTileParam();
/**
* optional .caffe.TileParameter tile_param = 138;
*/
caffe.Caffe.TileParameter getTileParam();
/**
* optional .caffe.TileParameter tile_param = 138;
*/
caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder();
// optional .caffe.WindowDataParameter window_data_param = 129;
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
boolean hasWindowDataParam();
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
caffe.Caffe.WindowDataParameter getWindowDataParam();
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder();
// optional .caffe.ROIPoolingParameter roi_pooling_param = 8266711;
/**
* optional .caffe.ROIPoolingParameter roi_pooling_param = 8266711;
*/
boolean hasRoiPoolingParam();
/**
* optional .caffe.ROIPoolingParameter roi_pooling_param = 8266711;
*/
caffe.Caffe.ROIPoolingParameter getRoiPoolingParam();
/**
* optional .caffe.ROIPoolingParameter roi_pooling_param = 8266711;
*/
caffe.Caffe.ROIPoolingParameterOrBuilder getRoiPoolingParamOrBuilder();
// optional .caffe.SmoothL1LossParameter smooth_l1_loss_param = 8266712;
/**
* optional .caffe.SmoothL1LossParameter smooth_l1_loss_param = 8266712;
*/
boolean hasSmoothL1LossParam();
/**
* optional .caffe.SmoothL1LossParameter smooth_l1_loss_param = 8266712;
*/
caffe.Caffe.SmoothL1LossParameter getSmoothL1LossParam();
/**
* optional .caffe.SmoothL1LossParameter smooth_l1_loss_param = 8266712;
*/
caffe.Caffe.SmoothL1LossParameterOrBuilder getSmoothL1LossParamOrBuilder();
// optional .caffe.ProposalParameter proposal_param = 8266713;
/**
* optional .caffe.ProposalParameter proposal_param = 8266713;
*/
boolean hasProposalParam();
/**
* optional .caffe.ProposalParameter proposal_param = 8266713;
*/
caffe.Caffe.ProposalParameter getProposalParam();
/**
* optional .caffe.ProposalParameter proposal_param = 8266713;
*/
caffe.Caffe.ProposalParameterOrBuilder getProposalParamOrBuilder();
}
/**
* Protobuf type {@code caffe.LayerParameter}
*
*
* NOTE
* Update the next available ID when you add a new LayerParameter field.
*
* LayerParameter next available layer-specific ID: 147 (last added: recurrent_param)
*
*/
public static final class LayerParameter extends
com.google.protobuf.GeneratedMessage
implements LayerParameterOrBuilder {
// Use LayerParameter.newBuilder() to construct.
private LayerParameter(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private LayerParameter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final LayerParameter defaultInstance;
public static LayerParameter getDefaultInstance() {
return defaultInstance;
}
public LayerParameter getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LayerParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
int mutable_bitField1_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
name_ = input.readBytes();
break;
}
case 18: {
bitField0_ |= 0x00000002;
type_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
bottom_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
bottom_.add(input.readBytes());
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
top_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
top_.add(input.readBytes());
break;
}
case 45: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
lossWeight_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
lossWeight_.add(input.readFloat());
break;
}
case 42: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
lossWeight_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
lossWeight_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
param_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
param_.add(input.readMessage(caffe.Caffe.ParamSpec.PARSER, extensionRegistry));
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
blobs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
blobs_.add(input.readMessage(caffe.Caffe.BlobProto.PARSER, extensionRegistry));
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
include_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
include_.add(input.readMessage(caffe.Caffe.NetStateRule.PARSER, extensionRegistry));
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
exclude_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
exclude_.add(input.readMessage(caffe.Caffe.NetStateRule.PARSER, extensionRegistry));
break;
}
case 80: {
int rawValue = input.readEnum();
caffe.Caffe.Phase value = caffe.Caffe.Phase.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(10, rawValue);
} else {
bitField0_ |= 0x00000004;
phase_ = value;
}
break;
}
case 88: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
propagateDown_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
propagateDown_.add(input.readBool());
break;
}
case 90: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) {
propagateDown_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
while (input.getBytesUntilLimit() > 0) {
propagateDown_.add(input.readBool());
}
input.popLimit(limit);
break;
}
case 802: {
caffe.Caffe.TransformationParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = transformParam_.toBuilder();
}
transformParam_ = input.readMessage(caffe.Caffe.TransformationParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(transformParam_);
transformParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 810: {
caffe.Caffe.LossParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = lossParam_.toBuilder();
}
lossParam_ = input.readMessage(caffe.Caffe.LossParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(lossParam_);
lossParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
case 818: {
caffe.Caffe.AccuracyParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
subBuilder = accuracyParam_.toBuilder();
}
accuracyParam_ = input.readMessage(caffe.Caffe.AccuracyParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(accuracyParam_);
accuracyParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000020;
break;
}
case 826: {
caffe.Caffe.ArgMaxParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
subBuilder = argmaxParam_.toBuilder();
}
argmaxParam_ = input.readMessage(caffe.Caffe.ArgMaxParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(argmaxParam_);
argmaxParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000040;
break;
}
case 834: {
caffe.Caffe.ConcatParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000200) == 0x00000200)) {
subBuilder = concatParam_.toBuilder();
}
concatParam_ = input.readMessage(caffe.Caffe.ConcatParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(concatParam_);
concatParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000200;
break;
}
case 842: {
caffe.Caffe.ContrastiveLossParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000400) == 0x00000400)) {
subBuilder = contrastiveLossParam_.toBuilder();
}
contrastiveLossParam_ = input.readMessage(caffe.Caffe.ContrastiveLossParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(contrastiveLossParam_);
contrastiveLossParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000400;
break;
}
case 850: {
caffe.Caffe.ConvolutionParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000800) == 0x00000800)) {
subBuilder = convolutionParam_.toBuilder();
}
convolutionParam_ = input.readMessage(caffe.Caffe.ConvolutionParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(convolutionParam_);
convolutionParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000800;
break;
}
case 858: {
caffe.Caffe.DataParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00002000) == 0x00002000)) {
subBuilder = dataParam_.toBuilder();
}
dataParam_ = input.readMessage(caffe.Caffe.DataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dataParam_);
dataParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00002000;
break;
}
case 866: {
caffe.Caffe.DropoutParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00004000) == 0x00004000)) {
subBuilder = dropoutParam_.toBuilder();
}
dropoutParam_ = input.readMessage(caffe.Caffe.DropoutParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dropoutParam_);
dropoutParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00004000;
break;
}
case 874: {
caffe.Caffe.DummyDataParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00008000) == 0x00008000)) {
subBuilder = dummyDataParam_.toBuilder();
}
dummyDataParam_ = input.readMessage(caffe.Caffe.DummyDataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dummyDataParam_);
dummyDataParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00008000;
break;
}
case 882: {
caffe.Caffe.EltwiseParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00010000) == 0x00010000)) {
subBuilder = eltwiseParam_.toBuilder();
}
eltwiseParam_ = input.readMessage(caffe.Caffe.EltwiseParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(eltwiseParam_);
eltwiseParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00010000;
break;
}
case 890: {
caffe.Caffe.ExpParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00080000) == 0x00080000)) {
subBuilder = expParam_.toBuilder();
}
expParam_ = input.readMessage(caffe.Caffe.ExpParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(expParam_);
expParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00080000;
break;
}
case 898: {
caffe.Caffe.HDF5DataParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00200000) == 0x00200000)) {
subBuilder = hdf5DataParam_.toBuilder();
}
hdf5DataParam_ = input.readMessage(caffe.Caffe.HDF5DataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hdf5DataParam_);
hdf5DataParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00200000;
break;
}
case 906: {
caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00400000) == 0x00400000)) {
subBuilder = hdf5OutputParam_.toBuilder();
}
hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hdf5OutputParam_);
hdf5OutputParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00400000;
break;
}
case 914: {
caffe.Caffe.HingeLossParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00800000) == 0x00800000)) {
subBuilder = hingeLossParam_.toBuilder();
}
hingeLossParam_ = input.readMessage(caffe.Caffe.HingeLossParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hingeLossParam_);
hingeLossParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00800000;
break;
}
case 922: {
caffe.Caffe.ImageDataParameter.Builder subBuilder = null;
if (((bitField0_ & 0x01000000) == 0x01000000)) {
subBuilder = imageDataParam_.toBuilder();
}
imageDataParam_ = input.readMessage(caffe.Caffe.ImageDataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(imageDataParam_);
imageDataParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x01000000;
break;
}
case 930: {
caffe.Caffe.InfogainLossParameter.Builder subBuilder = null;
if (((bitField0_ & 0x02000000) == 0x02000000)) {
subBuilder = infogainLossParam_.toBuilder();
}
infogainLossParam_ = input.readMessage(caffe.Caffe.InfogainLossParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(infogainLossParam_);
infogainLossParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x02000000;
break;
}
case 938: {
caffe.Caffe.InnerProductParameter.Builder subBuilder = null;
if (((bitField0_ & 0x04000000) == 0x04000000)) {
subBuilder = innerProductParam_.toBuilder();
}
innerProductParam_ = input.readMessage(caffe.Caffe.InnerProductParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(innerProductParam_);
innerProductParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x04000000;
break;
}
case 946: {
caffe.Caffe.LRNParameter.Builder subBuilder = null;
if (((bitField0_ & 0x20000000) == 0x20000000)) {
subBuilder = lrnParam_.toBuilder();
}
lrnParam_ = input.readMessage(caffe.Caffe.LRNParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(lrnParam_);
lrnParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x20000000;
break;
}
case 954: {
caffe.Caffe.MemoryDataParameter.Builder subBuilder = null;
if (((bitField0_ & 0x40000000) == 0x40000000)) {
subBuilder = memoryDataParam_.toBuilder();
}
memoryDataParam_ = input.readMessage(caffe.Caffe.MemoryDataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(memoryDataParam_);
memoryDataParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x40000000;
break;
}
case 962: {
caffe.Caffe.MVNParameter.Builder subBuilder = null;
if (((bitField0_ & 0x80000000) == 0x80000000)) {
subBuilder = mvnParam_.toBuilder();
}
mvnParam_ = input.readMessage(caffe.Caffe.MVNParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(mvnParam_);
mvnParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x80000000;
break;
}
case 970: {
caffe.Caffe.PoolingParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000002) == 0x00000002)) {
subBuilder = poolingParam_.toBuilder();
}
poolingParam_ = input.readMessage(caffe.Caffe.PoolingParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(poolingParam_);
poolingParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000002;
break;
}
case 978: {
caffe.Caffe.PowerParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000004) == 0x00000004)) {
subBuilder = powerParam_.toBuilder();
}
powerParam_ = input.readMessage(caffe.Caffe.PowerParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(powerParam_);
powerParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000004;
break;
}
case 986: {
caffe.Caffe.ReLUParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000080) == 0x00000080)) {
subBuilder = reluParam_.toBuilder();
}
reluParam_ = input.readMessage(caffe.Caffe.ReLUParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(reluParam_);
reluParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000080;
break;
}
case 994: {
caffe.Caffe.SigmoidParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000400) == 0x00000400)) {
subBuilder = sigmoidParam_.toBuilder();
}
sigmoidParam_ = input.readMessage(caffe.Caffe.SigmoidParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sigmoidParam_);
sigmoidParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000400;
break;
}
case 1002: {
caffe.Caffe.SoftmaxParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000800) == 0x00000800)) {
subBuilder = softmaxParam_.toBuilder();
}
softmaxParam_ = input.readMessage(caffe.Caffe.SoftmaxParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(softmaxParam_);
softmaxParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000800;
break;
}
case 1010: {
caffe.Caffe.SliceParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00002000) == 0x00002000)) {
subBuilder = sliceParam_.toBuilder();
}
sliceParam_ = input.readMessage(caffe.Caffe.SliceParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sliceParam_);
sliceParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00002000;
break;
}
case 1018: {
caffe.Caffe.TanHParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00004000) == 0x00004000)) {
subBuilder = tanhParam_.toBuilder();
}
tanhParam_ = input.readMessage(caffe.Caffe.TanHParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tanhParam_);
tanhParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00004000;
break;
}
case 1026: {
caffe.Caffe.ThresholdParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00008000) == 0x00008000)) {
subBuilder = thresholdParam_.toBuilder();
}
thresholdParam_ = input.readMessage(caffe.Caffe.ThresholdParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(thresholdParam_);
thresholdParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00008000;
break;
}
case 1034: {
caffe.Caffe.WindowDataParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00020000) == 0x00020000)) {
subBuilder = windowDataParam_.toBuilder();
}
windowDataParam_ = input.readMessage(caffe.Caffe.WindowDataParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(windowDataParam_);
windowDataParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00020000;
break;
}
case 1042: {
caffe.Caffe.PythonParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000010) == 0x00000010)) {
subBuilder = pythonParam_.toBuilder();
}
pythonParam_ = input.readMessage(caffe.Caffe.PythonParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(pythonParam_);
pythonParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000010;
break;
}
case 1050: {
caffe.Caffe.PReLUParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000008) == 0x00000008)) {
subBuilder = preluParam_.toBuilder();
}
preluParam_ = input.readMessage(caffe.Caffe.PReLUParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(preluParam_);
preluParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000008;
break;
}
case 1058: {
caffe.Caffe.SPPParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00001000) == 0x00001000)) {
subBuilder = sppParam_.toBuilder();
}
sppParam_ = input.readMessage(caffe.Caffe.SPPParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sppParam_);
sppParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00001000;
break;
}
case 1066: {
caffe.Caffe.ReshapeParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000100) == 0x00000100)) {
subBuilder = reshapeParam_.toBuilder();
}
reshapeParam_ = input.readMessage(caffe.Caffe.ReshapeParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(reshapeParam_);
reshapeParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000100;
break;
}
case 1074: {
caffe.Caffe.LogParameter.Builder subBuilder = null;
if (((bitField0_ & 0x10000000) == 0x10000000)) {
subBuilder = logParam_.toBuilder();
}
logParam_ = input.readMessage(caffe.Caffe.LogParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(logParam_);
logParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x10000000;
break;
}
case 1082: {
caffe.Caffe.FlattenParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00100000) == 0x00100000)) {
subBuilder = flattenParam_.toBuilder();
}
flattenParam_ = input.readMessage(caffe.Caffe.FlattenParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(flattenParam_);
flattenParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00100000;
break;
}
case 1090: {
caffe.Caffe.ReductionParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000040) == 0x00000040)) {
subBuilder = reductionParam_.toBuilder();
}
reductionParam_ = input.readMessage(caffe.Caffe.ReductionParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(reductionParam_);
reductionParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000040;
break;
}
case 1098: {
caffe.Caffe.EmbedParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00040000) == 0x00040000)) {
subBuilder = embedParam_.toBuilder();
}
embedParam_ = input.readMessage(caffe.Caffe.EmbedParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(embedParam_);
embedParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00040000;
break;
}
case 1106: {
caffe.Caffe.TileParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00010000) == 0x00010000)) {
subBuilder = tileParam_.toBuilder();
}
tileParam_ = input.readMessage(caffe.Caffe.TileParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tileParam_);
tileParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00010000;
break;
}
case 1114: {
caffe.Caffe.BatchNormParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000080) == 0x00000080)) {
subBuilder = batchNormParam_.toBuilder();
}
batchNormParam_ = input.readMessage(caffe.Caffe.BatchNormParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(batchNormParam_);
batchNormParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000080;
break;
}
case 1122: {
caffe.Caffe.ELUParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00020000) == 0x00020000)) {
subBuilder = eluParam_.toBuilder();
}
eluParam_ = input.readMessage(caffe.Caffe.ELUParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(eluParam_);
eluParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00020000;
break;
}
case 1130: {
caffe.Caffe.BiasParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00000100) == 0x00000100)) {
subBuilder = biasParam_.toBuilder();
}
biasParam_ = input.readMessage(caffe.Caffe.BiasParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(biasParam_);
biasParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000100;
break;
}
case 1138: {
caffe.Caffe.ScaleParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000200) == 0x00000200)) {
subBuilder = scaleParam_.toBuilder();
}
scaleParam_ = input.readMessage(caffe.Caffe.ScaleParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scaleParam_);
scaleParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000200;
break;
}
case 1146: {
caffe.Caffe.InputParameter.Builder subBuilder = null;
if (((bitField0_ & 0x08000000) == 0x08000000)) {
subBuilder = inputParam_.toBuilder();
}
inputParam_ = input.readMessage(caffe.Caffe.InputParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputParam_);
inputParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x08000000;
break;
}
case 1154: {
caffe.Caffe.CropParameter.Builder subBuilder = null;
if (((bitField0_ & 0x00001000) == 0x00001000)) {
subBuilder = cropParam_.toBuilder();
}
cropParam_ = input.readMessage(caffe.Caffe.CropParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cropParam_);
cropParam_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00001000;
break;
}
case 1162: {
caffe.Caffe.ParameterParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000001) == 0x00000001)) {
subBuilder = parameterParam_.toBuilder();
}
parameterParam_ = input.readMessage(caffe.Caffe.ParameterParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(parameterParam_);
parameterParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000001;
break;
}
case 1170: {
caffe.Caffe.RecurrentParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00000020) == 0x00000020)) {
subBuilder = recurrentParam_.toBuilder();
}
recurrentParam_ = input.readMessage(caffe.Caffe.RecurrentParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(recurrentParam_);
recurrentParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00000020;
break;
}
case 66133690: {
caffe.Caffe.ROIPoolingParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00040000) == 0x00040000)) {
subBuilder = roiPoolingParam_.toBuilder();
}
roiPoolingParam_ = input.readMessage(caffe.Caffe.ROIPoolingParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(roiPoolingParam_);
roiPoolingParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00040000;
break;
}
case 66133698: {
caffe.Caffe.SmoothL1LossParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00080000) == 0x00080000)) {
subBuilder = smoothL1LossParam_.toBuilder();
}
smoothL1LossParam_ = input.readMessage(caffe.Caffe.SmoothL1LossParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(smoothL1LossParam_);
smoothL1LossParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00080000;
break;
}
case 66133706: {
caffe.Caffe.ProposalParameter.Builder subBuilder = null;
if (((bitField1_ & 0x00100000) == 0x00100000)) {
subBuilder = proposalParam_.toBuilder();
}
proposalParam_ = input.readMessage(caffe.Caffe.ProposalParameter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(proposalParam_);
proposalParam_ = subBuilder.buildPartial();
}
bitField1_ |= 0x00100000;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
bottom_ = new com.google.protobuf.UnmodifiableLazyStringList(bottom_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
top_ = new com.google.protobuf.UnmodifiableLazyStringList(top_);
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
param_ = java.util.Collections.unmodifiableList(param_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
blobs_ = java.util.Collections.unmodifiableList(blobs_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
include_ = java.util.Collections.unmodifiableList(include_);
}
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
exclude_ = java.util.Collections.unmodifiableList(exclude_);
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
propagateDown_ = java.util.Collections.unmodifiableList(propagateDown_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return caffe.Caffe.internal_static_caffe_LayerParameter_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return caffe.Caffe.internal_static_caffe_LayerParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
caffe.Caffe.LayerParameter.class, caffe.Caffe.LayerParameter.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public LayerParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LayerParameter(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
private int bitField1_;
// optional string name = 1;
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.Object name_;
/**
* optional string name = 1;
*
*
* the layer name
*
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string name = 1;
*
*
* the layer name
*
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
*
*
* the layer name
*
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional string type = 2;
public static final int TYPE_FIELD_NUMBER = 2;
private java.lang.Object type_;
/**
* optional string type = 2;
*
*
* the layer type
*
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string type = 2;
*
*
* the layer type
*
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
* optional string type = 2;
*
*
* the layer type
*
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated string bottom = 3;
public static final int BOTTOM_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList bottom_;
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public java.util.List
getBottomList() {
return bottom_;
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public int getBottomCount() {
return bottom_.size();
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public java.lang.String getBottom(int index) {
return bottom_.get(index);
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public com.google.protobuf.ByteString
getBottomBytes(int index) {
return bottom_.getByteString(index);
}
// repeated string top = 4;
public static final int TOP_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList top_;
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public java.util.List
getTopList() {
return top_;
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public int getTopCount() {
return top_.size();
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public java.lang.String getTop(int index) {
return top_.get(index);
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public com.google.protobuf.ByteString
getTopBytes(int index) {
return top_.getByteString(index);
}
// optional .caffe.Phase phase = 10;
public static final int PHASE_FIELD_NUMBER = 10;
private caffe.Caffe.Phase phase_;
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
// repeated float loss_weight = 5;
public static final int LOSS_WEIGHT_FIELD_NUMBER = 5;
private java.util.List lossWeight_;
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
public java.util.List
getLossWeightList() {
return lossWeight_;
}
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
public int getLossWeightCount() {
return lossWeight_.size();
}
/**
* repeated float loss_weight = 5;
*
*
* The amount of weight to assign each top blob in the objective.
* Each layer assigns a default value, usually of either 0 or 1,
* to each top blob.
*
*/
public float getLossWeight(int index) {
return lossWeight_.get(index);
}
// repeated .caffe.ParamSpec param = 6;
public static final int PARAM_FIELD_NUMBER = 6;
private java.util.List param_;
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public java.util.List getParamList() {
return param_;
}
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public java.util.List extends caffe.Caffe.ParamSpecOrBuilder>
getParamOrBuilderList() {
return param_;
}
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public int getParamCount() {
return param_.size();
}
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public caffe.Caffe.ParamSpec getParam(int index) {
return param_.get(index);
}
/**
* repeated .caffe.ParamSpec param = 6;
*
*
* Specifies training parameters (multipliers on global learning constants,
* and the name and other settings used for weight sharing).
*
*/
public caffe.Caffe.ParamSpecOrBuilder getParamOrBuilder(
int index) {
return param_.get(index);
}
// repeated .caffe.BlobProto blobs = 7;
public static final int BLOBS_FIELD_NUMBER = 7;
private java.util.List blobs_;
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
public java.util.List getBlobsList() {
return blobs_;
}
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
public java.util.List extends caffe.Caffe.BlobProtoOrBuilder>
getBlobsOrBuilderList() {
return blobs_;
}
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
public int getBlobsCount() {
return blobs_.size();
}
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
public caffe.Caffe.BlobProto getBlobs(int index) {
return blobs_.get(index);
}
/**
* repeated .caffe.BlobProto blobs = 7;
*
*
* The blobs containing the numeric parameters of the layer.
*
*/
public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder(
int index) {
return blobs_.get(index);
}
// repeated bool propagate_down = 11;
public static final int PROPAGATE_DOWN_FIELD_NUMBER = 11;
private java.util.List propagateDown_;
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
public java.util.List
getPropagateDownList() {
return propagateDown_;
}
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
public int getPropagateDownCount() {
return propagateDown_.size();
}
/**
* repeated bool propagate_down = 11;
*
*
* Specifies whether to backpropagate to each bottom. If unspecified,
* Caffe will automatically infer whether each input needs backpropagation
* to compute parameter gradients. If set to true for some inputs,
* backpropagation to those inputs is forced; if set false for some inputs,
* backpropagation to those inputs is skipped.
*
* The size must be either 0 or equal to the number of bottoms.
*
*/
public boolean getPropagateDown(int index) {
return propagateDown_.get(index);
}
// repeated .caffe.NetStateRule include = 8;
public static final int INCLUDE_FIELD_NUMBER = 8;
private java.util.List include_;
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
public java.util.List getIncludeList() {
return include_;
}
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
public java.util.List extends caffe.Caffe.NetStateRuleOrBuilder>
getIncludeOrBuilderList() {
return include_;
}
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
public int getIncludeCount() {
return include_.size();
}
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
public caffe.Caffe.NetStateRule getInclude(int index) {
return include_.get(index);
}
/**
* repeated .caffe.NetStateRule include = 8;
*
*
* Rules controlling whether and when a layer is included in the network,
* based on the current NetState. You may specify a non-zero number of rules
* to include OR exclude, but not both. If no include or exclude rules are
* specified, the layer is always included. If the current NetState meets
* ANY (i.e., one or more) of the specified rules, the layer is
* included/excluded.
*
*/
public caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder(
int index) {
return include_.get(index);
}
// repeated .caffe.NetStateRule exclude = 9;
public static final int EXCLUDE_FIELD_NUMBER = 9;
private java.util.List exclude_;
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
public java.util.List getExcludeList() {
return exclude_;
}
/**
*