caffe.Caffe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of systemml Show documentation
Show all versions of systemml Show documentation
Declarative Machine Learning
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: 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 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 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 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 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 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
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
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 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
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 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
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
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
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
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
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
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 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
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 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 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
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 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
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
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, 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, 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, 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
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))))
*
* 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))))
*
* 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))))
*
* 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);
// 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();
// optional bool layer_wise_reduce = 41 [default = true];
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
boolean hasLayerWiseReduce();
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
boolean getLayerWiseReduce();
}
/**
* 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: layer_wise_reduce)
*
*/
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: {
bitField1_ |= 0x00000008;
layerWiseReduce_ = 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_ & 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_);
}
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
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, 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, 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, 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
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))))
*
* 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))))
*
* 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))))
*
* 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);
}
// 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_;
}
// optional bool layer_wise_reduce = 41 [default = true];
public static final int LAYER_WISE_REDUCE_FIELD_NUMBER = 41;
private boolean layerWiseReduce_;
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public boolean hasLayerWiseReduce() {
return ((bitField1_ & 0x00000008) == 0x00000008);
}
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public boolean getLayerWiseReduce() {
return layerWiseReduce_;
}
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();
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;
layerWiseReduce_ = true;
}
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());
}
if (((bitField1_ & 0x00000008) == 0x00000008)) {
output.writeBool(41, layerWiseReduce_);
}
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());
}
if (((bitField1_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(41, layerWiseReduce_);
}
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: layer_wise_reduce)
*
*/
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);
clipGradients_ = -1F;
bitField0_ = (bitField0_ & ~0x02000000);
snapshot_ = 0;
bitField0_ = (bitField0_ & ~0x04000000);
snapshotPrefix_ = "";
bitField0_ = (bitField0_ & ~0x08000000);
snapshotDiff_ = false;
bitField0_ = (bitField0_ & ~0x10000000);
snapshotFormat_ = caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO;
bitField0_ = (bitField0_ & ~0x20000000);
solverMode_ = caffe.Caffe.SolverParameter.SolverMode.GPU;
bitField0_ = (bitField0_ & ~0x40000000);
deviceId_ = 0;
bitField0_ = (bitField0_ & ~0x80000000);
randomSeed_ = -1L;
bitField1_ = (bitField1_ & ~0x00000001);
type_ = "SGD";
bitField1_ = (bitField1_ & ~0x00000002);
delta_ = 1e-08F;
bitField1_ = (bitField1_ & ~0x00000004);
momentum2_ = 0.999F;
bitField1_ = (bitField1_ & ~0x00000008);
rmsDecay_ = 0.99F;
bitField1_ = (bitField1_ & ~0x00000010);
debugInfo_ = false;
bitField1_ = (bitField1_ & ~0x00000020);
snapshotAfterTrain_ = true;
bitField1_ = (bitField1_ & ~0x00000040);
solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
bitField1_ = (bitField1_ & ~0x00000080);
layerWiseReduce_ = true;
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 (((from_bitField0_ & 0x02000000) == 0x02000000)) {
to_bitField0_ |= 0x00100000;
}
result.clipGradients_ = clipGradients_;
if (((from_bitField0_ & 0x04000000) == 0x04000000)) {
to_bitField0_ |= 0x00200000;
}
result.snapshot_ = snapshot_;
if (((from_bitField0_ & 0x08000000) == 0x08000000)) {
to_bitField0_ |= 0x00400000;
}
result.snapshotPrefix_ = snapshotPrefix_;
if (((from_bitField0_ & 0x10000000) == 0x10000000)) {
to_bitField0_ |= 0x00800000;
}
result.snapshotDiff_ = snapshotDiff_;
if (((from_bitField0_ & 0x20000000) == 0x20000000)) {
to_bitField0_ |= 0x01000000;
}
result.snapshotFormat_ = snapshotFormat_;
if (((from_bitField0_ & 0x40000000) == 0x40000000)) {
to_bitField0_ |= 0x02000000;
}
result.solverMode_ = solverMode_;
if (((from_bitField0_ & 0x80000000) == 0x80000000)) {
to_bitField0_ |= 0x04000000;
}
result.deviceId_ = deviceId_;
if (((from_bitField1_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x08000000;
}
result.randomSeed_ = randomSeed_;
if (((from_bitField1_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x10000000;
}
result.type_ = type_;
if (((from_bitField1_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x20000000;
}
result.delta_ = delta_;
if (((from_bitField1_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x40000000;
}
result.momentum2_ = momentum2_;
if (((from_bitField1_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x80000000;
}
result.rmsDecay_ = rmsDecay_;
if (((from_bitField1_ & 0x00000020) == 0x00000020)) {
to_bitField1_ |= 0x00000001;
}
result.debugInfo_ = debugInfo_;
if (((from_bitField1_ & 0x00000040) == 0x00000040)) {
to_bitField1_ |= 0x00000002;
}
result.snapshotAfterTrain_ = snapshotAfterTrain_;
if (((from_bitField1_ & 0x00000080) == 0x00000080)) {
to_bitField1_ |= 0x00000004;
}
result.solverType_ = solverType_;
if (((from_bitField1_ & 0x00000100) == 0x00000100)) {
to_bitField1_ |= 0x00000008;
}
result.layerWiseReduce_ = layerWiseReduce_;
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.hasClipGradients()) {
setClipGradients(other.getClipGradients());
}
if (other.hasSnapshot()) {
setSnapshot(other.getSnapshot());
}
if (other.hasSnapshotPrefix()) {
bitField0_ |= 0x08000000;
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_ |= 0x00000002;
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());
}
if (other.hasLayerWiseReduce()) {
setLayerWiseReduce(other.getLayerWiseReduce());
}
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 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
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, 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, 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, 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, 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, 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, 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, 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, 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, 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 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
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 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))))
*
* 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))))
*
* 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))))
*
* 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))))
*
* 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))))
*
* 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))))
*
* 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 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;
}
// 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_ & 0x02000000) == 0x02000000);
}
/**
* 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_ |= 0x02000000;
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_ & ~0x02000000);
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_ & 0x04000000) == 0x04000000);
}
/**
* 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_ |= 0x04000000;
snapshot_ = value;
onChanged();
return this;
}
/**
* optional int32 snapshot = 14 [default = 0];
*
*
* The snapshot interval
*
*/
public Builder clearSnapshot() {
bitField0_ = (bitField0_ & ~0x04000000);
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_ & 0x08000000) == 0x08000000);
}
/**
* 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_ |= 0x08000000;
snapshotPrefix_ = value;
onChanged();
return this;
}
/**
* optional string snapshot_prefix = 15;
*
*
* The prefix for the snapshot.
*
*/
public Builder clearSnapshotPrefix() {
bitField0_ = (bitField0_ & ~0x08000000);
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_ |= 0x08000000;
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_ & 0x10000000) == 0x10000000);
}
/**
* 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_ |= 0x10000000;
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_ & ~0x10000000);
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_ & 0x20000000) == 0x20000000);
}
/**
* 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_ |= 0x20000000;
snapshotFormat_ = value;
onChanged();
return this;
}
/**
* optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
*/
public Builder clearSnapshotFormat() {
bitField0_ = (bitField0_ & ~0x20000000);
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_ & 0x40000000) == 0x40000000);
}
/**
* 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_ |= 0x40000000;
solverMode_ = value;
onChanged();
return this;
}
/**
* optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
*/
public Builder clearSolverMode() {
bitField0_ = (bitField0_ & ~0x40000000);
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 ((bitField0_ & 0x80000000) == 0x80000000);
}
/**
* 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) {
bitField0_ |= 0x80000000;
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() {
bitField0_ = (bitField0_ & ~0x80000000);
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_ & 0x00000001) == 0x00000001);
}
/**
* 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_ |= 0x00000001;
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_ & ~0x00000001);
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_ & 0x00000002) == 0x00000002);
}
/**
* 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_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
/**
* optional string type = 40 [default = "SGD"];
*
*
* type of the solver
*
*/
public Builder clearType() {
bitField1_ = (bitField1_ & ~0x00000002);
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_ |= 0x00000002;
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_ & 0x00000004) == 0x00000004);
}
/**
* 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_ |= 0x00000004;
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_ & ~0x00000004);
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_ & 0x00000008) == 0x00000008);
}
/**
* 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_ |= 0x00000008;
momentum2_ = value;
onChanged();
return this;
}
/**
* optional float momentum2 = 39 [default = 0.999];
*
*
* parameters for the Adam solver
*
*/
public Builder clearMomentum2() {
bitField1_ = (bitField1_ & ~0x00000008);
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_ & 0x00000010) == 0x00000010);
}
/**
* 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_ |= 0x00000010;
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_ & ~0x00000010);
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_ & 0x00000020) == 0x00000020);
}
/**
* 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_ |= 0x00000020;
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_ & ~0x00000020);
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_ & 0x00000040) == 0x00000040);
}
/**
* 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_ |= 0x00000040;
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_ & ~0x00000040);
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_ & 0x00000080) == 0x00000080);
}
/**
* 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_ |= 0x00000080;
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_ & ~0x00000080);
solverType_ = caffe.Caffe.SolverParameter.SolverType.SGD;
onChanged();
return this;
}
// optional bool layer_wise_reduce = 41 [default = true];
private boolean layerWiseReduce_ = true;
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public boolean hasLayerWiseReduce() {
return ((bitField1_ & 0x00000100) == 0x00000100);
}
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public boolean getLayerWiseReduce() {
return layerWiseReduce_;
}
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public Builder setLayerWiseReduce(boolean value) {
bitField1_ |= 0x00000100;
layerWiseReduce_ = value;
onChanged();
return this;
}
/**
* optional bool layer_wise_reduce = 41 [default = true];
*
*
* Overlap compute and communication for data parallel training
*
*/
public Builder clearLayerWiseReduce() {
bitField1_ = (bitField1_ & ~0x00000100);
layerWiseReduce_ = true;
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
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();
}
/**
* 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;
}
}
}
} 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
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_;
}
private void initFields() {
iter_ = 0;
learnedNet_ = "";
history_ = java.util.Collections.emptyList();
currentStep_ = 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_);
}
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_);
}
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);
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_;
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());
}
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 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
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;
}
// @@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
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
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
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
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();
}
/**
* 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;
}
}
}
} 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
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
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
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_;
}
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
public java.util.List
getExcludeOrBuilderList() {
return exclude_;
}
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
public int getExcludeCount() {
return exclude_.size();
}
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
public caffe.Caffe.NetStateRule getExclude(int index) {
return exclude_.get(index);
}
/**
* repeated .caffe.NetStateRule exclude = 9;
*/
public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder(
int index) {
return exclude_.get(index);
}
// optional .caffe.TransformationParameter transform_param = 100;
public static final int TRANSFORM_PARAM_FIELD_NUMBER = 100;
private caffe.Caffe.TransformationParameter transformParam_;
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
public boolean hasTransformParam() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
public caffe.Caffe.TransformationParameter getTransformParam() {
return transformParam_;
}
/**
* optional .caffe.TransformationParameter transform_param = 100;
*
*
* Parameters for data pre-processing.
*
*/
public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() {
return transformParam_;
}
// optional .caffe.LossParameter loss_param = 101;
public static final int LOSS_PARAM_FIELD_NUMBER = 101;
private caffe.Caffe.LossParameter lossParam_;
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
public boolean hasLossParam() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
public caffe.Caffe.LossParameter getLossParam() {
return lossParam_;
}
/**
* optional .caffe.LossParameter loss_param = 101;
*
*
* Parameters shared by loss layers.
*
*/
public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() {
return lossParam_;
}
// optional .caffe.AccuracyParameter accuracy_param = 102;
public static final int ACCURACY_PARAM_FIELD_NUMBER = 102;
private caffe.Caffe.AccuracyParameter accuracyParam_;
/**
* 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.
*
*/
public boolean hasAccuracyParam() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* 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.
*
*/
public caffe.Caffe.AccuracyParameter getAccuracyParam() {
return accuracyParam_;
}
/**
* 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.
*
*/
public caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder() {
return accuracyParam_;
}
// optional .caffe.ArgMaxParameter argmax_param = 103;
public static final int ARGMAX_PARAM_FIELD_NUMBER = 103;
private caffe.Caffe.ArgMaxParameter argmaxParam_;
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
public boolean hasArgmaxParam() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
public caffe.Caffe.ArgMaxParameter getArgmaxParam() {
return argmaxParam_;
}
/**
* optional .caffe.ArgMaxParameter argmax_param = 103;
*/
public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() {
return argmaxParam_;
}
// optional .caffe.BatchNormParameter batch_norm_param = 139;
public static final int BATCH_NORM_PARAM_FIELD_NUMBER = 139;
private caffe.Caffe.BatchNormParameter batchNormParam_;
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
public boolean hasBatchNormParam() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
public caffe.Caffe.BatchNormParameter getBatchNormParam() {
return batchNormParam_;
}
/**
* optional .caffe.BatchNormParameter batch_norm_param = 139;
*/
public caffe.Caffe.BatchNormParameterOrBuilder getBatchNormParamOrBuilder() {
return batchNormParam_;
}
// optional .caffe.BiasParameter bias_param = 141;
public static final int BIAS_PARAM_FIELD_NUMBER = 141;
private caffe.Caffe.BiasParameter biasParam_;
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
public boolean hasBiasParam() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
public caffe.Caffe.BiasParameter getBiasParam() {
return biasParam_;
}
/**
* optional .caffe.BiasParameter bias_param = 141;
*/
public caffe.Caffe.BiasParameterOrBuilder getBiasParamOrBuilder() {
return biasParam_;
}
// optional .caffe.ConcatParameter concat_param = 104;
public static final int CONCAT_PARAM_FIELD_NUMBER = 104;
private caffe.Caffe.ConcatParameter concatParam_;
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
public boolean hasConcatParam() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
public caffe.Caffe.ConcatParameter getConcatParam() {
return concatParam_;
}
/**
* optional .caffe.ConcatParameter concat_param = 104;
*/
public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() {
return concatParam_;
}
// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
public static final int CONTRASTIVE_LOSS_PARAM_FIELD_NUMBER = 105;
private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_;
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
public boolean hasContrastiveLossParam() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() {
return contrastiveLossParam_;
}
/**
* optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
*/
public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() {
return contrastiveLossParam_;
}
// optional .caffe.ConvolutionParameter convolution_param = 106;
public static final int CONVOLUTION_PARAM_FIELD_NUMBER = 106;
private caffe.Caffe.ConvolutionParameter convolutionParam_;
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
public boolean hasConvolutionParam() {
return ((bitField0_ & 0x00000800) == 0x00000800);
}
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
public caffe.Caffe.ConvolutionParameter getConvolutionParam() {
return convolutionParam_;
}
/**
* optional .caffe.ConvolutionParameter convolution_param = 106;
*/
public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() {
return convolutionParam_;
}
// optional .caffe.CropParameter crop_param = 144;
public static final int CROP_PARAM_FIELD_NUMBER = 144;
private caffe.Caffe.CropParameter cropParam_;
/**
* optional .caffe.CropParameter crop_param = 144;
*/
public boolean hasCropParam() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
* optional .caffe.CropParameter crop_param = 144;
*/
public caffe.Caffe.CropParameter getCropParam() {
return cropParam_;
}
/**
* optional .caffe.CropParameter crop_param = 144;
*/
public caffe.Caffe.CropParameterOrBuilder getCropParamOrBuilder() {
return cropParam_;
}
// optional .caffe.DataParameter data_param = 107;
public static final int DATA_PARAM_FIELD_NUMBER = 107;
private caffe.Caffe.DataParameter dataParam_;
/**
* optional .caffe.DataParameter data_param = 107;
*/
public boolean hasDataParam() {
return ((bitField0_ & 0x00002000) == 0x00002000);
}
/**
* optional .caffe.DataParameter data_param = 107;
*/
public caffe.Caffe.DataParameter getDataParam() {
return dataParam_;
}
/**
* optional .caffe.DataParameter data_param = 107;
*/
public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() {
return dataParam_;
}
// optional .caffe.DropoutParameter dropout_param = 108;
public static final int DROPOUT_PARAM_FIELD_NUMBER = 108;
private caffe.Caffe.DropoutParameter dropoutParam_;
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
public boolean hasDropoutParam() {
return ((bitField0_ & 0x00004000) == 0x00004000);
}
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
public caffe.Caffe.DropoutParameter getDropoutParam() {
return dropoutParam_;
}
/**
* optional .caffe.DropoutParameter dropout_param = 108;
*/
public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() {
return dropoutParam_;
}
// optional .caffe.DummyDataParameter dummy_data_param = 109;
public static final int DUMMY_DATA_PARAM_FIELD_NUMBER = 109;
private caffe.Caffe.DummyDataParameter dummyDataParam_;
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
public boolean hasDummyDataParam() {
return ((bitField0_ & 0x00008000) == 0x00008000);
}
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
public caffe.Caffe.DummyDataParameter getDummyDataParam() {
return dummyDataParam_;
}
/**
* optional .caffe.DummyDataParameter dummy_data_param = 109;
*/
public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() {
return dummyDataParam_;
}
// optional .caffe.EltwiseParameter eltwise_param = 110;
public static final int ELTWISE_PARAM_FIELD_NUMBER = 110;
private caffe.Caffe.EltwiseParameter eltwiseParam_;
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
public boolean hasEltwiseParam() {
return ((bitField0_ & 0x00010000) == 0x00010000);
}
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
public caffe.Caffe.EltwiseParameter getEltwiseParam() {
return eltwiseParam_;
}
/**
* optional .caffe.EltwiseParameter eltwise_param = 110;
*/
public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() {
return eltwiseParam_;
}
// optional .caffe.ELUParameter elu_param = 140;
public static final int ELU_PARAM_FIELD_NUMBER = 140;
private caffe.Caffe.ELUParameter eluParam_;
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
public boolean hasEluParam() {
return ((bitField0_ & 0x00020000) == 0x00020000);
}
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
public caffe.Caffe.ELUParameter getEluParam() {
return eluParam_;
}
/**
* optional .caffe.ELUParameter elu_param = 140;
*/
public caffe.Caffe.ELUParameterOrBuilder getEluParamOrBuilder() {
return eluParam_;
}
// optional .caffe.EmbedParameter embed_param = 137;
public static final int EMBED_PARAM_FIELD_NUMBER = 137;
private caffe.Caffe.EmbedParameter embedParam_;
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
public boolean hasEmbedParam() {
return ((bitField0_ & 0x00040000) == 0x00040000);
}
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
public caffe.Caffe.EmbedParameter getEmbedParam() {
return embedParam_;
}
/**
* optional .caffe.EmbedParameter embed_param = 137;
*/
public caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder() {
return embedParam_;
}
// optional .caffe.ExpParameter exp_param = 111;
public static final int EXP_PARAM_FIELD_NUMBER = 111;
private caffe.Caffe.ExpParameter expParam_;
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
public boolean hasExpParam() {
return ((bitField0_ & 0x00080000) == 0x00080000);
}
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
public caffe.Caffe.ExpParameter getExpParam() {
return expParam_;
}
/**
* optional .caffe.ExpParameter exp_param = 111;
*/
public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() {
return expParam_;
}
// optional .caffe.FlattenParameter flatten_param = 135;
public static final int FLATTEN_PARAM_FIELD_NUMBER = 135;
private caffe.Caffe.FlattenParameter flattenParam_;
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
public boolean hasFlattenParam() {
return ((bitField0_ & 0x00100000) == 0x00100000);
}
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
public caffe.Caffe.FlattenParameter getFlattenParam() {
return flattenParam_;
}
/**
* optional .caffe.FlattenParameter flatten_param = 135;
*/
public caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder() {
return flattenParam_;
}
// optional .caffe.HDF5DataParameter hdf5_data_param = 112;
public static final int HDF5_DATA_PARAM_FIELD_NUMBER = 112;
private caffe.Caffe.HDF5DataParameter hdf5DataParam_;
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
public boolean hasHdf5DataParam() {
return ((bitField0_ & 0x00200000) == 0x00200000);
}
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
public caffe.Caffe.HDF5DataParameter getHdf5DataParam() {
return hdf5DataParam_;
}
/**
* optional .caffe.HDF5DataParameter hdf5_data_param = 112;
*/
public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() {
return hdf5DataParam_;
}
// optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
public static final int HDF5_OUTPUT_PARAM_FIELD_NUMBER = 113;
private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_;
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
public boolean hasHdf5OutputParam() {
return ((bitField0_ & 0x00400000) == 0x00400000);
}
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() {
return hdf5OutputParam_;
}
/**
* optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
*/
public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() {
return hdf5OutputParam_;
}
// optional .caffe.HingeLossParameter hinge_loss_param = 114;
public static final int HINGE_LOSS_PARAM_FIELD_NUMBER = 114;
private caffe.Caffe.HingeLossParameter hingeLossParam_;
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
public boolean hasHingeLossParam() {
return ((bitField0_ & 0x00800000) == 0x00800000);
}
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
public caffe.Caffe.HingeLossParameter getHingeLossParam() {
return hingeLossParam_;
}
/**
* optional .caffe.HingeLossParameter hinge_loss_param = 114;
*/
public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() {
return hingeLossParam_;
}
// optional .caffe.ImageDataParameter image_data_param = 115;
public static final int IMAGE_DATA_PARAM_FIELD_NUMBER = 115;
private caffe.Caffe.ImageDataParameter imageDataParam_;
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
public boolean hasImageDataParam() {
return ((bitField0_ & 0x01000000) == 0x01000000);
}
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
public caffe.Caffe.ImageDataParameter getImageDataParam() {
return imageDataParam_;
}
/**
* optional .caffe.ImageDataParameter image_data_param = 115;
*/
public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() {
return imageDataParam_;
}
// optional .caffe.InfogainLossParameter infogain_loss_param = 116;
public static final int INFOGAIN_LOSS_PARAM_FIELD_NUMBER = 116;
private caffe.Caffe.InfogainLossParameter infogainLossParam_;
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
public boolean hasInfogainLossParam() {
return ((bitField0_ & 0x02000000) == 0x02000000);
}
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
public caffe.Caffe.InfogainLossParameter getInfogainLossParam() {
return infogainLossParam_;
}
/**
* optional .caffe.InfogainLossParameter infogain_loss_param = 116;
*/
public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() {
return infogainLossParam_;
}
// optional .caffe.InnerProductParameter inner_product_param = 117;
public static final int INNER_PRODUCT_PARAM_FIELD_NUMBER = 117;
private caffe.Caffe.InnerProductParameter innerProductParam_;
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
public boolean hasInnerProductParam() {
return ((bitField0_ & 0x04000000) == 0x04000000);
}
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
public caffe.Caffe.InnerProductParameter getInnerProductParam() {
return innerProductParam_;
}
/**
* optional .caffe.InnerProductParameter inner_product_param = 117;
*/
public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() {
return innerProductParam_;
}
// optional .caffe.InputParameter input_param = 143;
public static final int INPUT_PARAM_FIELD_NUMBER = 143;
private caffe.Caffe.InputParameter inputParam_;
/**
* optional .caffe.InputParameter input_param = 143;
*/
public boolean hasInputParam() {
return ((bitField0_ & 0x08000000) == 0x08000000);
}
/**
* optional .caffe.InputParameter input_param = 143;
*/
public caffe.Caffe.InputParameter getInputParam() {
return inputParam_;
}
/**
* optional .caffe.InputParameter input_param = 143;
*/
public caffe.Caffe.InputParameterOrBuilder getInputParamOrBuilder() {
return inputParam_;
}
// optional .caffe.LogParameter log_param = 134;
public static final int LOG_PARAM_FIELD_NUMBER = 134;
private caffe.Caffe.LogParameter logParam_;
/**
* optional .caffe.LogParameter log_param = 134;
*/
public boolean hasLogParam() {
return ((bitField0_ & 0x10000000) == 0x10000000);
}
/**
* optional .caffe.LogParameter log_param = 134;
*/
public caffe.Caffe.LogParameter getLogParam() {
return logParam_;
}
/**
* optional .caffe.LogParameter log_param = 134;
*/
public caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder() {
return logParam_;
}
// optional .caffe.LRNParameter lrn_param = 118;
public static final int LRN_PARAM_FIELD_NUMBER = 118;
private caffe.Caffe.LRNParameter lrnParam_;
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
public boolean hasLrnParam() {
return ((bitField0_ & 0x20000000) == 0x20000000);
}
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
public caffe.Caffe.LRNParameter getLrnParam() {
return lrnParam_;
}
/**
* optional .caffe.LRNParameter lrn_param = 118;
*/
public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() {
return lrnParam_;
}
// optional .caffe.MemoryDataParameter memory_data_param = 119;
public static final int MEMORY_DATA_PARAM_FIELD_NUMBER = 119;
private caffe.Caffe.MemoryDataParameter memoryDataParam_;
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
public boolean hasMemoryDataParam() {
return ((bitField0_ & 0x40000000) == 0x40000000);
}
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
public caffe.Caffe.MemoryDataParameter getMemoryDataParam() {
return memoryDataParam_;
}
/**
* optional .caffe.MemoryDataParameter memory_data_param = 119;
*/
public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() {
return memoryDataParam_;
}
// optional .caffe.MVNParameter mvn_param = 120;
public static final int MVN_PARAM_FIELD_NUMBER = 120;
private caffe.Caffe.MVNParameter mvnParam_;
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
public boolean hasMvnParam() {
return ((bitField0_ & 0x80000000) == 0x80000000);
}
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
public caffe.Caffe.MVNParameter getMvnParam() {
return mvnParam_;
}
/**
* optional .caffe.MVNParameter mvn_param = 120;
*/
public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() {
return mvnParam_;
}
// optional .caffe.ParameterParameter parameter_param = 145;
public static final int PARAMETER_PARAM_FIELD_NUMBER = 145;
private caffe.Caffe.ParameterParameter parameterParam_;
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
public boolean hasParameterParam() {
return ((bitField1_ & 0x00000001) == 0x00000001);
}
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
public caffe.Caffe.ParameterParameter getParameterParam() {
return parameterParam_;
}
/**
* optional .caffe.ParameterParameter parameter_param = 145;
*/
public caffe.Caffe.ParameterParameterOrBuilder getParameterParamOrBuilder() {
return parameterParam_;
}
// optional .caffe.PoolingParameter pooling_param = 121;
public static final int POOLING_PARAM_FIELD_NUMBER = 121;
private caffe.Caffe.PoolingParameter poolingParam_;
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
public boolean hasPoolingParam() {
return ((bitField1_ & 0x00000002) == 0x00000002);
}
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
public caffe.Caffe.PoolingParameter getPoolingParam() {
return poolingParam_;
}
/**
* optional .caffe.PoolingParameter pooling_param = 121;
*/
public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() {
return poolingParam_;
}
// optional .caffe.PowerParameter power_param = 122;
public static final int POWER_PARAM_FIELD_NUMBER = 122;
private caffe.Caffe.PowerParameter powerParam_;
/**
* optional .caffe.PowerParameter power_param = 122;
*/
public boolean hasPowerParam() {
return ((bitField1_ & 0x00000004) == 0x00000004);
}
/**
* optional .caffe.PowerParameter power_param = 122;
*/
public caffe.Caffe.PowerParameter getPowerParam() {
return powerParam_;
}
/**
* optional .caffe.PowerParameter power_param = 122;
*/
public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() {
return powerParam_;
}
// optional .caffe.PReLUParameter prelu_param = 131;
public static final int PRELU_PARAM_FIELD_NUMBER = 131;
private caffe.Caffe.PReLUParameter preluParam_;
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
public boolean hasPreluParam() {
return ((bitField1_ & 0x00000008) == 0x00000008);
}
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
public caffe.Caffe.PReLUParameter getPreluParam() {
return preluParam_;
}
/**
* optional .caffe.PReLUParameter prelu_param = 131;
*/
public caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder() {
return preluParam_;
}
// optional .caffe.PythonParameter python_param = 130;
public static final int PYTHON_PARAM_FIELD_NUMBER = 130;
private caffe.Caffe.PythonParameter pythonParam_;
/**
* optional .caffe.PythonParameter python_param = 130;
*/
public boolean hasPythonParam() {
return ((bitField1_ & 0x00000010) == 0x00000010);
}
/**
* optional .caffe.PythonParameter python_param = 130;
*/
public caffe.Caffe.PythonParameter getPythonParam() {
return pythonParam_;
}
/**
* optional .caffe.PythonParameter python_param = 130;
*/
public caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder() {
return pythonParam_;
}
// optional .caffe.RecurrentParameter recurrent_param = 146;
public static final int RECURRENT_PARAM_FIELD_NUMBER = 146;
private caffe.Caffe.RecurrentParameter recurrentParam_;
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
public boolean hasRecurrentParam() {
return ((bitField1_ & 0x00000020) == 0x00000020);
}
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
public caffe.Caffe.RecurrentParameter getRecurrentParam() {
return recurrentParam_;
}
/**
* optional .caffe.RecurrentParameter recurrent_param = 146;
*/
public caffe.Caffe.RecurrentParameterOrBuilder getRecurrentParamOrBuilder() {
return recurrentParam_;
}
// optional .caffe.ReductionParameter reduction_param = 136;
public static final int REDUCTION_PARAM_FIELD_NUMBER = 136;
private caffe.Caffe.ReductionParameter reductionParam_;
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
public boolean hasReductionParam() {
return ((bitField1_ & 0x00000040) == 0x00000040);
}
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
public caffe.Caffe.ReductionParameter getReductionParam() {
return reductionParam_;
}
/**
* optional .caffe.ReductionParameter reduction_param = 136;
*/
public caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder() {
return reductionParam_;
}
// optional .caffe.ReLUParameter relu_param = 123;
public static final int RELU_PARAM_FIELD_NUMBER = 123;
private caffe.Caffe.ReLUParameter reluParam_;
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
public boolean hasReluParam() {
return ((bitField1_ & 0x00000080) == 0x00000080);
}
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
public caffe.Caffe.ReLUParameter getReluParam() {
return reluParam_;
}
/**
* optional .caffe.ReLUParameter relu_param = 123;
*/
public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() {
return reluParam_;
}
// optional .caffe.ReshapeParameter reshape_param = 133;
public static final int RESHAPE_PARAM_FIELD_NUMBER = 133;
private caffe.Caffe.ReshapeParameter reshapeParam_;
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
public boolean hasReshapeParam() {
return ((bitField1_ & 0x00000100) == 0x00000100);
}
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
public caffe.Caffe.ReshapeParameter getReshapeParam() {
return reshapeParam_;
}
/**
* optional .caffe.ReshapeParameter reshape_param = 133;
*/
public caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder() {
return reshapeParam_;
}
// optional .caffe.ScaleParameter scale_param = 142;
public static final int SCALE_PARAM_FIELD_NUMBER = 142;
private caffe.Caffe.ScaleParameter scaleParam_;
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
public boolean hasScaleParam() {
return ((bitField1_ & 0x00000200) == 0x00000200);
}
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
public caffe.Caffe.ScaleParameter getScaleParam() {
return scaleParam_;
}
/**
* optional .caffe.ScaleParameter scale_param = 142;
*/
public caffe.Caffe.ScaleParameterOrBuilder getScaleParamOrBuilder() {
return scaleParam_;
}
// optional .caffe.SigmoidParameter sigmoid_param = 124;
public static final int SIGMOID_PARAM_FIELD_NUMBER = 124;
private caffe.Caffe.SigmoidParameter sigmoidParam_;
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
public boolean hasSigmoidParam() {
return ((bitField1_ & 0x00000400) == 0x00000400);
}
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
public caffe.Caffe.SigmoidParameter getSigmoidParam() {
return sigmoidParam_;
}
/**
* optional .caffe.SigmoidParameter sigmoid_param = 124;
*/
public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() {
return sigmoidParam_;
}
// optional .caffe.SoftmaxParameter softmax_param = 125;
public static final int SOFTMAX_PARAM_FIELD_NUMBER = 125;
private caffe.Caffe.SoftmaxParameter softmaxParam_;
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
public boolean hasSoftmaxParam() {
return ((bitField1_ & 0x00000800) == 0x00000800);
}
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
public caffe.Caffe.SoftmaxParameter getSoftmaxParam() {
return softmaxParam_;
}
/**
* optional .caffe.SoftmaxParameter softmax_param = 125;
*/
public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() {
return softmaxParam_;
}
// optional .caffe.SPPParameter spp_param = 132;
public static final int SPP_PARAM_FIELD_NUMBER = 132;
private caffe.Caffe.SPPParameter sppParam_;
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
public boolean hasSppParam() {
return ((bitField1_ & 0x00001000) == 0x00001000);
}
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
public caffe.Caffe.SPPParameter getSppParam() {
return sppParam_;
}
/**
* optional .caffe.SPPParameter spp_param = 132;
*/
public caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder() {
return sppParam_;
}
// optional .caffe.SliceParameter slice_param = 126;
public static final int SLICE_PARAM_FIELD_NUMBER = 126;
private caffe.Caffe.SliceParameter sliceParam_;
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
public boolean hasSliceParam() {
return ((bitField1_ & 0x00002000) == 0x00002000);
}
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
public caffe.Caffe.SliceParameter getSliceParam() {
return sliceParam_;
}
/**
* optional .caffe.SliceParameter slice_param = 126;
*/
public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() {
return sliceParam_;
}
// optional .caffe.TanHParameter tanh_param = 127;
public static final int TANH_PARAM_FIELD_NUMBER = 127;
private caffe.Caffe.TanHParameter tanhParam_;
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
public boolean hasTanhParam() {
return ((bitField1_ & 0x00004000) == 0x00004000);
}
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
public caffe.Caffe.TanHParameter getTanhParam() {
return tanhParam_;
}
/**
* optional .caffe.TanHParameter tanh_param = 127;
*/
public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() {
return tanhParam_;
}
// optional .caffe.ThresholdParameter threshold_param = 128;
public static final int THRESHOLD_PARAM_FIELD_NUMBER = 128;
private caffe.Caffe.ThresholdParameter thresholdParam_;
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
public boolean hasThresholdParam() {
return ((bitField1_ & 0x00008000) == 0x00008000);
}
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
public caffe.Caffe.ThresholdParameter getThresholdParam() {
return thresholdParam_;
}
/**
* optional .caffe.ThresholdParameter threshold_param = 128;
*/
public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() {
return thresholdParam_;
}
// optional .caffe.TileParameter tile_param = 138;
public static final int TILE_PARAM_FIELD_NUMBER = 138;
private caffe.Caffe.TileParameter tileParam_;
/**
* optional .caffe.TileParameter tile_param = 138;
*/
public boolean hasTileParam() {
return ((bitField1_ & 0x00010000) == 0x00010000);
}
/**
* optional .caffe.TileParameter tile_param = 138;
*/
public caffe.Caffe.TileParameter getTileParam() {
return tileParam_;
}
/**
* optional .caffe.TileParameter tile_param = 138;
*/
public caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder() {
return tileParam_;
}
// optional .caffe.WindowDataParameter window_data_param = 129;
public static final int WINDOW_DATA_PARAM_FIELD_NUMBER = 129;
private caffe.Caffe.WindowDataParameter windowDataParam_;
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
public boolean hasWindowDataParam() {
return ((bitField1_ & 0x00020000) == 0x00020000);
}
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
public caffe.Caffe.WindowDataParameter getWindowDataParam() {
return windowDataParam_;
}
/**
* optional .caffe.WindowDataParameter window_data_param = 129;
*/
public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() {
return windowDataParam_;
}
private void initFields() {
name_ = "";
type_ = "";
bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY;
top_ = com.google.protobuf.LazyStringArrayList.EMPTY;
phase_ = caffe.Caffe.Phase.TRAIN;
lossWeight_ = java.util.Collections.emptyList();
param_ = java.util.Collections.emptyList();
blobs_ = java.util.Collections.emptyList();
propagateDown_ = java.util.Collections.emptyList();
include_ = java.util.Collections.emptyList();
exclude_ = java.util.Collections.emptyList();
transformParam_ = caffe.Caffe.TransformationParameter.getDefaultInstance();
lossParam_ = caffe.Caffe.LossParameter.getDefaultInstance();
accuracyParam_ = caffe.Caffe.AccuracyParameter.getDefaultInstance();
argmaxParam_ = caffe.Caffe.ArgMaxParameter.getDefaultInstance();
batchNormParam_ = caffe.Caffe.BatchNormParameter.getDefaultInstance();
biasParam_ = caffe.Caffe.BiasParameter.getDefaultInstance();
concatParam_ = caffe.Caffe.ConcatParameter.getDefaultInstance();
contrastiveLossParam_ = caffe.Caffe.ContrastiveLossParameter.getDefaultInstance();
convolutionParam_ = caffe.Caffe.ConvolutionParameter.getDefaultInstance();
cropParam_ = caffe.Caffe.CropParameter.getDefaultInstance();
dataParam_ = caffe.Caffe.DataParameter.getDefaultInstance();
dropoutParam_ = caffe.Caffe.DropoutParameter.getDefaultInstance();
dummyDataParam_ = caffe.Caffe.DummyDataParameter.getDefaultInstance();
eltwiseParam_ = caffe.Caffe.EltwiseParameter.getDefaultInstance();
eluParam_ = caffe.Caffe.ELUParameter.getDefaultInstance();
embedParam_ = caffe.Caffe.EmbedParameter.getDefaultInstance();
expParam_ = caffe.Caffe.ExpParameter.getDefaultInstance();
flattenParam_ = caffe.Caffe.FlattenParameter.getDefaultInstance();
hdf5DataParam_ = caffe.Caffe.HDF5DataParameter.getDefaultInstance();
hdf5OutputParam_ = caffe.Caffe.HDF5OutputParameter.getDefaultInstance();
hingeLossParam_ = caffe.Caffe.HingeLossParameter.getDefaultInstance();
imageDataParam_ = caffe.Caffe.ImageDataParameter.getDefaultInstance();
infogainLossParam_ = caffe.Caffe.InfogainLossParameter.getDefaultInstance();
innerProductParam_ = caffe.Caffe.InnerProductParameter.getDefaultInstance();
inputParam_ = caffe.Caffe.InputParameter.getDefaultInstance();
logParam_ = caffe.Caffe.LogParameter.getDefaultInstance();
lrnParam_ = caffe.Caffe.LRNParameter.getDefaultInstance();
memoryDataParam_ = caffe.Caffe.MemoryDataParameter.getDefaultInstance();
mvnParam_ = caffe.Caffe.MVNParameter.getDefaultInstance();
parameterParam_ = caffe.Caffe.ParameterParameter.getDefaultInstance();
poolingParam_ = caffe.Caffe.PoolingParameter.getDefaultInstance();
powerParam_ = caffe.Caffe.PowerParameter.getDefaultInstance();
preluParam_ = caffe.Caffe.PReLUParameter.getDefaultInstance();
pythonParam_ = caffe.Caffe.PythonParameter.getDefaultInstance();
recurrentParam_ = caffe.Caffe.RecurrentParameter.getDefaultInstance();
reductionParam_ = caffe.Caffe.ReductionParameter.getDefaultInstance();
reluParam_ = caffe.Caffe.ReLUParameter.getDefaultInstance();
reshapeParam_ = caffe.Caffe.ReshapeParameter.getDefaultInstance();
scaleParam_ = caffe.Caffe.ScaleParameter.getDefaultInstance();
sigmoidParam_ = caffe.Caffe.SigmoidParameter.getDefaultInstance();
softmaxParam_ = caffe.Caffe.SoftmaxParameter.getDefaultInstance();
sppParam_ = caffe.Caffe.SPPParameter.getDefaultInstance();
sliceParam_ = caffe.Caffe.SliceParameter.getDefaultInstance();
tanhParam_ = caffe.Caffe.TanHParameter.getDefaultInstance();
thresholdParam_ = caffe.Caffe.ThresholdParameter.getDefaultInstance();
tileParam_ = caffe.Caffe.TileParameter.getDefaultInstance();
windowDataParam_ = caffe.Caffe.WindowDataParameter.getDefaultInstance();
}
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.writeBytes(2, getTypeBytes());
}
for (int i = 0; i < bottom_.size(); i++) {
output.writeBytes(3, bottom_.getByteString(i));
}
for (int i = 0; i < top_.size(); i++) {
output.writeBytes(4, top_.getByteString(i));
}
for (int i = 0; i < lossWeight_.size(); i++) {
output.writeFloat(5, lossWeight_.get(i));
}
for (int i = 0; i < param_.size(); i++) {
output.writeMessage(6, param_.get(i));
}
for (int i = 0; i < blobs_.size(); i++) {
output.writeMessage(7, blobs_.get(i));
}
for (int i = 0; i < include_.size(); i++) {
output.writeMessage(8, include_.get(i));
}
for (int i = 0; i < exclude_.size(); i++) {
output.writeMessage(9, exclude_.get(i));
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeEnum(10, phase_.getNumber());
}
for (int i = 0; i < propagateDown_.size(); i++) {
output.writeBool(11, propagateDown_.get(i));
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(100, transformParam_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(101, lossParam_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeMessage(102, accuracyParam_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeMessage(103, argmaxParam_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeMessage(104, concatParam_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
output.writeMessage(105, contrastiveLossParam_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
output.writeMessage(106, convolutionParam_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
output.writeMessage(107, dataParam_);
}
if (((bitField0_ & 0x00004000) == 0x00004000)) {
output.writeMessage(108, dropoutParam_);
}
if (((bitField0_ & 0x00008000) == 0x00008000)) {
output.writeMessage(109, dummyDataParam_);
}
if (((bitField0_ & 0x00010000) == 0x00010000)) {
output.writeMessage(110, eltwiseParam_);
}
if (((bitField0_ & 0x00080000) == 0x00080000)) {
output.writeMessage(111, expParam_);
}
if (((bitField0_ & 0x00200000) == 0x00200000)) {
output.writeMessage(112, hdf5DataParam_);
}
if (((bitField0_ & 0x00400000) == 0x00400000)) {
output.writeMessage(113, hdf5OutputParam_);
}
if (((bitField0_ & 0x00800000) == 0x00800000)) {
output.writeMessage(114, hingeLossParam_);
}
if (((bitField0_ & 0x01000000) == 0x01000000)) {
output.writeMessage(115, imageDataParam_);
}
if (((bitField0_ & 0x02000000) == 0x02000000)) {
output.writeMessage(116, infogainLossParam_);
}
if (((bitField0_ & 0x04000000) == 0x04000000)) {
output.writeMessage(117, innerProductParam_);
}
if (((bitField0_ & 0x20000000) == 0x20000000)) {
output.writeMessage(118, lrnParam_);
}
if (((bitField0_ & 0x40000000) == 0x40000000)) {
output.writeMessage(119, memoryDataParam_);
}
if (((bitField0_ & 0x80000000) == 0x80000000)) {
output.writeMessage(120, mvnParam_);
}
if (((bitField1_ & 0x00000002) == 0x00000002)) {
output.writeMessage(121, poolingParam_);
}
if (((bitField1_ & 0x00000004) == 0x00000004)) {
output.writeMessage(122, powerParam_);
}
if (((bitField1_ & 0x00000080) == 0x00000080)) {
output.writeMessage(123, reluParam_);
}
if (((bitField1_ & 0x00000400) == 0x00000400)) {
output.writeMessage(124, sigmoidParam_);
}
if (((bitField1_ & 0x00000800) == 0x00000800)) {
output.writeMessage(125, softmaxParam_);
}
if (((bitField1_ & 0x00002000) == 0x00002000)) {
output.writeMessage(126, sliceParam_);
}
if (((bitField1_ & 0x00004000) == 0x00004000)) {
output.writeMessage(127, tanhParam_);
}
if (((bitField1_ & 0x00008000) == 0x00008000)) {
output.writeMessage(128, thresholdParam_);
}
if (((bitField1_ & 0x00020000) == 0x00020000)) {
output.writeMessage(129, windowDataParam_);
}
if (((bitField1_ & 0x00000010) == 0x00000010)) {
output.writeMessage(130, pythonParam_);
}
if (((bitField1_ & 0x00000008) == 0x00000008)) {
output.writeMessage(131, preluParam_);
}
if (((bitField1_ & 0x00001000) == 0x00001000)) {
output.writeMessage(132, sppParam_);
}
if (((bitField1_ & 0x00000100) == 0x00000100)) {
output.writeMessage(133, reshapeParam_);
}
if (((bitField0_ & 0x10000000) == 0x10000000)) {
output.writeMessage(134, logParam_);
}
if (((bitField0_ & 0x00100000) == 0x00100000)) {
output.writeMessage(135, flattenParam_);
}
if (((bitField1_ & 0x00000040) == 0x00000040)) {
output.writeMessage(136, reductionParam_);
}
if (((bitField0_ & 0x00040000) == 0x00040000)) {
output.writeMessage(137, embedParam_);
}
if (((bitField1_ & 0x00010000) == 0x00010000)) {
output.writeMessage(138, tileParam_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeMessage(139, batchNormParam_);
}
if (((bitField0_ & 0x00020000) == 0x00020000)) {
output.writeMessage(140, eluParam_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeMessage(141, biasParam_);
}
if (((bitField1_ & 0x00000200) == 0x00000200)) {
output.writeMessage(142, scaleParam_);
}
if (((bitField0_ & 0x08000000) == 0x08000000)) {
output.writeMessage(143, inputParam_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
output.writeMessage(144, cropParam_);
}
if (((bitField1_ & 0x00000001) == 0x00000001)) {
output.writeMessage(145, parameterParam_);
}
if (((bitField1_ & 0x00000020) == 0x00000020)) {
output.writeMessage(146, recurrentParam_);
}
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
.computeBytesSize(2, getTypeBytes());
}
{
int dataSize = 0;
for (int i = 0; i < bottom_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(bottom_.getByteString(i));
}
size += dataSize;
size += 1 * getBottomList().size();
}
{
int dataSize = 0;
for (int i = 0; i < top_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(top_.getByteString(i));
}
size += dataSize;
size += 1 * getTopList().size();
}
{
int dataSize = 0;
dataSize = 4 * getLossWeightList().size();
size += dataSize;
size += 1 * getLossWeightList().size();
}
for (int i = 0; i < param_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, param_.get(i));
}
for (int i = 0; i < blobs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, blobs_.get(i));
}
for (int i = 0; i < include_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, include_.get(i));
}
for (int i = 0; i < exclude_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, exclude_.get(i));
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, phase_.getNumber());
}
{
int dataSize = 0;
dataSize = 1 * getPropagateDownList().size();
size += dataSize;
size += 1 * getPropagateDownList().size();
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(100, transformParam_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(101, lossParam_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(102, accuracyParam_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(103, argmaxParam_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(104, concatParam_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(105, contrastiveLossParam_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(106, convolutionParam_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(107, dataParam_);
}
if (((bitField0_ & 0x00004000) == 0x00004000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(108, dropoutParam_);
}
if (((bitField0_ & 0x00008000) == 0x00008000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(109, dummyDataParam_);
}
if (((bitField0_ & 0x00010000) == 0x00010000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(110, eltwiseParam_);
}
if (((bitField0_ & 0x00080000) == 0x00080000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(111, expParam_);
}
if (((bitField0_ & 0x00200000) == 0x00200000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(112, hdf5DataParam_);
}
if (((bitField0_ & 0x00400000) == 0x00400000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(113, hdf5OutputParam_);
}
if (((bitField0_ & 0x00800000) == 0x00800000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(114, hingeLossParam_);
}
if (((bitField0_ & 0x01000000) == 0x01000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(115, imageDataParam_);
}
if (((bitField0_ & 0x02000000) == 0x02000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(116, infogainLossParam_);
}
if (((bitField0_ & 0x04000000) == 0x04000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(117, innerProductParam_);
}
if (((bitField0_ & 0x20000000) == 0x20000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(118, lrnParam_);
}
if (((bitField0_ & 0x40000000) == 0x40000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(119, memoryDataParam_);
}
if (((bitField0_ & 0x80000000) == 0x80000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(120, mvnParam_);
}
if (((bitField1_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(121, poolingParam_);
}
if (((bitField1_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(122, powerParam_);
}
if (((bitField1_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(123, reluParam_);
}
if (((bitField1_ & 0x00000400) == 0x00000400)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(124, sigmoidParam_);
}
if (((bitField1_ & 0x00000800) == 0x00000800)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(125, softmaxParam_);
}
if (((bitField1_ & 0x00002000) == 0x00002000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(126, sliceParam_);
}
if (((bitField1_ & 0x00004000) == 0x00004000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(127, tanhParam_);
}
if (((bitField1_ & 0x00008000) == 0x00008000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(128, thresholdParam_);
}
if (((bitField1_ & 0x00020000) == 0x00020000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(129, windowDataParam_);
}
if (((bitField1_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(130, pythonParam_);
}
if (((bitField1_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(131, preluParam_);
}
if (((bitField1_ & 0x00001000) == 0x00001000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(132, sppParam_);
}
if (((bitField1_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(133, reshapeParam_);
}
if (((bitField0_ & 0x10000000) == 0x10000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(134, logParam_);
}
if (((bitField0_ & 0x00100000) == 0x00100000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(135, flattenParam_);
}
if (((bitField1_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(136, reductionParam_);
}
if (((bitField0_ & 0x00040000) == 0x00040000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(137, embedParam_);
}
if (((bitField1_ & 0x00010000) == 0x00010000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(138, tileParam_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(139, batchNormParam_);
}
if (((bitField0_ & 0x00020000) == 0x00020000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(140, eluParam_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(141, biasParam_);
}
if (((bitField1_ & 0x00000200) == 0x00000200)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(142, scaleParam_);
}
if (((bitField0_ & 0x08000000) == 0x08000000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(143, inputParam_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(144, cropParam_);
}
if (((bitField1_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(145, parameterParam_);
}
if (((bitField1_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(146, recurrentParam_);
}
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.LayerParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.LayerParameter 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.LayerParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static caffe.Caffe.LayerParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static caffe.Caffe.LayerParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.LayerParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static caffe.Caffe.LayerParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static caffe.Caffe.LayerParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static caffe.Caffe.LayerParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static caffe.Caffe.LayerParameter 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.LayerParameter 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.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 Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements caffe.Caffe.LayerParameterOrBuilder {
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);
}
// Construct using caffe.Caffe.LayerParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getParamFieldBuilder();
getBlobsFieldBuilder();
getIncludeFieldBuilder();
getExcludeFieldBuilder();
getTransformParamFieldBuilder();
getLossParamFieldBuilder();
getAccuracyParamFieldBuilder();
getArgmaxParamFieldBuilder();
getBatchNormParamFieldBuilder();
getBiasParamFieldBuilder();
getConcatParamFieldBuilder();
getContrastiveLossParamFieldBuilder();
getConvolutionParamFieldBuilder();
getCropParamFieldBuilder();
getDataParamFieldBuilder();
getDropoutParamFieldBuilder();
getDummyDataParamFieldBuilder();
getEltwiseParamFieldBuilder();
getEluParamFieldBuilder();
getEmbedParamFieldBuilder();
getExpParamFieldBuilder();
getFlattenParamFieldBuilder();
getHdf5DataParamFieldBuilder();
getHdf5OutputParamFieldBuilder();
getHingeLossParamFieldBuilder();
getImageDataParamFieldBuilder();
getInfogainLossParamFieldBuilder();
getInnerProductParamFieldBuilder();
getInputParamFieldBuilder();
getLogParamFieldBuilder();
getLrnParamFieldBuilder();
getMemoryDataParamFieldBuilder();
getMvnParamFieldBuilder();
getParameterParamFieldBuilder();
getPoolingParamFieldBuilder();
getPowerParamFieldBuilder();
getPreluParamFieldBuilder();
getPythonParamFieldBuilder();
getRecurrentParamFieldBuilder();
getReductionParamFieldBuilder();
getReluParamFieldBuilder();
getReshapeParamFieldBuilder();
getScaleParamFieldBuilder();
getSigmoidParamFieldBuilder();
getSoftmaxParamFieldBuilder();
getSppParamFieldBuilder();
getSliceParamFieldBuilder();
getTanhParamFieldBuilder();
getThresholdParamFieldBuilder();
getTileParamFieldBuilder();
getWindowDataParamFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
type_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
top_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
phase_ = caffe.Caffe.Phase.TRAIN;
bitField0_ = (bitField0_ & ~0x00000010);
lossWeight_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
if (paramBuilder_ == null) {
param_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
} else {
paramBuilder_.clear();
}
if (blobsBuilder_ == null) {
blobs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
} else {
blobsBuilder_.clear();
}
propagateDown_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
if (includeBuilder_ == null) {
include_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
} else {
includeBuilder_.clear();
}
if (excludeBuilder_ == null) {
exclude_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
} else {
excludeBuilder_.clear();
}
if (transformParamBuilder_ == null) {
transformParam_ = caffe.Caffe.TransformationParameter.getDefaultInstance();
} else {
transformParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000800);
if (lossParamBuilder_ == null) {
lossParam_ = caffe.Caffe.LossParameter.getDefaultInstance();
} else {
lossParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00001000);
if (accuracyParamBuilder_ == null) {
accuracyParam_ = caffe.Caffe.AccuracyParameter.getDefaultInstance();
} else {
accuracyParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00002000);
if (argmaxParamBuilder_ == null) {
argmaxParam_ = caffe.Caffe.ArgMaxParameter.getDefaultInstance();
} else {
argmaxParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00004000);
if (batchNormParamBuilder_ == null) {
batchNormParam_ = caffe.Caffe.BatchNormParameter.getDefaultInstance();
} else {
batchNormParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00008000);
if (biasParamBuilder_ == null) {
biasParam_ = caffe.Caffe.BiasParameter.getDefaultInstance();
} else {
biasParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00010000);
if (concatParamBuilder_ == null) {
concatParam_ = caffe.Caffe.ConcatParameter.getDefaultInstance();
} else {
concatParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00020000);
if (contrastiveLossParamBuilder_ == null) {
contrastiveLossParam_ = caffe.Caffe.ContrastiveLossParameter.getDefaultInstance();
} else {
contrastiveLossParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00040000);
if (convolutionParamBuilder_ == null) {
convolutionParam_ = caffe.Caffe.ConvolutionParameter.getDefaultInstance();
} else {
convolutionParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00080000);
if (cropParamBuilder_ == null) {
cropParam_ = caffe.Caffe.CropParameter.getDefaultInstance();
} else {
cropParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00100000);
if (dataParamBuilder_ == null) {
dataParam_ = caffe.Caffe.DataParameter.getDefaultInstance();
} else {
dataParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00200000);
if (dropoutParamBuilder_ == null) {
dropoutParam_ = caffe.Caffe.DropoutParameter.getDefaultInstance();
} else {
dropoutParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00400000);
if (dummyDataParamBuilder_ == null) {
dummyDataParam_ = caffe.Caffe.DummyDataParameter.getDefaultInstance();
} else {
dummyDataParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00800000);
if (eltwiseParamBuilder_ == null) {
eltwiseParam_ = caffe.Caffe.EltwiseParameter.getDefaultInstance();
} else {
eltwiseParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x01000000);
if (eluParamBuilder_ == null) {
eluParam_ = caffe.Caffe.ELUParameter.getDefaultInstance();
} else {
eluParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x02000000);
if (embedParamBuilder_ == null) {
embedParam_ = caffe.Caffe.EmbedParameter.getDefaultInstance();
} else {
embedParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x04000000);
if (expParamBuilder_ == null) {
expParam_ = caffe.Caffe.ExpParameter.getDefaultInstance();
} else {
expParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x08000000);
if (flattenParamBuilder_ == null) {
flattenParam_ = caffe.Caffe.FlattenParameter.getDefaultInstance();
} else {
flattenParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x10000000);
if (hdf5DataParamBuilder_ == null) {
hdf5DataParam_ = caffe.Caffe.HDF5DataParameter.getDefaultInstance();
} else {
hdf5DataParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x20000000);
if (hdf5OutputParamBuilder_ == null) {
hdf5OutputParam_ = caffe.Caffe.HDF5OutputParameter.getDefaultInstance();
} else {
hdf5OutputParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x40000000);
if (hingeLossParamBuilder_ == null) {
hingeLossParam_ = caffe.Caffe.HingeLossParameter.getDefaultInstance();
} else {
hingeLossParamBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x80000000);
if (imageDataParamBuilder_ == null) {
imageDataParam_ = caffe.Caffe.ImageDataParameter.getDefaultInstance();
} else {
imageDataParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000001);
if (infogainLossParamBuilder_ == null) {
infogainLossParam_ = caffe.Caffe.InfogainLossParameter.getDefaultInstance();
} else {
infogainLossParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000002);
if (innerProductParamBuilder_ == null) {
innerProductParam_ = caffe.Caffe.InnerProductParameter.getDefaultInstance();
} else {
innerProductParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000004);
if (inputParamBuilder_ == null) {
inputParam_ = caffe.Caffe.InputParameter.getDefaultInstance();
} else {
inputParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000008);
if (logParamBuilder_ == null) {
logParam_ = caffe.Caffe.LogParameter.getDefaultInstance();
} else {
logParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000010);
if (lrnParamBuilder_ == null) {
lrnParam_ = caffe.Caffe.LRNParameter.getDefaultInstance();
} else {
lrnParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000020);
if (memoryDataParamBuilder_ == null) {
memoryDataParam_ = caffe.Caffe.MemoryDataParameter.getDefaultInstance();
} else {
memoryDataParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000040);
if (mvnParamBuilder_ == null) {
mvnParam_ = caffe.Caffe.MVNParameter.getDefaultInstance();
} else {
mvnParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000080);
if (parameterParamBuilder_ == null) {
parameterParam_ = caffe.Caffe.ParameterParameter.getDefaultInstance();
} else {
parameterParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000100);
if (poolingParamBuilder_ == null) {
poolingParam_ = caffe.Caffe.PoolingParameter.getDefaultInstance();
} else {
poolingParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000200);
if (powerParamBuilder_ == null) {
powerParam_ = caffe.Caffe.PowerParameter.getDefaultInstance();
} else {
powerParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000400);
if (preluParamBuilder_ == null) {
preluParam_ = caffe.Caffe.PReLUParameter.getDefaultInstance();
} else {
preluParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00000800);
if (pythonParamBuilder_ == null) {
pythonParam_ = caffe.Caffe.PythonParameter.getDefaultInstance();
} else {
pythonParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00001000);
if (recurrentParamBuilder_ == null) {
recurrentParam_ = caffe.Caffe.RecurrentParameter.getDefaultInstance();
} else {
recurrentParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00002000);
if (reductionParamBuilder_ == null) {
reductionParam_ = caffe.Caffe.ReductionParameter.getDefaultInstance();
} else {
reductionParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00004000);
if (reluParamBuilder_ == null) {
reluParam_ = caffe.Caffe.ReLUParameter.getDefaultInstance();
} else {
reluParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00008000);
if (reshapeParamBuilder_ == null) {
reshapeParam_ = caffe.Caffe.ReshapeParameter.getDefaultInstance();
} else {
reshapeParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00010000);
if (scaleParamBuilder_ == null) {
scaleParam_ = caffe.Caffe.ScaleParameter.getDefaultInstance();
} else {
scaleParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00020000);
if (sigmoidParamBuilder_ == null) {
sigmoidParam_ = caffe.Caffe.SigmoidParameter.getDefaultInstance();
} else {
sigmoidParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00040000);
if (softmaxParamBuilder_ == null) {
softmaxParam_ = caffe.Caffe.SoftmaxParameter.getDefaultInstance();
} else {
softmaxParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00080000);
if (sppParamBuilder_ == null) {
sppParam_ = caffe.Caffe.SPPParameter.getDefaultInstance();
} else {
sppParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00100000);
if (sliceParamBuilder_ == null) {
sliceParam_ = caffe.Caffe.SliceParameter.getDefaultInstance();
} else {
sliceParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00200000);
if (tanhParamBuilder_ == null) {
tanhParam_ = caffe.Caffe.TanHParameter.getDefaultInstance();
} else {
tanhParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00400000);
if (thresholdParamBuilder_ == null) {
thresholdParam_ = caffe.Caffe.ThresholdParameter.getDefaultInstance();
} else {
thresholdParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x00800000);
if (tileParamBuilder_ == null) {
tileParam_ = caffe.Caffe.TileParameter.getDefaultInstance();
} else {
tileParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x01000000);
if (windowDataParamBuilder_ == null) {
windowDataParam_ = caffe.Caffe.WindowDataParameter.getDefaultInstance();
} else {
windowDataParamBuilder_.clear();
}
bitField1_ = (bitField1_ & ~0x02000000);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return caffe.Caffe.internal_static_caffe_LayerParameter_descriptor;
}
public caffe.Caffe.LayerParameter getDefaultInstanceForType() {
return caffe.Caffe.LayerParameter.getDefaultInstance();
}
public caffe.Caffe.LayerParameter build() {
caffe.Caffe.LayerParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public caffe.Caffe.LayerParameter buildPartial() {
caffe.Caffe.LayerParameter result = new caffe.Caffe.LayerParameter(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.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.type_ = type_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
bottom_ = new com.google.protobuf.UnmodifiableLazyStringList(
bottom_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.bottom_ = bottom_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
top_ = new com.google.protobuf.UnmodifiableLazyStringList(
top_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.top_ = top_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000004;
}
result.phase_ = phase_;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.lossWeight_ = lossWeight_;
if (paramBuilder_ == null) {
if (((bitField0_ & 0x00000040) == 0x00000040)) {
param_ = java.util.Collections.unmodifiableList(param_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.param_ = param_;
} else {
result.param_ = paramBuilder_.build();
}
if (blobsBuilder_ == null) {
if (((bitField0_ & 0x00000080) == 0x00000080)) {
blobs_ = java.util.Collections.unmodifiableList(blobs_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.blobs_ = blobs_;
} else {
result.blobs_ = blobsBuilder_.build();
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
propagateDown_ = java.util.Collections.unmodifiableList(propagateDown_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.propagateDown_ = propagateDown_;
if (includeBuilder_ == null) {
if (((bitField0_ & 0x00000200) == 0x00000200)) {
include_ = java.util.Collections.unmodifiableList(include_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.include_ = include_;
} else {
result.include_ = includeBuilder_.build();
}
if (excludeBuilder_ == null) {
if (((bitField0_ & 0x00000400) == 0x00000400)) {
exclude_ = java.util.Collections.unmodifiableList(exclude_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.exclude_ = exclude_;
} else {
result.exclude_ = excludeBuilder_.build();
}
if (((from_bitField0_ & 0x00000800) == 0x00000800)) {
to_bitField0_ |= 0x00000008;
}
if (transformParamBuilder_ == null) {
result.transformParam_ = transformParam_;
} else {
result.transformParam_ = transformParamBuilder_.build();
}
if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
to_bitField0_ |= 0x00000010;
}
if (lossParamBuilder_ == null) {
result.lossParam_ = lossParam_;
} else {
result.lossParam_ = lossParamBuilder_.build();
}
if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
to_bitField0_ |= 0x00000020;
}
if (accuracyParamBuilder_ == null) {
result.accuracyParam_ = accuracyParam_;
} else {
result.accuracyParam_ = accuracyParamBuilder_.build();
}
if (((from_bitField0_ & 0x00004000) == 0x00004000)) {
to_bitField0_ |= 0x00000040;
}
if (argmaxParamBuilder_ == null) {
result.argmaxParam_ = argmaxParam_;
} else {
result.argmaxParam_ = argmaxParamBuilder_.build();
}
if (((from_bitField0_ & 0x00008000) == 0x00008000)) {
to_bitField0_ |= 0x00000080;
}
if (batchNormParamBuilder_ == null) {
result.batchNormParam_ = batchNormParam_;
} else {
result.batchNormParam_ = batchNormParamBuilder_.build();
}
if (((from_bitField0_ & 0x00010000) == 0x00010000)) {
to_bitField0_ |= 0x00000100;
}
if (biasParamBuilder_ == null) {
result.biasParam_ = biasParam_;
} else {
result.biasParam_ = biasParamBuilder_.build();
}
if (((from_bitField0_ & 0x00020000) == 0x00020000)) {
to_bitField0_ |= 0x00000200;
}
if (concatParamBuilder_ == null) {
result.concatParam_ = concatParam_;
} else {
result.concatParam_ = concatParamBuilder_.build();
}
if (((from_bitField0_ & 0x00040000) == 0x00040000)) {
to_bitField0_ |= 0x00000400;
}
if (contrastiveLossParamBuilder_ == null) {
result.contrastiveLossParam_ = contrastiveLossParam_;
} else {
result.contrastiveLossParam_ = contrastiveLossParamBuilder_.build();
}
if (((from_bitField0_ & 0x00080000) == 0x00080000)) {
to_bitField0_ |= 0x00000800;
}
if (convolutionParamBuilder_ == null) {
result.convolutionParam_ = convolutionParam_;
} else {
result.convolutionParam_ = convolutionParamBuilder_.build();
}
if (((from_bitField0_ & 0x00100000) == 0x00100000)) {
to_bitField0_ |= 0x00001000;
}
if (cropParamBuilder_ == null) {
result.cropParam_ = cropParam_;
} else {
result.cropParam_ = cropParamBuilder_.build();
}
if (((from_bitField0_ & 0x00200000) == 0x00200000)) {
to_bitField0_ |= 0x00002000;
}
if (dataParamBuilder_ == null) {
result.dataParam_ = dataParam_;
} else {
result.dataParam_ = dataParamBuilder_.build();
}
if (((from_bitField0_ & 0x00400000) == 0x00400000)) {
to_bitField0_ |= 0x00004000;
}
if (dropoutParamBuilder_ == null) {
result.dropoutParam_ = dropoutParam_;
} else {
result.dropoutParam_ = dropoutParamBuilder_.build();
}
if (((from_bitField0_ & 0x00800000) == 0x00800000)) {
to_bitField0_ |= 0x00008000;
}
if (dummyDataParamBuilder_ == null) {
result.dummyDataParam_ = dummyDataParam_;
} else {
result.dummyDataParam_ = dummyDataParamBuilder_.build();
}
if (((from_bitField0_ & 0x01000000) == 0x01000000)) {
to_bitField0_ |= 0x00010000;
}
if (eltwiseParamBuilder_ == null) {
result.eltwiseParam_ = eltwiseParam_;
} else {
result.eltwiseParam_ = eltwiseParamBuilder_.build();
}
if (((from_bitField0_ & 0x02000000) == 0x02000000)) {
to_bitField0_ |= 0x00020000;
}
if (eluParamBuilder_ == null) {
result.eluParam_ = eluParam_;
} else {
result.eluParam_ = eluParamBuilder_.build();
}
if (((from_bitField0_ & 0x04000000) == 0x04000000)) {
to_bitField0_ |= 0x00040000;
}
if (embedParamBuilder_ == null) {
result.embedParam_ = embedParam_;
} else {
result.embedParam_ = embedParamBuilder_.build();
}
if (((from_bitField0_ & 0x08000000) == 0x08000000)) {
to_bitField0_ |= 0x00080000;
}
if (expParamBuilder_ == null) {
result.expParam_ = expParam_;
} else {
result.expParam_ = expParamBuilder_.build();
}
if (((from_bitField0_ & 0x10000000) == 0x10000000)) {
to_bitField0_ |= 0x00100000;
}
if (flattenParamBuilder_ == null) {
result.flattenParam_ = flattenParam_;
} else {
result.flattenParam_ = flattenParamBuilder_.build();
}
if (((from_bitField0_ & 0x20000000) == 0x20000000)) {
to_bitField0_ |= 0x00200000;
}
if (hdf5DataParamBuilder_ == null) {
result.hdf5DataParam_ = hdf5DataParam_;
} else {
result.hdf5DataParam_ = hdf5DataParamBuilder_.build();
}
if (((from_bitField0_ & 0x40000000) == 0x40000000)) {
to_bitField0_ |= 0x00400000;
}
if (hdf5OutputParamBuilder_ == null) {
result.hdf5OutputParam_ = hdf5OutputParam_;
} else {
result.hdf5OutputParam_ = hdf5OutputParamBuilder_.build();
}
if (((from_bitField0_ & 0x80000000) == 0x80000000)) {
to_bitField0_ |= 0x00800000;
}
if (hingeLossParamBuilder_ == null) {
result.hingeLossParam_ = hingeLossParam_;
} else {
result.hingeLossParam_ = hingeLossParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x01000000;
}
if (imageDataParamBuilder_ == null) {
result.imageDataParam_ = imageDataParam_;
} else {
result.imageDataParam_ = imageDataParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x02000000;
}
if (infogainLossParamBuilder_ == null) {
result.infogainLossParam_ = infogainLossParam_;
} else {
result.infogainLossParam_ = infogainLossParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x04000000;
}
if (innerProductParamBuilder_ == null) {
result.innerProductParam_ = innerProductParam_;
} else {
result.innerProductParam_ = innerProductParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x08000000;
}
if (inputParamBuilder_ == null) {
result.inputParam_ = inputParam_;
} else {
result.inputParam_ = inputParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x10000000;
}
if (logParamBuilder_ == null) {
result.logParam_ = logParam_;
} else {
result.logParam_ = logParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x20000000;
}
if (lrnParamBuilder_ == null) {
result.lrnParam_ = lrnParam_;
} else {
result.lrnParam_ = lrnParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x40000000;
}
if (memoryDataParamBuilder_ == null) {
result.memoryDataParam_ = memoryDataParam_;
} else {
result.memoryDataParam_ = memoryDataParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x80000000;
}
if (mvnParamBuilder_ == null) {
result.mvnParam_ = mvnParam_;
} else {
result.mvnParam_ = mvnParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000100) == 0x00000100)) {
to_bitField1_ |= 0x00000001;
}
if (parameterParamBuilder_ == null) {
result.parameterParam_ = parameterParam_;
} else {
result.parameterParam_ = parameterParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000200) == 0x00000200)) {
to_bitField1_ |= 0x00000002;
}
if (poolingParamBuilder_ == null) {
result.poolingParam_ = poolingParam_;
} else {
result.poolingParam_ = poolingParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000400) == 0x00000400)) {
to_bitField1_ |= 0x00000004;
}
if (powerParamBuilder_ == null) {
result.powerParam_ = powerParam_;
} else {
result.powerParam_ = powerParamBuilder_.build();
}
if (((from_bitField1_ & 0x00000800) == 0x00000800)) {
to_bitField1_ |= 0x00000008;
}
if (preluParamBuilder_ == null) {
result.preluParam_ = preluParam_;
} else {
result.preluParam_ = preluParamBuilder_.build();
}
if (((from_bitField1_ & 0x00001000) == 0x00001000)) {
to_bitField1_ |= 0x00000010;
}
if (pythonParamBuilder_ == null) {
result.pythonParam_ = pythonParam_;
} else {
result.pythonParam_ = pythonParamBuilder_.build();
}
if (((from_bitField1_ & 0x00002000) == 0x00002000)) {
to_bitField1_ |= 0x00000020;
}
if (recurrentParamBuilder_ == null) {
result.recurrentParam_ = recurrentParam_;
} else {
result.recurrentParam_ = recurrentParamBuilder_.build();
}
if (((from_bitField1_ & 0x00004000) == 0x00004000)) {
to_bitField1_ |= 0x00000040;
}
if (reductionParamBuilder_ == null) {
result.reductionParam_ = reductionParam_;
} else {
result.reductionParam_ = reductionParamBuilder_.build();
}
if (((from_bitField1_ & 0x00008000) == 0x00008000)) {
to_bitField1_ |= 0x00000080;
}
if (reluParamBuilder_ == null) {
result.reluParam_ = reluParam_;
} else {
result.reluParam_ = reluParamBuilder_.build();
}
if (((from_bitField1_ & 0x00010000) == 0x00010000)) {
to_bitField1_ |= 0x00000100;
}
if (reshapeParamBuilder_ == null) {
result.reshapeParam_ = reshapeParam_;
} else {
result.reshapeParam_ = reshapeParamBuilder_.build();
}
if (((from_bitField1_ & 0x00020000) == 0x00020000)) {
to_bitField1_ |= 0x00000200;
}
if (scaleParamBuilder_ == null) {
result.scaleParam_ = scaleParam_;
} else {
result.scaleParam_ = scaleParamBuilder_.build();
}
if (((from_bitField1_ & 0x00040000) == 0x00040000)) {
to_bitField1_ |= 0x00000400;
}
if (sigmoidParamBuilder_ == null) {
result.sigmoidParam_ = sigmoidParam_;
} else {
result.sigmoidParam_ = sigmoidParamBuilder_.build();
}
if (((from_bitField1_ & 0x00080000) == 0x00080000)) {
to_bitField1_ |= 0x00000800;
}
if (softmaxParamBuilder_ == null) {
result.softmaxParam_ = softmaxParam_;
} else {
result.softmaxParam_ = softmaxParamBuilder_.build();
}
if (((from_bitField1_ & 0x00100000) == 0x00100000)) {
to_bitField1_ |= 0x00001000;
}
if (sppParamBuilder_ == null) {
result.sppParam_ = sppParam_;
} else {
result.sppParam_ = sppParamBuilder_.build();
}
if (((from_bitField1_ & 0x00200000) == 0x00200000)) {
to_bitField1_ |= 0x00002000;
}
if (sliceParamBuilder_ == null) {
result.sliceParam_ = sliceParam_;
} else {
result.sliceParam_ = sliceParamBuilder_.build();
}
if (((from_bitField1_ & 0x00400000) == 0x00400000)) {
to_bitField1_ |= 0x00004000;
}
if (tanhParamBuilder_ == null) {
result.tanhParam_ = tanhParam_;
} else {
result.tanhParam_ = tanhParamBuilder_.build();
}
if (((from_bitField1_ & 0x00800000) == 0x00800000)) {
to_bitField1_ |= 0x00008000;
}
if (thresholdParamBuilder_ == null) {
result.thresholdParam_ = thresholdParam_;
} else {
result.thresholdParam_ = thresholdParamBuilder_.build();
}
if (((from_bitField1_ & 0x01000000) == 0x01000000)) {
to_bitField1_ |= 0x00010000;
}
if (tileParamBuilder_ == null) {
result.tileParam_ = tileParam_;
} else {
result.tileParam_ = tileParamBuilder_.build();
}
if (((from_bitField1_ & 0x02000000) == 0x02000000)) {
to_bitField1_ |= 0x00020000;
}
if (windowDataParamBuilder_ == null) {
result.windowDataParam_ = windowDataParam_;
} else {
result.windowDataParam_ = windowDataParamBuilder_.build();
}
result.bitField0_ = to_bitField0_;
result.bitField1_ = to_bitField1_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof caffe.Caffe.LayerParameter) {
return mergeFrom((caffe.Caffe.LayerParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(caffe.Caffe.LayerParameter other) {
if (other == caffe.Caffe.LayerParameter.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasType()) {
bitField0_ |= 0x00000002;
type_ = other.type_;
onChanged();
}
if (!other.bottom_.isEmpty()) {
if (bottom_.isEmpty()) {
bottom_ = other.bottom_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureBottomIsMutable();
bottom_.addAll(other.bottom_);
}
onChanged();
}
if (!other.top_.isEmpty()) {
if (top_.isEmpty()) {
top_ = other.top_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureTopIsMutable();
top_.addAll(other.top_);
}
onChanged();
}
if (other.hasPhase()) {
setPhase(other.getPhase());
}
if (!other.lossWeight_.isEmpty()) {
if (lossWeight_.isEmpty()) {
lossWeight_ = other.lossWeight_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureLossWeightIsMutable();
lossWeight_.addAll(other.lossWeight_);
}
onChanged();
}
if (paramBuilder_ == null) {
if (!other.param_.isEmpty()) {
if (param_.isEmpty()) {
param_ = other.param_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureParamIsMutable();
param_.addAll(other.param_);
}
onChanged();
}
} else {
if (!other.param_.isEmpty()) {
if (paramBuilder_.isEmpty()) {
paramBuilder_.dispose();
paramBuilder_ = null;
param_ = other.param_;
bitField0_ = (bitField0_ & ~0x00000040);
paramBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getParamFieldBuilder() : null;
} else {
paramBuilder_.addAllMessages(other.param_);
}
}
}
if (blobsBuilder_ == null) {
if (!other.blobs_.isEmpty()) {
if (blobs_.isEmpty()) {
blobs_ = other.blobs_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureBlobsIsMutable();
blobs_.addAll(other.blobs_);
}
onChanged();
}
} else {
if (!other.blobs_.isEmpty()) {
if (blobsBuilder_.isEmpty()) {
blobsBuilder_.dispose();
blobsBuilder_ = null;
blobs_ = other.blobs_;
bitField0_ = (bitField0_ & ~0x00000080);
blobsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getBlobsFieldBuilder() : null;
} else {
blobsBuilder_.addAllMessages(other.blobs_);
}
}
}
if (!other.propagateDown_.isEmpty()) {
if (propagateDown_.isEmpty()) {
propagateDown_ = other.propagateDown_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensurePropagateDownIsMutable();
propagateDown_.addAll(other.propagateDown_);
}
onChanged();
}
if (includeBuilder_ == null) {
if (!other.include_.isEmpty()) {
if (include_.isEmpty()) {
include_ = other.include_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureIncludeIsMutable();
include_.addAll(other.include_);
}
onChanged();
}
} else {
if (!other.include_.isEmpty()) {
if (includeBuilder_.isEmpty()) {
includeBuilder_.dispose();
includeBuilder_ = null;
include_ = other.include_;
bitField0_ = (bitField0_ & ~0x00000200);
includeBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getIncludeFieldBuilder() : null;
} else {
includeBuilder_.addAllMessages(other.include_);
}
}
}
if (excludeBuilder_ == null) {
if (!other.exclude_.isEmpty()) {
if (exclude_.isEmpty()) {
exclude_ = other.exclude_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureExcludeIsMutable();
exclude_.addAll(other.exclude_);
}
onChanged();
}
} else {
if (!other.exclude_.isEmpty()) {
if (excludeBuilder_.isEmpty()) {
excludeBuilder_.dispose();
excludeBuilder_ = null;
exclude_ = other.exclude_;
bitField0_ = (bitField0_ & ~0x00000400);
excludeBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getExcludeFieldBuilder() : null;
} else {
excludeBuilder_.addAllMessages(other.exclude_);
}
}
}
if (other.hasTransformParam()) {
mergeTransformParam(other.getTransformParam());
}
if (other.hasLossParam()) {
mergeLossParam(other.getLossParam());
}
if (other.hasAccuracyParam()) {
mergeAccuracyParam(other.getAccuracyParam());
}
if (other.hasArgmaxParam()) {
mergeArgmaxParam(other.getArgmaxParam());
}
if (other.hasBatchNormParam()) {
mergeBatchNormParam(other.getBatchNormParam());
}
if (other.hasBiasParam()) {
mergeBiasParam(other.getBiasParam());
}
if (other.hasConcatParam()) {
mergeConcatParam(other.getConcatParam());
}
if (other.hasContrastiveLossParam()) {
mergeContrastiveLossParam(other.getContrastiveLossParam());
}
if (other.hasConvolutionParam()) {
mergeConvolutionParam(other.getConvolutionParam());
}
if (other.hasCropParam()) {
mergeCropParam(other.getCropParam());
}
if (other.hasDataParam()) {
mergeDataParam(other.getDataParam());
}
if (other.hasDropoutParam()) {
mergeDropoutParam(other.getDropoutParam());
}
if (other.hasDummyDataParam()) {
mergeDummyDataParam(other.getDummyDataParam());
}
if (other.hasEltwiseParam()) {
mergeEltwiseParam(other.getEltwiseParam());
}
if (other.hasEluParam()) {
mergeEluParam(other.getEluParam());
}
if (other.hasEmbedParam()) {
mergeEmbedParam(other.getEmbedParam());
}
if (other.hasExpParam()) {
mergeExpParam(other.getExpParam());
}
if (other.hasFlattenParam()) {
mergeFlattenParam(other.getFlattenParam());
}
if (other.hasHdf5DataParam()) {
mergeHdf5DataParam(other.getHdf5DataParam());
}
if (other.hasHdf5OutputParam()) {
mergeHdf5OutputParam(other.getHdf5OutputParam());
}
if (other.hasHingeLossParam()) {
mergeHingeLossParam(other.getHingeLossParam());
}
if (other.hasImageDataParam()) {
mergeImageDataParam(other.getImageDataParam());
}
if (other.hasInfogainLossParam()) {
mergeInfogainLossParam(other.getInfogainLossParam());
}
if (other.hasInnerProductParam()) {
mergeInnerProductParam(other.getInnerProductParam());
}
if (other.hasInputParam()) {
mergeInputParam(other.getInputParam());
}
if (other.hasLogParam()) {
mergeLogParam(other.getLogParam());
}
if (other.hasLrnParam()) {
mergeLrnParam(other.getLrnParam());
}
if (other.hasMemoryDataParam()) {
mergeMemoryDataParam(other.getMemoryDataParam());
}
if (other.hasMvnParam()) {
mergeMvnParam(other.getMvnParam());
}
if (other.hasParameterParam()) {
mergeParameterParam(other.getParameterParam());
}
if (other.hasPoolingParam()) {
mergePoolingParam(other.getPoolingParam());
}
if (other.hasPowerParam()) {
mergePowerParam(other.getPowerParam());
}
if (other.hasPreluParam()) {
mergePreluParam(other.getPreluParam());
}
if (other.hasPythonParam()) {
mergePythonParam(other.getPythonParam());
}
if (other.hasRecurrentParam()) {
mergeRecurrentParam(other.getRecurrentParam());
}
if (other.hasReductionParam()) {
mergeReductionParam(other.getReductionParam());
}
if (other.hasReluParam()) {
mergeReluParam(other.getReluParam());
}
if (other.hasReshapeParam()) {
mergeReshapeParam(other.getReshapeParam());
}
if (other.hasScaleParam()) {
mergeScaleParam(other.getScaleParam());
}
if (other.hasSigmoidParam()) {
mergeSigmoidParam(other.getSigmoidParam());
}
if (other.hasSoftmaxParam()) {
mergeSoftmaxParam(other.getSoftmaxParam());
}
if (other.hasSppParam()) {
mergeSppParam(other.getSppParam());
}
if (other.hasSliceParam()) {
mergeSliceParam(other.getSliceParam());
}
if (other.hasTanhParam()) {
mergeTanhParam(other.getTanhParam());
}
if (other.hasThresholdParam()) {
mergeThresholdParam(other.getThresholdParam());
}
if (other.hasTileParam()) {
mergeTileParam(other.getTileParam());
}
if (other.hasWindowDataParam()) {
mergeWindowDataParam(other.getWindowDataParam());
}
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.LayerParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (caffe.Caffe.LayerParameter) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int bitField1_;
// optional string name = 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)) {
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 layer 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 layer 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 layer name
*
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
*
*
* the layer name
*
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
// optional string type = 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)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string type = 2;
*
*
* the layer 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 = 2;
*
*
* the layer type
*
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
/**
* optional string type = 2;
*
*
* the layer type
*
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
* optional string type = 2;
*
*
* the layer type
*
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
// repeated string bottom = 3;
private com.google.protobuf.LazyStringList bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureBottomIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
bottom_ = new com.google.protobuf.LazyStringArrayList(bottom_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public java.util.List
getBottomList() {
return java.util.Collections.unmodifiableList(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 bottom = 3;
*
*
* the name of each bottom blob
*
*/
public Builder setBottom(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBottomIsMutable();
bottom_.set(index, value);
onChanged();
return this;
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public Builder addBottom(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBottomIsMutable();
bottom_.add(value);
onChanged();
return this;
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public Builder addAllBottom(
java.lang.Iterable values) {
ensureBottomIsMutable();
super.addAll(values, bottom_);
onChanged();
return this;
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public Builder clearBottom() {
bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* repeated string bottom = 3;
*
*
* the name of each bottom blob
*
*/
public Builder addBottomBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureBottomIsMutable();
bottom_.add(value);
onChanged();
return this;
}
// repeated string top = 4;
private com.google.protobuf.LazyStringList top_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTopIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
top_ = new com.google.protobuf.LazyStringArrayList(top_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public java.util.List
getTopList() {
return java.util.Collections.unmodifiableList(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);
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public Builder setTop(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTopIsMutable();
top_.set(index, value);
onChanged();
return this;
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public Builder addTop(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTopIsMutable();
top_.add(value);
onChanged();
return this;
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public Builder addAllTop(
java.lang.Iterable values) {
ensureTopIsMutable();
super.addAll(values, top_);
onChanged();
return this;
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public Builder clearTop() {
top_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* repeated string top = 4;
*
*
* the name of each top blob
*
*/
public Builder addTopBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureTopIsMutable();
top_.add(value);
onChanged();
return this;
}
// optional .caffe.Phase phase = 10;
private caffe.Caffe.Phase phase_ = caffe.Caffe.Phase.TRAIN;
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public boolean hasPhase() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public caffe.Caffe.Phase getPhase() {
return phase_;
}
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public Builder setPhase(caffe.Caffe.Phase value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
phase_ = value;
onChanged();
return this;
}
/**
* optional .caffe.Phase phase = 10;
*
*
* The train / test phase for computation.
*
*/
public Builder clearPhase() {
bitField0_ = (bitField0_ & ~0x00000010);
phase_ = caffe.Caffe.Phase.TRAIN;
onChanged();
return this;
}
// repeated float loss_weight = 5;
private java.util.List lossWeight_ = java.util.Collections.emptyList();
private void ensureLossWeightIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
lossWeight_ = new java.util.ArrayList(lossWeight_);
bitField0_ |= 0x00000020;
}
}
/**
* 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 java.util.Collections.unmodifiableList(lossWeight_);
}
/**
*