diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..2911dac --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: org.acl.deepspark.nn.driver.AsyncCIFARTest + diff --git a/src/main/java/caffe/Caffe.java b/src/main/java/caffe/Caffe.java index ed294bc..68cc03c 100644 --- a/src/main/java/caffe/Caffe.java +++ b/src/main/java/caffe/Caffe.java @@ -1,82370 +1,89565 @@ -// 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 final com.google.protobuf.Internal.EnumLiteMap< - Phase> 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 - // @@protoc_insertion_point(interface_extends:caffe.BlobShape) - com.google.protobuf.MessageOrBuilder { - - /** - * 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 - // @@protoc_insertion_point(message_implements:caffe.BlobShape) - BlobShapeOrBuilder { - // Use BlobShape.newBuilder() to construct. - private BlobShape(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BlobShape() { - dim_ = java.util.Collections.emptyList(); - } - - @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) { - this(); - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getDimList().size() > 0) { - output.writeRawVarint32(10); - output.writeRawVarint32(dimMemoizedSerializedSize); - } - for (int i = 0; i < dim_.size(); i++) { - output.writeInt64NoTag(dim_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.BlobShape prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.BlobShape) - 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) { - } - } - public Builder clear() { - super.clear(); - dim_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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) - } - - // @@protoc_insertion_point(class_scope:caffe.BlobShape) - private static final caffe.Caffe.BlobShape DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.BlobShape(); - } - - public static caffe.Caffe.BlobShape getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new BlobShape(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.BlobShape getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BlobProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.BlobProto) - com.google.protobuf.MessageOrBuilder { - - /** - * 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]; - */ - 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]; - */ - 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]; - */ - 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]; - */ - 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]; - * - *
-     * 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]; - */ - boolean hasChannels(); - /** - * optional int32 channels = 2 [default = 0]; - */ - int getChannels(); - - /** - * optional int32 height = 3 [default = 0]; - */ - boolean hasHeight(); - /** - * optional int32 height = 3 [default = 0]; - */ - int getHeight(); - - /** - * 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 - // @@protoc_insertion_point(message_implements:caffe.BlobProto) - BlobProtoOrBuilder { - // Use BlobProto.newBuilder() to construct. - private BlobProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BlobProto() { - 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; - } - - @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) { - this(); - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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); - } - - private int bitField0_; - 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_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } - /** - * optional .caffe.BlobShape shape = 7; - */ - public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { - return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } - - 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; - - 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; - - 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; - - 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; - - 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_; - } - - 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_; - } - - 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_; - } - - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - 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, getShape()); - } - 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)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - 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, getShape()); - } - { - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.BlobProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.BlobProto) - 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(); - } - } - public Builder clear() { - super.clear(); - if (shapeBuilder_ == null) { - shape_ = null; - } 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 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - private caffe.Caffe.BlobShape shape_ = null; - 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_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : 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_ != null && - 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_ = null; - 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_ == null ? - caffe.Caffe.BlobShape.getDefaultInstance() : 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>( - getShape(), - getParentForChildren(), - isClean()); - shape_ = null; - } - return shapeBuilder_; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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; - } - - 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; - } - - 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; - } - - 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) - } - - // @@protoc_insertion_point(class_scope:caffe.BlobProto) - private static final caffe.Caffe.BlobProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.BlobProto(); - } - - public static caffe.Caffe.BlobProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new BlobProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.BlobProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BlobProtoVectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.BlobProtoVector) - com.google.protobuf.MessageOrBuilder { - - /** - * 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 - // @@protoc_insertion_point(message_implements:caffe.BlobProtoVector) - BlobProtoVectorOrBuilder { - // Use BlobProtoVector.newBuilder() to construct. - private BlobProtoVector(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BlobProtoVector() { - blobs_ = java.util.Collections.emptyList(); - } - - @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) { - this(); - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < blobs_.size(); i++) { - output.writeMessage(1, blobs_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.BlobProtoVector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.BlobProtoVector) - 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(); - } - } - public Builder clear() { - super.clear(); - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blobsBuilder_.clear(); - } - return this; - } - - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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) - } - - // @@protoc_insertion_point(class_scope:caffe.BlobProtoVector) - private static final caffe.Caffe.BlobProtoVector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.BlobProtoVector(); - } - - public static caffe.Caffe.BlobProtoVector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new BlobProtoVector(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.BlobProtoVector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DatumOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.Datum) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 channels = 1; - */ - boolean hasChannels(); - /** - * optional int32 channels = 1; - */ - int getChannels(); - - /** - * optional int32 height = 2; - */ - boolean hasHeight(); - /** - * optional int32 height = 2; - */ - int getHeight(); - - /** - * optional int32 width = 3; - */ - boolean hasWidth(); - /** - * optional int32 width = 3; - */ - int getWidth(); - - /** - * 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; - */ - boolean hasLabel(); - /** - * optional int32 label = 5; - */ - int getLabel(); - - /** - * 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]; - * - *
-     * 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 - // @@protoc_insertion_point(message_implements:caffe.Datum) - DatumOrBuilder { - // Use Datum.newBuilder() to construct. - private Datum(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Datum() { - channels_ = 0; - height_ = 0; - width_ = 0; - data_ = com.google.protobuf.ByteString.EMPTY; - label_ = 0; - floatData_ = java.util.Collections.emptyList(); - encoded_ = false; - } - - @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) { - this(); - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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); - } - - private int bitField0_; - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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); - } - - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((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_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.Datum prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.Datum) - 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) { - } - } - 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 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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) - } - - // @@protoc_insertion_point(class_scope:caffe.Datum) - private static final caffe.Caffe.Datum DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.Datum(); - } - - public static caffe.Caffe.Datum getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new Datum(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.Datum getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface FillerParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.FillerParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * 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]; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * 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]; - */ - 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 - // @@protoc_insertion_point(message_implements:caffe.FillerParameter) - FillerParameterOrBuilder { - // Use FillerParameter.newBuilder() to construct. - private FillerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FillerParameter() { - type_ = "constant"; - value_ = 0F; - min_ = 0F; - max_ = 1F; - mean_ = 0F; - std_ = 1F; - sparse_ = -1; - varianceNorm_ = 0; - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - type_ = bs; - 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_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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); - } - - /** - * 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 final com.google.protobuf.Internal.EnumLiteMap< - VarianceNorm> 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_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile 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; - } - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - public static final int VARIANCE_NORM_FIELD_NUMBER = 8; - private int 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() { - caffe.Caffe.FillerParameter.VarianceNorm result = caffe.Caffe.FillerParameter.VarianceNorm.valueOf(varianceNorm_); - return result == null ? caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); - } - 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_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); - } - 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_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.FillerParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.FillerParameter) - 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) { - } - } - 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_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - private int varianceNorm_ = 0; - /** - * 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() { - caffe.Caffe.FillerParameter.VarianceNorm result = caffe.Caffe.FillerParameter.VarianceNorm.valueOf(varianceNorm_); - return result == null ? caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN : result; - } - /** - * 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.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN]; - */ - public Builder clearVarianceNorm() { - bitField0_ = (bitField0_ & ~0x00000080); - varianceNorm_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.FillerParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.FillerParameter) - private static final caffe.Caffe.FillerParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.FillerParameter(); - } - - public static caffe.Caffe.FillerParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new FillerParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.FillerParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NetParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.NetParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * The input blobs to the network.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getInputList(); - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - int getInputCount(); - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - java.lang.String getInput(int index); - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - com.google.protobuf.ByteString - getInputBytes(int index); - - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - java.util.List - getInputShapeList(); - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - caffe.Caffe.BlobShape getInputShape(int index); - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - int getInputShapeCount(); - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - java.util.List - getInputShapeOrBuilderList(); - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - caffe.Caffe.BlobShapeOrBuilder getInputShapeOrBuilder( - int index); - - /** - * repeated int32 input_dim = 4; - * - *
-     * 4D input dimensions -- deprecated.  Use "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 "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 "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]; - * - *
-     * 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; - * - *
-     * 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]; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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 - // @@protoc_insertion_point(message_implements:caffe.NetParameter) - NetParameterOrBuilder { - // Use NetParameter.newBuilder() to construct. - private NetParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NetParameter() { - name_ = ""; - input_ = com.google.protobuf.LazyStringArrayList.EMPTY; - inputShape_ = java.util.Collections.emptyList(); - inputDim_ = java.util.Collections.emptyList(); - forceBackward_ = false; - debugInfo_ = false; - layer_ = java.util.Collections.emptyList(); - layers_ = java.util.Collections.emptyList(); - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - input_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - input_.add(bs); - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ = input_.getUnmodifiableView(); - } - 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); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile 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; - } - } - - public static final int INPUT_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList input_; - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getInputList() { - return input_; - } - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - public int getInputCount() { - return input_.size(); - } - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - public java.lang.String getInput(int index) { - return input_.get(index); - } - /** - * repeated string input = 3; - * - *
-     * The input blobs to the network.
-     * 
- */ - public com.google.protobuf.ByteString - getInputBytes(int index) { - return input_.getByteString(index); - } - - public static final int INPUT_SHAPE_FIELD_NUMBER = 8; - private java.util.List inputShape_; - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - public java.util.List getInputShapeList() { - return inputShape_; - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - public java.util.List - getInputShapeOrBuilderList() { - return inputShape_; - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - public int getInputShapeCount() { - return inputShape_.size(); - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - public caffe.Caffe.BlobShape getInputShape(int index) { - return inputShape_.get(index); - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-     * The shape of the input blobs.
-     * 
- */ - public caffe.Caffe.BlobShapeOrBuilder getInputShapeOrBuilder( - int index) { - return inputShape_.get(index); - } - - public static final int INPUT_DIM_FIELD_NUMBER = 4; - private java.util.List inputDim_; - /** - * repeated int32 input_dim = 4; - * - *
-     * 4D input dimensions -- deprecated.  Use "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 "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 "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); - } - - 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_; - } - - 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : state_; - } - - 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_; - } - - 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); - } - - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - for (int i = 0; i < layers_.size(); i++) { - output.writeMessage(2, layers_.get(i)); - } - for (int i = 0; i < input_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, input_.getRaw(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, getState()); - } - 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)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - 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 += computeStringSizeNoTag(input_.getRaw(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, getState()); - } - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.NetParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.NetParameter) - 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(); - } - } - 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_ = null; - } 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 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_ = input_.getUnmodifiableView(); - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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; - * - *
-       * The input blobs to the network.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getInputList() { - return input_.getUnmodifiableView(); - } - /** - * repeated string input = 3; - * - *
-       * The input blobs to the network.
-       * 
- */ - public int getInputCount() { - return input_.size(); - } - /** - * repeated string input = 3; - * - *
-       * The input blobs to the network.
-       * 
- */ - public java.lang.String getInput(int index) { - return input_.get(index); - } - /** - * repeated string input = 3; - * - *
-       * The input blobs to the network.
-       * 
- */ - public com.google.protobuf.ByteString - getInputBytes(int index) { - return input_.getByteString(index); - } - /** - * repeated string input = 3; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * The input blobs to the network.
-       * 
- */ - public Builder addAllInput( - java.lang.Iterable values) { - ensureInputIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, input_); - onChanged(); - return this; - } - /** - * repeated string input = 3; - * - *
-       * 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; - * - *
-       * 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; - } - - 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * The shape of the input blobs.
-       * 
- */ - public Builder addAllInputShape( - java.lang.Iterable values) { - if (inputShapeBuilder_ == null) { - ensureInputShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, inputShape_); - onChanged(); - } else { - inputShapeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * The shape of the input blobs.
-       * 
- */ - public caffe.Caffe.BlobShape.Builder getInputShapeBuilder( - int index) { - return getInputShapeFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.BlobShape input_shape = 8; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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_; - } - - 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 "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 "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 "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 "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 "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 "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(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, inputDim_); - onChanged(); - return this; - } - /** - * repeated int32 input_dim = 4; - * - *
-       * 4D input dimensions -- deprecated.  Use "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; - } - - 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; - } - - private caffe.Caffe.NetState state_ = null; - 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : 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_ != null && - 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_ = null; - 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_ == null ? - caffe.Caffe.NetState.getDefaultInstance() : 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>( - getState(), - getParentForChildren(), - isClean()); - state_ = null; - } - return stateBuilder_; - } - - 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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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_; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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) - } - - // @@protoc_insertion_point(class_scope:caffe.NetParameter) - private static final caffe.Caffe.NetParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.NetParameter(); - } - - public static caffe.Caffe.NetParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new NetParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.NetParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SolverParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SolverParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * Proto filenames for the test nets.
-     * 
- */ - com.google.protobuf.ProtocolStringList - 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - boolean hasTrainState(); - /** - * optional .caffe.NetState train_state = 26; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - caffe.Caffe.NetState getTrainState(); - /** - * optional .caffe.NetState train_state = 26; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder(); - - /** - * repeated .caffe.NetState test_state = 27; - */ - 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; - * - *
-     * 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]; - * - *
-     * 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]; - */ - boolean hasTestComputeLoss(); - /** - * optional bool test_compute_loss = 19 [default = false]; - */ - boolean getTestComputeLoss(); - - /** - * 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; - * - *
-     * The base learning rate
-     * 
- */ - boolean hasBaseLr(); - /** - * optional float base_lr = 5; - * - *
-     * The base learning rate
-     * 
- */ - float getBaseLr(); - - /** - * 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]; - * - *
-     * 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; - * - *
-     * 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]; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * The momentum value.
-     * 
- */ - boolean hasMomentum(); - /** - * optional float momentum = 11; - * - *
-     * The momentum value.
-     * 
- */ - float getMomentum(); - - /** - * 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"]; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * The snapshot interval
-     * 
- */ - boolean hasSnapshot(); - /** - * optional int32 snapshot = 14 [default = 0]; - * - *
-     * The snapshot interval
-     * 
- */ - int getSnapshot(); - - /** - * 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]; - * - *
-     * 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]; - */ - 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]; - */ - boolean hasSolverMode(); - /** - * optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU]; - */ - caffe.Caffe.SolverParameter.SolverMode getSolverMode(); - - /** - * 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]; - * - *
-     * 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 .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - boolean hasSolverType(); - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - caffe.Caffe.SolverParameter.SolverType getSolverType(); - - /** - * 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]; - * - *
-     * 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; - * - *
-     * RMSProp decay value
-     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
-     * 
- */ - boolean hasRmsDecay(); - /** - * optional float rms_decay = 38; - * - *
-     * RMSProp decay value
-     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
-     * 
- */ - float getRmsDecay(); - - /** - * 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]; - * - *
-     * 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(); - } - /** - * Protobuf type {@code caffe.SolverParameter} - * - *
-   * NOTE
-   * Update the next available ID when you add a new SolverParameter field.
-   * SolverParameter next available ID: 40 (last added: momentum2)
-   * 
- */ - public static final class SolverParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.SolverParameter) - SolverParameterOrBuilder { - // Use SolverParameter.newBuilder() to construct. - private SolverParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SolverParameter() { - net_ = ""; - trainNet_ = ""; - testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - testNetParam_ = java.util.Collections.emptyList(); - 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_ = 1; - solverMode_ = 1; - deviceId_ = 0; - randomSeed_ = -1L; - solverType_ = 0; - delta_ = 1e-08F; - momentum2_ = 0.999F; - rmsDecay_ = 0F; - debugInfo_ = false; - snapshotAfterTrain_ = true; - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - trainNet_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - testNet_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - testNet_.add(bs); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00002000; - lrPolicy_ = bs; - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00400000; - snapshotPrefix_ = bs; - 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_ = rawValue; - } - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - net_ = bs; - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00040000; - regularizationType_ = bs; - 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 { - bitField0_ |= 0x10000000; - solverType_ = rawValue; - } - 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_ = rawValue; - } - break; - } - case 309: { - bitField0_ |= 0x80000000; - rmsDecay_ = input.readFloat(); - break; - } - case 317: { - bitField0_ |= 0x40000000; - momentum2_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - testNet_ = testNet_.getUnmodifiableView(); - } - 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); - } - - /** - * 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 final com.google.protobuf.Internal.EnumLiteMap< - SnapshotFormat> 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 final com.google.protobuf.Internal.EnumLiteMap< - SolverMode> 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} - * - *
-     * Solver type
-     * 
- */ - 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 final com.google.protobuf.Internal.EnumLiteMap< - SolverType> 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_; - public static final int NET_FIELD_NUMBER = 24; - private volatile 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; - } - } - - 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : netParam_; - } - - public static final int TRAIN_NET_FIELD_NUMBER = 1; - private volatile 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; - } - } - - 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 com.google.protobuf.ProtocolStringList - 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); - } - - 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : trainNetParam_; - } - /** - * optional .caffe.NetParameter train_net_param = 21; - * - *
-     * Inline train net params.
-     * 
- */ - public caffe.Caffe.NetParameterOrBuilder getTrainNetParamOrBuilder() { - return trainNetParam_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : trainNetParam_; - } - - 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); - } - - public static final int TRAIN_STATE_FIELD_NUMBER = 26; - private caffe.Caffe.NetState trainState_; - /** - * optional .caffe.NetState train_state = 26; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - public boolean hasTrainState() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - public caffe.Caffe.NetState getTrainState() { - return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-     * The states for the train/test nets. Must be unspecified or
-     * specified once per net.
-     * By default, all states will have solver = true;
-     * train_state will have phase = TRAIN,
-     * and all test_state's will have phase = TEST.
-     * Other defaults are set according to the NetState defaults.
-     * 
- */ - public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() { - return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; - } - - 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); - } - - 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); - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - public static final int LR_POLICY_FIELD_NUMBER = 8; - private volatile 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; - } - } - - 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_; - } - - 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_; - } - - 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_; - } - - 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_; - } - - public static final int REGULARIZATION_TYPE_FIELD_NUMBER = 29; - private volatile 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; - } - } - - 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_; - } - - 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); - } - - 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_; - } - - 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_; - } - - public static final int SNAPSHOT_PREFIX_FIELD_NUMBER = 15; - private volatile 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; - } - } - - 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_; - } - - public static final int SNAPSHOT_FORMAT_FIELD_NUMBER = 37; - private int 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() { - caffe.Caffe.SolverParameter.SnapshotFormat result = caffe.Caffe.SolverParameter.SnapshotFormat.valueOf(snapshotFormat_); - return result == null ? caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO : result; - } - - public static final int SOLVER_MODE_FIELD_NUMBER = 17; - private int 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() { - caffe.Caffe.SolverParameter.SolverMode result = caffe.Caffe.SolverParameter.SolverMode.valueOf(solverMode_); - return result == null ? caffe.Caffe.SolverParameter.SolverMode.GPU : result; - } - - 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_; - } - - 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_; - } - - public static final int SOLVER_TYPE_FIELD_NUMBER = 30; - private int solverType_; - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public boolean hasSolverType() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public caffe.Caffe.SolverParameter.SolverType getSolverType() { - caffe.Caffe.SolverParameter.SolverType result = caffe.Caffe.SolverParameter.SolverType.valueOf(solverType_); - return result == null ? caffe.Caffe.SolverParameter.SolverType.SGD : result; - } - - 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_; - } - - 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_; - } - - public static final int RMS_DECAY_FIELD_NUMBER = 38; - private float rmsDecay_; - /** - * optional float rms_decay = 38; - * - *
-     * 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; - * - *
-     * RMSProp decay value
-     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
-     * 
- */ - public float getRmsDecay() { - return rmsDecay_; - } - - 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_; - } - - 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_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, trainNet_); - } - for (int i = 0; i < testNet_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, testNet_.getRaw(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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, lrPolicy_); - } - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 15, snapshotPrefix_); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - output.writeBool(16, snapshotDiff_); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - output.writeEnum(17, solverMode_); - } - 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, getTrainNetParam()); - } - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 24, net_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(25, getNetParam()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(26, getTrainState()); - } - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 29, regularizationType_); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - output.writeEnum(30, solverType_); - } - 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_); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - output.writeFloat(38, rmsDecay_); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - output.writeFloat(39, momentum2_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trainNet_); - } - { - int dataSize = 0; - for (int i = 0; i < testNet_.size(); i++) { - dataSize += computeStringSizeNoTag(testNet_.getRaw(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.GeneratedMessage.computeStringSize(8, lrPolicy_); - } - 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.GeneratedMessage.computeStringSize(15, snapshotPrefix_); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(16, snapshotDiff_); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(17, solverMode_); - } - 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, getTrainNetParam()); - } - 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.GeneratedMessage.computeStringSize(24, net_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(25, getNetParam()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(26, getTrainState()); - } - 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.GeneratedMessage.computeStringSize(29, regularizationType_); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(30, solverType_); - } - 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_); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(38, rmsDecay_); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(39, momentum2_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SolverParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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: 40 (last added: momentum2)
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.SolverParameter) - 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(); - } - } - public Builder clear() { - super.clear(); - net_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (netParamBuilder_ == null) { - netParam_ = null; - } else { - netParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - trainNet_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - if (trainNetParamBuilder_ == null) { - trainNetParam_ = null; - } else { - trainNetParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (testNetParamBuilder_ == null) { - testNetParam_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - testNetParamBuilder_.clear(); - } - if (trainStateBuilder_ == null) { - trainState_ = null; - } 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_ = 1; - bitField0_ = (bitField0_ & ~0x20000000); - solverMode_ = 1; - bitField0_ = (bitField0_ & ~0x40000000); - deviceId_ = 0; - bitField0_ = (bitField0_ & ~0x80000000); - randomSeed_ = -1L; - bitField1_ = (bitField1_ & ~0x00000001); - solverType_ = 0; - bitField1_ = (bitField1_ & ~0x00000002); - delta_ = 1e-08F; - bitField1_ = (bitField1_ & ~0x00000004); - momentum2_ = 0.999F; - bitField1_ = (bitField1_ & ~0x00000008); - rmsDecay_ = 0F; - bitField1_ = (bitField1_ & ~0x00000010); - debugInfo_ = false; - bitField1_ = (bitField1_ & ~0x00000020); - snapshotAfterTrain_ = true; - bitField1_ = (bitField1_ & ~0x00000040); - return this; - } - - 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_ = testNet_.getUnmodifiableView(); - 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.solverType_ = solverType_; - 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_; - 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.hasSolverType()) { - setSolverType(other.getSolverType()); - } - 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()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - private caffe.Caffe.NetParameter netParam_ = null; - 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ != null && - 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_ = null; - 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_ == null ? - caffe.Caffe.NetParameter.getDefaultInstance() : 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>( - getNetParam(), - getParentForChildren(), - isClean()); - netParam_ = null; - } - return netParamBuilder_; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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 com.google.protobuf.ProtocolStringList - getTestNetList() { - return testNet_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - private caffe.Caffe.NetParameter trainNetParam_ = null; - 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ != null && - 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_ = null; - 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_ == null ? - caffe.Caffe.NetParameter.getDefaultInstance() : 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>( - getTrainNetParam(), - getParentForChildren(), - isClean()); - trainNetParam_ = null; - } - return trainNetParamBuilder_; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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_; - } - - private caffe.Caffe.NetState trainState_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> trainStateBuilder_; - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public boolean hasTrainState() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public caffe.Caffe.NetState getTrainState() { - if (trainStateBuilder_ == null) { - return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; - } else { - return trainStateBuilder_.getMessage(); - } - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public Builder setTrainState(caffe.Caffe.NetState value) { - if (trainStateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - trainState_ = value; - onChanged(); - } else { - trainStateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public Builder setTrainState( - caffe.Caffe.NetState.Builder builderForValue) { - if (trainStateBuilder_ == null) { - trainState_ = builderForValue.build(); - onChanged(); - } else { - trainStateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public Builder mergeTrainState(caffe.Caffe.NetState value) { - if (trainStateBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040) && - trainState_ != null && - trainState_ != caffe.Caffe.NetState.getDefaultInstance()) { - trainState_ = - caffe.Caffe.NetState.newBuilder(trainState_).mergeFrom(value).buildPartial(); - } else { - trainState_ = value; - } - onChanged(); - } else { - trainStateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public Builder clearTrainState() { - if (trainStateBuilder_ == null) { - trainState_ = null; - onChanged(); - } else { - trainStateBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public caffe.Caffe.NetState.Builder getTrainStateBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getTrainStateFieldBuilder().getBuilder(); - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() { - if (trainStateBuilder_ != null) { - return trainStateBuilder_.getMessageOrBuilder(); - } else { - return trainState_ == null ? - caffe.Caffe.NetState.getDefaultInstance() : trainState_; - } - } - /** - * optional .caffe.NetState train_state = 26; - * - *
-       * The states for the train/test nets. Must be unspecified or
-       * specified once per net.
-       * By default, all states will have solver = true;
-       * train_state will have phase = TRAIN,
-       * and all test_state's will have phase = TEST.
-       * Other defaults are set according to the NetState defaults.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> - getTrainStateFieldBuilder() { - if (trainStateBuilder_ == null) { - trainStateBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>( - getTrainState(), - getParentForChildren(), - isClean()); - trainState_ = null; - } - return trainStateBuilder_; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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_; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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; - } - - 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; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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; - } - - private int snapshotFormat_ = 1; - /** - * 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() { - caffe.Caffe.SolverParameter.SnapshotFormat result = caffe.Caffe.SolverParameter.SnapshotFormat.valueOf(snapshotFormat_); - return result == null ? caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO : result; - } - /** - * 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.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO]; - */ - public Builder clearSnapshotFormat() { - bitField0_ = (bitField0_ & ~0x20000000); - snapshotFormat_ = 1; - onChanged(); - return this; - } - - private int solverMode_ = 1; - /** - * 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() { - caffe.Caffe.SolverParameter.SolverMode result = caffe.Caffe.SolverParameter.SolverMode.valueOf(solverMode_); - return result == null ? caffe.Caffe.SolverParameter.SolverMode.GPU : result; - } - /** - * 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.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU]; - */ - public Builder clearSolverMode() { - bitField0_ = (bitField0_ & ~0x40000000); - solverMode_ = 1; - onChanged(); - return this; - } - - 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; - } - - 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; - } - - private int solverType_ = 0; - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public boolean hasSolverType() { - return ((bitField1_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public caffe.Caffe.SolverParameter.SolverType getSolverType() { - caffe.Caffe.SolverParameter.SolverType result = caffe.Caffe.SolverParameter.SolverType.valueOf(solverType_); - return result == null ? caffe.Caffe.SolverParameter.SolverType.SGD : result; - } - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public Builder setSolverType(caffe.Caffe.SolverParameter.SolverType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField1_ |= 0x00000002; - solverType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; - */ - public Builder clearSolverType() { - bitField1_ = (bitField1_ & ~0x00000002); - solverType_ = 0; - onChanged(); - return this; - } - - 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; - } - - 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; - } - - private float rmsDecay_ ; - /** - * optional float rms_decay = 38; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * 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; - * - *
-       * RMSProp decay value
-       * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
-       * 
- */ - public Builder clearRmsDecay() { - bitField1_ = (bitField1_ & ~0x00000010); - rmsDecay_ = 0F; - onChanged(); - return this; - } - - 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; - } - - 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; - } - - // @@protoc_insertion_point(builder_scope:caffe.SolverParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.SolverParameter) - private static final caffe.Caffe.SolverParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SolverParameter(); - } - - public static caffe.Caffe.SolverParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new SolverParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SolverParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SolverStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SolverState) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 iter = 1; - * - *
-     * The current iteration
-     * 
- */ - boolean hasIter(); - /** - * optional int32 iter = 1; - * - *
-     * The current iteration
-     * 
- */ - int getIter(); - - /** - * 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; - * - *
-     * 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]; - * - *
-     * 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 - // @@protoc_insertion_point(message_implements:caffe.SolverState) - SolverStateOrBuilder { - // Use SolverState.newBuilder() to construct. - private SolverState(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SolverState() { - iter_ = 0; - learnedNet_ = ""; - history_ = java.util.Collections.emptyList(); - currentStep_ = 0; - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - learnedNet_ = bs; - 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 new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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); - } - - private int bitField0_; - 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_; - } - - public static final int LEARNED_NET_FIELD_NUMBER = 2; - private volatile 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; - } - } - - 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); - } - - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, iter_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, learnedNet_); - } - for (int i = 0; i < history_.size(); i++) { - output.writeMessage(3, history_.get(i)); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(4, currentStep_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - 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.GeneratedMessage.computeStringSize(2, learnedNet_); - } - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SolverState prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.SolverState) - 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(); - } - } - 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 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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(); - com.google.protobuf.AbstractMessageLite.Builder.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_; - } - - 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) - } - - // @@protoc_insertion_point(class_scope:caffe.SolverState) - private static final caffe.Caffe.SolverState DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SolverState(); - } - - public static caffe.Caffe.SolverState getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new SolverState(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SolverState getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NetStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.NetState) - com.google.protobuf.MessageOrBuilder { - - /** - * 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]; - */ - boolean hasLevel(); - /** - * optional int32 level = 2 [default = 0]; - */ - int getLevel(); - - /** - * repeated string stage = 3; - */ - com.google.protobuf.ProtocolStringList - 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 - // @@protoc_insertion_point(message_implements:caffe.NetState) - NetStateOrBuilder { - // Use NetState.newBuilder() to construct. - private NetState(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NetState() { - phase_ = 1; - level_ = 0; - stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @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) { - this(); - 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_ = rawValue; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - level_ = input.readInt32(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - stage_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - stage_.add(bs); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - stage_ = stage_.getUnmodifiableView(); - } - 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); - } - - private int bitField0_; - public static final int PHASE_FIELD_NUMBER = 1; - private int 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TEST : result; - } - - 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_; - } - - public static final int STAGE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList stage_; - /** - * repeated string stage = 3; - */ - public com.google.protobuf.ProtocolStringList - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, phase_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, level_); - } - for (int i = 0; i < stage_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, stage_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, phase_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, level_); - } - { - int dataSize = 0; - for (int i = 0; i < stage_.size(); i++) { - dataSize += computeStringSizeNoTag(stage_.getRaw(i)); - } - size += dataSize; - size += 1 * getStageList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.NetState prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.NetState) - 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) { - } - } - public Builder clear() { - super.clear(); - phase_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - level_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - 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_ = stage_.getUnmodifiableView(); - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - private int phase_ = 1; - /** - * 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TEST : result; - } - /** - * optional .caffe.Phase phase = 1 [default = TEST]; - */ - public Builder setPhase(caffe.Caffe.Phase value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - phase_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.Phase phase = 1 [default = TEST]; - */ - public Builder clearPhase() { - bitField0_ = (bitField0_ & ~0x00000001); - phase_ = 1; - onChanged(); - return this; - } - - 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; - } - - 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 com.google.protobuf.ProtocolStringList - getStageList() { - return stage_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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) - } - - // @@protoc_insertion_point(class_scope:caffe.NetState) - private static final caffe.Caffe.NetState DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.NetState(); - } - - public static caffe.Caffe.NetState getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new NetState(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.NetState getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NetStateRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.NetStateRule) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * 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; - */ - boolean hasMaxLevel(); - /** - * optional int32 max_level = 3; - */ - int getMaxLevel(); - - /** - * 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.ProtocolStringList - 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; - */ - com.google.protobuf.ProtocolStringList - 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 - // @@protoc_insertion_point(message_implements:caffe.NetStateRule) - NetStateRuleOrBuilder { - // Use NetStateRule.newBuilder() to construct. - private NetStateRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NetStateRule() { - phase_ = 0; - minLevel_ = 0; - maxLevel_ = 0; - stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; - notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @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) { - this(); - 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_ = rawValue; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - minLevel_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - maxLevel_ = input.readInt32(); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - stage_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - stage_.add(bs); - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - notStage_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - notStage_.add(bs); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - stage_ = stage_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - notStage_ = notStage_.getUnmodifiableView(); - } - 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); - } - - private int bitField0_; - public static final int PHASE_FIELD_NUMBER = 1; - private int 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TRAIN : result; - } - - 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_; - } - - 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_; - } - - 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 com.google.protobuf.ProtocolStringList - 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); - } - - public static final int NOT_STAGE_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList notStage_; - /** - * repeated string not_stage = 5; - */ - public com.google.protobuf.ProtocolStringList - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, phase_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, minLevel_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, maxLevel_); - } - for (int i = 0; i < stage_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, stage_.getRaw(i)); - } - for (int i = 0; i < notStage_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, notStage_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, phase_); - } - 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 += computeStringSizeNoTag(stage_.getRaw(i)); - } - size += dataSize; - size += 1 * getStageList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notStage_.size(); i++) { - dataSize += computeStringSizeNoTag(notStage_.getRaw(i)); - } - size += dataSize; - size += 1 * getNotStageList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.NetStateRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.NetStateRule) - 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) { - } - } - public Builder clear() { - super.clear(); - phase_ = 0; - 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 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_ = stage_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.stage_ = stage_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - notStage_ = notStage_.getUnmodifiableView(); - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - private int phase_ = 0; - /** - * 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TRAIN : result; - } - /** - * 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.getNumber(); - 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_ = 0; - onChanged(); - return this; - } - - 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; - } - - 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; - } - - 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 com.google.protobuf.ProtocolStringList - getStageList() { - return stage_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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 com.google.protobuf.ProtocolStringList - getNotStageList() { - return notStage_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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) - } - - // @@protoc_insertion_point(class_scope:caffe.NetStateRule) - private static final caffe.Caffe.NetStateRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.NetStateRule(); - } - - public static caffe.Caffe.NetStateRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new NetStateRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.NetStateRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ParamSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ParamSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * 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]; - * - *
-     * 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]; - * - *
-     * 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 - // @@protoc_insertion_point(message_implements:caffe.ParamSpec) - ParamSpecOrBuilder { - // Use ParamSpec.newBuilder() to construct. - private ParamSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ParamSpec() { - name_ = ""; - shareMode_ = 0; - lrMult_ = 1F; - decayMult_ = 1F; - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - 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_ = rawValue; - } - break; - } - case 29: { - bitField0_ |= 0x00000004; - lrMult_ = input.readFloat(); - break; - } - case 37: { - bitField0_ |= 0x00000008; - decayMult_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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); - } - - /** - * 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 final com.google.protobuf.Internal.EnumLiteMap< - DimCheckMode> 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_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile 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; - } - } - - public static final int SHARE_MODE_FIELD_NUMBER = 2; - private int 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() { - caffe.Caffe.ParamSpec.DimCheckMode result = caffe.Caffe.ParamSpec.DimCheckMode.valueOf(shareMode_); - return result == null ? caffe.Caffe.ParamSpec.DimCheckMode.STRICT : result; - } - - 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_; - } - - 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 byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, shareMode_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, lrMult_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeFloat(4, decayMult_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, shareMode_); - } - 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 += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ParamSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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 - // @@protoc_insertion_point(builder_implements:caffe.ParamSpec) - 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) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - shareMode_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - lrMult_ = 1F; - bitField0_ = (bitField0_ & ~0x00000004); - decayMult_ = 1F; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - private int shareMode_ = 0; - /** - * 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() { - caffe.Caffe.ParamSpec.DimCheckMode result = caffe.Caffe.ParamSpec.DimCheckMode.valueOf(shareMode_); - return result == null ? caffe.Caffe.ParamSpec.DimCheckMode.STRICT : result; - } - /** - * 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.getNumber(); - 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_ = 0; - onChanged(); - return this; - } - - 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; - } - - 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) - } - - // @@protoc_insertion_point(class_scope:caffe.ParamSpec) - private static final caffe.Caffe.ParamSpec DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ParamSpec(); - } - - public static caffe.Caffe.ParamSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new ParamSpec(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ParamSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LayerParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.LayerParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * 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; - * - *
-     * the name of each bottom blob
-     * 
- */ - com.google.protobuf.ProtocolStringList - 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; - * - *
-     * the name of each top blob
-     * 
- */ - com.google.protobuf.ProtocolStringList - 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * Specifies on which bottoms the backpropagation should be skipped.
-     * The size must be either 0 or equal to the number of bottoms.
-     * 
- */ - java.util.List getPropagateDownList(); - /** - * repeated bool propagate_down = 11; - * - *
-     * Specifies on which bottoms the backpropagation should be skipped.
-     * The size must be either 0 or equal to the number of bottoms.
-     * 
- */ - int getPropagateDownCount(); - /** - * repeated bool propagate_down = 11; - * - *
-     * Specifies on which bottoms the backpropagation should be skipped.
-     * The size must be either 0 or equal to the number of bottoms.
-     * 
- */ - boolean getPropagateDown(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.
-     * 
- */ - 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; - */ - 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; - * - *
-     * 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; - * - *
-     * 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; - * - *
-     * 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; - */ - boolean hasArgmaxParam(); - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - caffe.Caffe.ArgMaxParameter getArgmaxParam(); - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - boolean hasConvolutionParam(); - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - caffe.Caffe.ConvolutionParameter getConvolutionParam(); - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - 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; - */ - boolean hasEltwiseParam(); - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - caffe.Caffe.EltwiseParameter getEltwiseParam(); - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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.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; - */ - 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; - */ - 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; - */ - boolean hasMvnParam(); - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - caffe.Caffe.MVNParameter getMvnParam(); - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - 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; - */ - boolean hasPythonParam(); - /** - * optional .caffe.PythonParameter python_param = 130; - */ - caffe.Caffe.PythonParameter getPythonParam(); - /** - * optional .caffe.PythonParameter python_param = 130; - */ - caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - boolean hasReshapeParam(); - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - caffe.Caffe.ReshapeParameter getReshapeParam(); - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder(); - - /** - * 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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: 139 (last added: tile_param)
-   * 
- */ - public static final class LayerParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.LayerParameter) - LayerParameterOrBuilder { - // Use LayerParameter.newBuilder() to construct. - private LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LayerParameter() { - name_ = ""; - type_ = ""; - bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; - top_ = com.google.protobuf.LazyStringArrayList.EMPTY; - phase_ = 0; - 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(); - } - - @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) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - type_ = bs; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - bottom_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - bottom_.add(bs); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - top_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - top_.add(bs); - 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_ = rawValue; - } - 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_ & 0x00000080) == 0x00000080)) { - subBuilder = concatParam_.toBuilder(); - } - concatParam_ = input.readMessage(caffe.Caffe.ConcatParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(concatParam_); - concatParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case 842: { - caffe.Caffe.ContrastiveLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - subBuilder = contrastiveLossParam_.toBuilder(); - } - contrastiveLossParam_ = input.readMessage(caffe.Caffe.ContrastiveLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contrastiveLossParam_); - contrastiveLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 850: { - caffe.Caffe.ConvolutionParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - subBuilder = convolutionParam_.toBuilder(); - } - convolutionParam_ = input.readMessage(caffe.Caffe.ConvolutionParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(convolutionParam_); - convolutionParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case 858: { - caffe.Caffe.DataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - subBuilder = dataParam_.toBuilder(); - } - dataParam_ = input.readMessage(caffe.Caffe.DataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataParam_); - dataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 866: { - caffe.Caffe.DropoutParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000800) == 0x00000800)) { - subBuilder = dropoutParam_.toBuilder(); - } - dropoutParam_ = input.readMessage(caffe.Caffe.DropoutParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dropoutParam_); - dropoutParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case 874: { - caffe.Caffe.DummyDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) == 0x00001000)) { - subBuilder = dummyDataParam_.toBuilder(); - } - dummyDataParam_ = input.readMessage(caffe.Caffe.DummyDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dummyDataParam_); - dummyDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case 882: { - caffe.Caffe.EltwiseParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) == 0x00002000)) { - subBuilder = eltwiseParam_.toBuilder(); - } - eltwiseParam_ = input.readMessage(caffe.Caffe.EltwiseParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eltwiseParam_); - eltwiseParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - break; - } - case 890: { - caffe.Caffe.ExpParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00008000) == 0x00008000)) { - subBuilder = expParam_.toBuilder(); - } - expParam_ = input.readMessage(caffe.Caffe.ExpParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expParam_); - expParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00008000; - break; - } - case 898: { - caffe.Caffe.HDF5DataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00020000) == 0x00020000)) { - subBuilder = hdf5DataParam_.toBuilder(); - } - hdf5DataParam_ = input.readMessage(caffe.Caffe.HDF5DataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdf5DataParam_); - hdf5DataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00020000; - break; - } - case 906: { - caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00040000) == 0x00040000)) { - subBuilder = hdf5OutputParam_.toBuilder(); - } - hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdf5OutputParam_); - hdf5OutputParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00040000; - break; - } - case 914: { - caffe.Caffe.HingeLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00080000) == 0x00080000)) { - subBuilder = hingeLossParam_.toBuilder(); - } - hingeLossParam_ = input.readMessage(caffe.Caffe.HingeLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hingeLossParam_); - hingeLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00080000; - break; - } - case 922: { - caffe.Caffe.ImageDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00100000) == 0x00100000)) { - subBuilder = imageDataParam_.toBuilder(); - } - imageDataParam_ = input.readMessage(caffe.Caffe.ImageDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageDataParam_); - imageDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00100000; - break; - } - case 930: { - caffe.Caffe.InfogainLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00200000) == 0x00200000)) { - subBuilder = infogainLossParam_.toBuilder(); - } - infogainLossParam_ = input.readMessage(caffe.Caffe.InfogainLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infogainLossParam_); - infogainLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00200000; - break; - } - case 938: { - caffe.Caffe.InnerProductParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00400000) == 0x00400000)) { - subBuilder = innerProductParam_.toBuilder(); - } - innerProductParam_ = input.readMessage(caffe.Caffe.InnerProductParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(innerProductParam_); - innerProductParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case 946: { - caffe.Caffe.LRNParameter.Builder subBuilder = null; - if (((bitField0_ & 0x01000000) == 0x01000000)) { - subBuilder = lrnParam_.toBuilder(); - } - lrnParam_ = input.readMessage(caffe.Caffe.LRNParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lrnParam_); - lrnParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x01000000; - break; - } - case 954: { - caffe.Caffe.MemoryDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x02000000) == 0x02000000)) { - subBuilder = memoryDataParam_.toBuilder(); - } - memoryDataParam_ = input.readMessage(caffe.Caffe.MemoryDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(memoryDataParam_); - memoryDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x02000000; - break; - } - case 962: { - caffe.Caffe.MVNParameter.Builder subBuilder = null; - if (((bitField0_ & 0x04000000) == 0x04000000)) { - subBuilder = mvnParam_.toBuilder(); - } - mvnParam_ = input.readMessage(caffe.Caffe.MVNParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mvnParam_); - mvnParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x04000000; - break; - } - case 970: { - caffe.Caffe.PoolingParameter.Builder subBuilder = null; - if (((bitField0_ & 0x08000000) == 0x08000000)) { - subBuilder = poolingParam_.toBuilder(); - } - poolingParam_ = input.readMessage(caffe.Caffe.PoolingParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(poolingParam_); - poolingParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x08000000; - break; - } - case 978: { - caffe.Caffe.PowerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x10000000) == 0x10000000)) { - subBuilder = powerParam_.toBuilder(); - } - powerParam_ = input.readMessage(caffe.Caffe.PowerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(powerParam_); - powerParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x10000000; - break; - } - case 986: { - caffe.Caffe.ReLUParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000001) == 0x00000001)) { - subBuilder = reluParam_.toBuilder(); - } - reluParam_ = input.readMessage(caffe.Caffe.ReLUParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reluParam_); - reluParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000001; - break; - } - case 994: { - caffe.Caffe.SigmoidParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000004) == 0x00000004)) { - subBuilder = sigmoidParam_.toBuilder(); - } - sigmoidParam_ = input.readMessage(caffe.Caffe.SigmoidParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sigmoidParam_); - sigmoidParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000004; - break; - } - case 1002: { - caffe.Caffe.SoftmaxParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000008) == 0x00000008)) { - subBuilder = softmaxParam_.toBuilder(); - } - softmaxParam_ = input.readMessage(caffe.Caffe.SoftmaxParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(softmaxParam_); - softmaxParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000008; - break; - } - case 1010: { - caffe.Caffe.SliceParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000020) == 0x00000020)) { - subBuilder = sliceParam_.toBuilder(); - } - sliceParam_ = input.readMessage(caffe.Caffe.SliceParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceParam_); - sliceParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000020; - break; - } - case 1018: { - caffe.Caffe.TanHParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000040) == 0x00000040)) { - subBuilder = tanhParam_.toBuilder(); - } - tanhParam_ = input.readMessage(caffe.Caffe.TanHParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tanhParam_); - tanhParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000040; - break; - } - case 1026: { - caffe.Caffe.ThresholdParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000080) == 0x00000080)) { - subBuilder = thresholdParam_.toBuilder(); - } - thresholdParam_ = input.readMessage(caffe.Caffe.ThresholdParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(thresholdParam_); - thresholdParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000080; - break; - } - case 1034: { - caffe.Caffe.WindowDataParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000200) == 0x00000200)) { - subBuilder = windowDataParam_.toBuilder(); - } - windowDataParam_ = input.readMessage(caffe.Caffe.WindowDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(windowDataParam_); - windowDataParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000200; - break; - } - case 1042: { - caffe.Caffe.PythonParameter.Builder subBuilder = null; - if (((bitField0_ & 0x40000000) == 0x40000000)) { - subBuilder = pythonParam_.toBuilder(); - } - pythonParam_ = input.readMessage(caffe.Caffe.PythonParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pythonParam_); - pythonParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x40000000; - break; - } - case 1050: { - caffe.Caffe.PReLUParameter.Builder subBuilder = null; - if (((bitField0_ & 0x20000000) == 0x20000000)) { - subBuilder = preluParam_.toBuilder(); - } - preluParam_ = input.readMessage(caffe.Caffe.PReLUParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preluParam_); - preluParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x20000000; - break; - } - case 1058: { - caffe.Caffe.SPPParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000010) == 0x00000010)) { - subBuilder = sppParam_.toBuilder(); - } - sppParam_ = input.readMessage(caffe.Caffe.SPPParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sppParam_); - sppParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000010; - break; - } - case 1066: { - caffe.Caffe.ReshapeParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000002) == 0x00000002)) { - subBuilder = reshapeParam_.toBuilder(); - } - reshapeParam_ = input.readMessage(caffe.Caffe.ReshapeParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reshapeParam_); - reshapeParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000002; - break; - } - case 1074: { - caffe.Caffe.LogParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00800000) == 0x00800000)) { - subBuilder = logParam_.toBuilder(); - } - logParam_ = input.readMessage(caffe.Caffe.LogParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logParam_); - logParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00800000; - break; - } - case 1082: { - caffe.Caffe.FlattenParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00010000) == 0x00010000)) { - subBuilder = flattenParam_.toBuilder(); - } - flattenParam_ = input.readMessage(caffe.Caffe.FlattenParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(flattenParam_); - flattenParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00010000; - break; - } - case 1090: { - caffe.Caffe.ReductionParameter.Builder subBuilder = null; - if (((bitField0_ & 0x80000000) == 0x80000000)) { - subBuilder = reductionParam_.toBuilder(); - } - reductionParam_ = input.readMessage(caffe.Caffe.ReductionParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reductionParam_); - reductionParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x80000000; - break; - } - case 1098: { - caffe.Caffe.EmbedParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00004000) == 0x00004000)) { - subBuilder = embedParam_.toBuilder(); - } - embedParam_ = input.readMessage(caffe.Caffe.EmbedParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(embedParam_); - embedParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00004000; - break; - } - case 1106: { - caffe.Caffe.TileParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000100) == 0x00000100)) { - subBuilder = tileParam_.toBuilder(); - } - tileParam_ = input.readMessage(caffe.Caffe.TileParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tileParam_); - tileParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000100; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - bottom_ = bottom_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - top_ = top_.getUnmodifiableView(); - } - 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); - } - - private int bitField0_; - private int bitField1_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile 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; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private volatile 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; - } - } - - 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 com.google.protobuf.ProtocolStringList - 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); - } - - 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 com.google.protobuf.ProtocolStringList - 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); - } - - public static final int PHASE_FIELD_NUMBER = 10; - private int 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TRAIN : result; - } - - 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); - } - - 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); - } - - 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); - } - - public static final int PROPAGATE_DOWN_FIELD_NUMBER = 11; - private java.util.List propagateDown_; - /** - * repeated bool propagate_down = 11; - * - *
-     * Specifies on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be skipped.
-     * The size must be either 0 or equal to the number of bottoms.
-     * 
- */ - public boolean getPropagateDown(int index) { - return propagateDown_.get(index); - } - - 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); - } - - 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); - } - - 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_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-     * Parameters for data pre-processing.
-     * 
- */ - public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { - return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - - 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_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-     * Parameters shared by loss layers.
-     * 
- */ - public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { - return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - - 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_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : 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_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } - - 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_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { - return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - - 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_ & 0x00000080) == 0x00000080); - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public caffe.Caffe.ConcatParameter getConcatParam() { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - - 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_ & 0x00000100) == 0x00000100); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - - 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_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public caffe.Caffe.ConvolutionParameter getConvolutionParam() { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - - 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_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public caffe.Caffe.DataParameter getDataParam() { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - - 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_ & 0x00000800) == 0x00000800); - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public caffe.Caffe.DropoutParameter getDropoutParam() { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - - 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_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public caffe.Caffe.DummyDataParameter getDummyDataParam() { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - - 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_ & 0x00002000) == 0x00002000); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public caffe.Caffe.EltwiseParameter getEltwiseParam() { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - - 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_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public caffe.Caffe.EmbedParameter getEmbedParam() { - return embedParam_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder() { - return embedParam_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; - } - - 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_ & 0x00008000) == 0x00008000); - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public caffe.Caffe.ExpParameter getExpParam() { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - - 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_ & 0x00010000) == 0x00010000); - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public caffe.Caffe.FlattenParameter getFlattenParam() { - return flattenParam_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder() { - return flattenParam_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; - } - - 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_ & 0x00020000) == 0x00020000); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - - 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_ & 0x00040000) == 0x00040000); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - - 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_ & 0x00080000) == 0x00080000); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public caffe.Caffe.HingeLossParameter getHingeLossParam() { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - - 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_ & 0x00100000) == 0x00100000); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public caffe.Caffe.ImageDataParameter getImageDataParam() { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - - 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_ & 0x00200000) == 0x00200000); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - - 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_ & 0x00400000) == 0x00400000); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public caffe.Caffe.InnerProductParameter getInnerProductParam() { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - - 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_ & 0x00800000) == 0x00800000); - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public caffe.Caffe.LogParameter getLogParam() { - return logParam_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder() { - return logParam_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; - } - - 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_ & 0x01000000) == 0x01000000); - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public caffe.Caffe.LRNParameter getLrnParam() { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - - 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_ & 0x02000000) == 0x02000000); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - - 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_ & 0x04000000) == 0x04000000); - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public caffe.Caffe.MVNParameter getMvnParam() { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - - public static final int POOLING_PARAM_FIELD_NUMBER = 121; - private caffe.Caffe.PoolingParameter poolingParam_; - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public boolean hasPoolingParam() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public caffe.Caffe.PoolingParameter getPoolingParam() { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - - public static final int POWER_PARAM_FIELD_NUMBER = 122; - private caffe.Caffe.PowerParameter powerParam_; - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public boolean hasPowerParam() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public caffe.Caffe.PowerParameter getPowerParam() { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - - public static final int PRELU_PARAM_FIELD_NUMBER = 131; - private caffe.Caffe.PReLUParameter preluParam_; - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public boolean hasPreluParam() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public caffe.Caffe.PReLUParameter getPreluParam() { - return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder() { - return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; - } - - public static final int PYTHON_PARAM_FIELD_NUMBER = 130; - private caffe.Caffe.PythonParameter pythonParam_; - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public boolean hasPythonParam() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public caffe.Caffe.PythonParameter getPythonParam() { - return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder() { - return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; - } - - public static final int REDUCTION_PARAM_FIELD_NUMBER = 136; - private caffe.Caffe.ReductionParameter reductionParam_; - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public boolean hasReductionParam() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public caffe.Caffe.ReductionParameter getReductionParam() { - return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder() { - return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; - } - - 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_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public caffe.Caffe.ReLUParameter getReluParam() { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - - 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_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public caffe.Caffe.ReshapeParameter getReshapeParam() { - return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder() { - return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; - } - - 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_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public caffe.Caffe.SigmoidParameter getSigmoidParam() { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - - 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_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - - 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_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public caffe.Caffe.SPPParameter getSppParam() { - return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder() { - return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; - } - - 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_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public caffe.Caffe.SliceParameter getSliceParam() { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - - 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_ & 0x00000040) == 0x00000040); - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public caffe.Caffe.TanHParameter getTanhParam() { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - - 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_ & 0x00000080) == 0x00000080); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public caffe.Caffe.ThresholdParameter getThresholdParam() { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - - 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_ & 0x00000100) == 0x00000100); - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public caffe.Caffe.TileParameter getTileParam() { - return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder() { - return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; - } - - 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_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public caffe.Caffe.WindowDataParameter getWindowDataParam() { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); - } - for (int i = 0; i < bottom_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, bottom_.getRaw(i)); - } - for (int i = 0; i < top_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, top_.getRaw(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_); - } - for (int i = 0; i < propagateDown_.size(); i++) { - output.writeBool(11, propagateDown_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(100, getTransformParam()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(101, getLossParam()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeMessage(102, getAccuracyParam()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeMessage(103, getArgmaxParam()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(104, getConcatParam()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeMessage(105, getContrastiveLossParam()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeMessage(106, getConvolutionParam()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeMessage(107, getDataParam()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeMessage(108, getDropoutParam()); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeMessage(109, getDummyDataParam()); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeMessage(110, getEltwiseParam()); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - output.writeMessage(111, getExpParam()); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - output.writeMessage(112, getHdf5DataParam()); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - output.writeMessage(113, getHdf5OutputParam()); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - output.writeMessage(114, getHingeLossParam()); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - output.writeMessage(115, getImageDataParam()); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - output.writeMessage(116, getInfogainLossParam()); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - output.writeMessage(117, getInnerProductParam()); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - output.writeMessage(118, getLrnParam()); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - output.writeMessage(119, getMemoryDataParam()); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - output.writeMessage(120, getMvnParam()); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - output.writeMessage(121, getPoolingParam()); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - output.writeMessage(122, getPowerParam()); - } - if (((bitField1_ & 0x00000001) == 0x00000001)) { - output.writeMessage(123, getReluParam()); - } - if (((bitField1_ & 0x00000004) == 0x00000004)) { - output.writeMessage(124, getSigmoidParam()); - } - if (((bitField1_ & 0x00000008) == 0x00000008)) { - output.writeMessage(125, getSoftmaxParam()); - } - if (((bitField1_ & 0x00000020) == 0x00000020)) { - output.writeMessage(126, getSliceParam()); - } - if (((bitField1_ & 0x00000040) == 0x00000040)) { - output.writeMessage(127, getTanhParam()); - } - if (((bitField1_ & 0x00000080) == 0x00000080)) { - output.writeMessage(128, getThresholdParam()); - } - if (((bitField1_ & 0x00000200) == 0x00000200)) { - output.writeMessage(129, getWindowDataParam()); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - output.writeMessage(130, getPythonParam()); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - output.writeMessage(131, getPreluParam()); - } - if (((bitField1_ & 0x00000010) == 0x00000010)) { - output.writeMessage(132, getSppParam()); - } - if (((bitField1_ & 0x00000002) == 0x00000002)) { - output.writeMessage(133, getReshapeParam()); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - output.writeMessage(134, getLogParam()); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - output.writeMessage(135, getFlattenParam()); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - output.writeMessage(136, getReductionParam()); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - output.writeMessage(137, getEmbedParam()); - } - if (((bitField1_ & 0x00000100) == 0x00000100)) { - output.writeMessage(138, getTileParam()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); - } - { - int dataSize = 0; - for (int i = 0; i < bottom_.size(); i++) { - dataSize += computeStringSizeNoTag(bottom_.getRaw(i)); - } - size += dataSize; - size += 1 * getBottomList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < top_.size(); i++) { - dataSize += computeStringSizeNoTag(top_.getRaw(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_); - } - { - int dataSize = 0; - dataSize = 1 * getPropagateDownList().size(); - size += dataSize; - size += 1 * getPropagateDownList().size(); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getTransformParam()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(101, getLossParam()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(102, getAccuracyParam()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(103, getArgmaxParam()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(104, getConcatParam()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(105, getContrastiveLossParam()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(106, getConvolutionParam()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(107, getDataParam()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(108, getDropoutParam()); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(109, getDummyDataParam()); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(110, getEltwiseParam()); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(111, getExpParam()); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(112, getHdf5DataParam()); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(113, getHdf5OutputParam()); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(114, getHingeLossParam()); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(115, getImageDataParam()); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(116, getInfogainLossParam()); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(117, getInnerProductParam()); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(118, getLrnParam()); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(119, getMemoryDataParam()); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(120, getMvnParam()); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(121, getPoolingParam()); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(122, getPowerParam()); - } - if (((bitField1_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(123, getReluParam()); - } - if (((bitField1_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(124, getSigmoidParam()); - } - if (((bitField1_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(125, getSoftmaxParam()); - } - if (((bitField1_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(126, getSliceParam()); - } - if (((bitField1_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(127, getTanhParam()); - } - if (((bitField1_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(128, getThresholdParam()); - } - if (((bitField1_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(129, getWindowDataParam()); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(130, getPythonParam()); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(131, getPreluParam()); - } - if (((bitField1_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(132, getSppParam()); - } - if (((bitField1_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(133, getReshapeParam()); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(134, getLogParam()); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(135, getFlattenParam()); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(136, getReductionParam()); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(137, getEmbedParam()); - } - if (((bitField1_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(138, getTileParam()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - 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 Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.LayerParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.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: 139 (last added: tile_param)
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.LayerParameter) - 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(); - getConcatParamFieldBuilder(); - getContrastiveLossParamFieldBuilder(); - getConvolutionParamFieldBuilder(); - getDataParamFieldBuilder(); - getDropoutParamFieldBuilder(); - getDummyDataParamFieldBuilder(); - getEltwiseParamFieldBuilder(); - getEmbedParamFieldBuilder(); - getExpParamFieldBuilder(); - getFlattenParamFieldBuilder(); - getHdf5DataParamFieldBuilder(); - getHdf5OutputParamFieldBuilder(); - getHingeLossParamFieldBuilder(); - getImageDataParamFieldBuilder(); - getInfogainLossParamFieldBuilder(); - getInnerProductParamFieldBuilder(); - getLogParamFieldBuilder(); - getLrnParamFieldBuilder(); - getMemoryDataParamFieldBuilder(); - getMvnParamFieldBuilder(); - getPoolingParamFieldBuilder(); - getPowerParamFieldBuilder(); - getPreluParamFieldBuilder(); - getPythonParamFieldBuilder(); - getReductionParamFieldBuilder(); - getReluParamFieldBuilder(); - getReshapeParamFieldBuilder(); - getSigmoidParamFieldBuilder(); - getSoftmaxParamFieldBuilder(); - getSppParamFieldBuilder(); - getSliceParamFieldBuilder(); - getTanhParamFieldBuilder(); - getThresholdParamFieldBuilder(); - getTileParamFieldBuilder(); - getWindowDataParamFieldBuilder(); - } - } - 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_ = 0; - 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_ = null; - } else { - transformParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000800); - if (lossParamBuilder_ == null) { - lossParam_ = null; - } else { - lossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - if (accuracyParamBuilder_ == null) { - accuracyParam_ = null; - } else { - accuracyParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - if (argmaxParamBuilder_ == null) { - argmaxParam_ = null; - } else { - argmaxParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00004000); - if (concatParamBuilder_ == null) { - concatParam_ = null; - } else { - concatParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00008000); - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = null; - } else { - contrastiveLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00010000); - if (convolutionParamBuilder_ == null) { - convolutionParam_ = null; - } else { - convolutionParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00020000); - if (dataParamBuilder_ == null) { - dataParam_ = null; - } else { - dataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00040000); - if (dropoutParamBuilder_ == null) { - dropoutParam_ = null; - } else { - dropoutParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00080000); - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = null; - } else { - dummyDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00100000); - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = null; - } else { - eltwiseParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00200000); - if (embedParamBuilder_ == null) { - embedParam_ = null; - } else { - embedParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00400000); - if (expParamBuilder_ == null) { - expParam_ = null; - } else { - expParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00800000); - if (flattenParamBuilder_ == null) { - flattenParam_ = null; - } else { - flattenParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x01000000); - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = null; - } else { - hdf5DataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x02000000); - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x04000000); - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = null; - } else { - hingeLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x08000000); - if (imageDataParamBuilder_ == null) { - imageDataParam_ = null; - } else { - imageDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x10000000); - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = null; - } else { - infogainLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x20000000); - if (innerProductParamBuilder_ == null) { - innerProductParam_ = null; - } else { - innerProductParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x40000000); - if (logParamBuilder_ == null) { - logParam_ = null; - } else { - logParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x80000000); - if (lrnParamBuilder_ == null) { - lrnParam_ = null; - } else { - lrnParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000001); - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = null; - } else { - memoryDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000002); - if (mvnParamBuilder_ == null) { - mvnParam_ = null; - } else { - mvnParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000004); - if (poolingParamBuilder_ == null) { - poolingParam_ = null; - } else { - poolingParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000008); - if (powerParamBuilder_ == null) { - powerParam_ = null; - } else { - powerParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000010); - if (preluParamBuilder_ == null) { - preluParam_ = null; - } else { - preluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - if (pythonParamBuilder_ == null) { - pythonParam_ = null; - } else { - pythonParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000040); - if (reductionParamBuilder_ == null) { - reductionParam_ = null; - } else { - reductionParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000080); - if (reluParamBuilder_ == null) { - reluParam_ = null; - } else { - reluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000100); - if (reshapeParamBuilder_ == null) { - reshapeParam_ = null; - } else { - reshapeParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000200); - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = null; - } else { - sigmoidParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000400); - if (softmaxParamBuilder_ == null) { - softmaxParam_ = null; - } else { - softmaxParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000800); - if (sppParamBuilder_ == null) { - sppParam_ = null; - } else { - sppParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00001000); - if (sliceParamBuilder_ == null) { - sliceParam_ = null; - } else { - sliceParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00002000); - if (tanhParamBuilder_ == null) { - tanhParam_ = null; - } else { - tanhParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00004000); - if (thresholdParamBuilder_ == null) { - thresholdParam_ = null; - } else { - thresholdParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00008000); - if (tileParamBuilder_ == null) { - tileParam_ = null; - } else { - tileParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00010000); - if (windowDataParamBuilder_ == null) { - windowDataParam_ = null; - } else { - windowDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00020000); - return this; - } - - 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_ = bottom_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.bottom_ = bottom_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - top_ = top_.getUnmodifiableView(); - 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 (concatParamBuilder_ == null) { - result.concatParam_ = concatParam_; - } else { - result.concatParam_ = concatParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00010000) == 0x00010000)) { - to_bitField0_ |= 0x00000100; - } - if (contrastiveLossParamBuilder_ == null) { - result.contrastiveLossParam_ = contrastiveLossParam_; - } else { - result.contrastiveLossParam_ = contrastiveLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00020000) == 0x00020000)) { - to_bitField0_ |= 0x00000200; - } - if (convolutionParamBuilder_ == null) { - result.convolutionParam_ = convolutionParam_; - } else { - result.convolutionParam_ = convolutionParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00040000) == 0x00040000)) { - to_bitField0_ |= 0x00000400; - } - if (dataParamBuilder_ == null) { - result.dataParam_ = dataParam_; - } else { - result.dataParam_ = dataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00080000) == 0x00080000)) { - to_bitField0_ |= 0x00000800; - } - if (dropoutParamBuilder_ == null) { - result.dropoutParam_ = dropoutParam_; - } else { - result.dropoutParam_ = dropoutParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00100000) == 0x00100000)) { - to_bitField0_ |= 0x00001000; - } - if (dummyDataParamBuilder_ == null) { - result.dummyDataParam_ = dummyDataParam_; - } else { - result.dummyDataParam_ = dummyDataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00200000) == 0x00200000)) { - to_bitField0_ |= 0x00002000; - } - if (eltwiseParamBuilder_ == null) { - result.eltwiseParam_ = eltwiseParam_; - } else { - result.eltwiseParam_ = eltwiseParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00400000) == 0x00400000)) { - to_bitField0_ |= 0x00004000; - } - if (embedParamBuilder_ == null) { - result.embedParam_ = embedParam_; - } else { - result.embedParam_ = embedParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00800000) == 0x00800000)) { - to_bitField0_ |= 0x00008000; - } - if (expParamBuilder_ == null) { - result.expParam_ = expParam_; - } else { - result.expParam_ = expParamBuilder_.build(); - } - if (((from_bitField0_ & 0x01000000) == 0x01000000)) { - to_bitField0_ |= 0x00010000; - } - if (flattenParamBuilder_ == null) { - result.flattenParam_ = flattenParam_; - } else { - result.flattenParam_ = flattenParamBuilder_.build(); - } - if (((from_bitField0_ & 0x02000000) == 0x02000000)) { - to_bitField0_ |= 0x00020000; - } - if (hdf5DataParamBuilder_ == null) { - result.hdf5DataParam_ = hdf5DataParam_; - } else { - result.hdf5DataParam_ = hdf5DataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x04000000) == 0x04000000)) { - to_bitField0_ |= 0x00040000; - } - if (hdf5OutputParamBuilder_ == null) { - result.hdf5OutputParam_ = hdf5OutputParam_; - } else { - result.hdf5OutputParam_ = hdf5OutputParamBuilder_.build(); - } - if (((from_bitField0_ & 0x08000000) == 0x08000000)) { - to_bitField0_ |= 0x00080000; - } - if (hingeLossParamBuilder_ == null) { - result.hingeLossParam_ = hingeLossParam_; - } else { - result.hingeLossParam_ = hingeLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x10000000) == 0x10000000)) { - to_bitField0_ |= 0x00100000; - } - if (imageDataParamBuilder_ == null) { - result.imageDataParam_ = imageDataParam_; - } else { - result.imageDataParam_ = imageDataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x20000000) == 0x20000000)) { - to_bitField0_ |= 0x00200000; - } - if (infogainLossParamBuilder_ == null) { - result.infogainLossParam_ = infogainLossParam_; - } else { - result.infogainLossParam_ = infogainLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x40000000) == 0x40000000)) { - to_bitField0_ |= 0x00400000; - } - if (innerProductParamBuilder_ == null) { - result.innerProductParam_ = innerProductParam_; - } else { - result.innerProductParam_ = innerProductParamBuilder_.build(); - } - if (((from_bitField0_ & 0x80000000) == 0x80000000)) { - to_bitField0_ |= 0x00800000; - } - if (logParamBuilder_ == null) { - result.logParam_ = logParam_; - } else { - result.logParam_ = logParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x01000000; - } - if (lrnParamBuilder_ == null) { - result.lrnParam_ = lrnParam_; - } else { - result.lrnParam_ = lrnParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x02000000; - } - if (memoryDataParamBuilder_ == null) { - result.memoryDataParam_ = memoryDataParam_; - } else { - result.memoryDataParam_ = memoryDataParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x04000000; - } - if (mvnParamBuilder_ == null) { - result.mvnParam_ = mvnParam_; - } else { - result.mvnParam_ = mvnParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x08000000; - } - if (poolingParamBuilder_ == null) { - result.poolingParam_ = poolingParam_; - } else { - result.poolingParam_ = poolingParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x10000000; - } - if (powerParamBuilder_ == null) { - result.powerParam_ = powerParam_; - } else { - result.powerParam_ = powerParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x20000000; - } - if (preluParamBuilder_ == null) { - result.preluParam_ = preluParam_; - } else { - result.preluParam_ = preluParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x40000000; - } - if (pythonParamBuilder_ == null) { - result.pythonParam_ = pythonParam_; - } else { - result.pythonParam_ = pythonParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x80000000; - } - if (reductionParamBuilder_ == null) { - result.reductionParam_ = reductionParam_; - } else { - result.reductionParam_ = reductionParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000100) == 0x00000100)) { - to_bitField1_ |= 0x00000001; - } - if (reluParamBuilder_ == null) { - result.reluParam_ = reluParam_; - } else { - result.reluParam_ = reluParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000200) == 0x00000200)) { - to_bitField1_ |= 0x00000002; - } - if (reshapeParamBuilder_ == null) { - result.reshapeParam_ = reshapeParam_; - } else { - result.reshapeParam_ = reshapeParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000400) == 0x00000400)) { - to_bitField1_ |= 0x00000004; - } - if (sigmoidParamBuilder_ == null) { - result.sigmoidParam_ = sigmoidParam_; - } else { - result.sigmoidParam_ = sigmoidParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000800) == 0x00000800)) { - to_bitField1_ |= 0x00000008; - } - if (softmaxParamBuilder_ == null) { - result.softmaxParam_ = softmaxParam_; - } else { - result.softmaxParam_ = softmaxParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00001000) == 0x00001000)) { - to_bitField1_ |= 0x00000010; - } - if (sppParamBuilder_ == null) { - result.sppParam_ = sppParam_; - } else { - result.sppParam_ = sppParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00002000) == 0x00002000)) { - to_bitField1_ |= 0x00000020; - } - if (sliceParamBuilder_ == null) { - result.sliceParam_ = sliceParam_; - } else { - result.sliceParam_ = sliceParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00004000) == 0x00004000)) { - to_bitField1_ |= 0x00000040; - } - if (tanhParamBuilder_ == null) { - result.tanhParam_ = tanhParam_; - } else { - result.tanhParam_ = tanhParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00008000) == 0x00008000)) { - to_bitField1_ |= 0x00000080; - } - if (thresholdParamBuilder_ == null) { - result.thresholdParam_ = thresholdParam_; - } else { - result.thresholdParam_ = thresholdParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00010000) == 0x00010000)) { - to_bitField1_ |= 0x00000100; - } - if (tileParamBuilder_ == null) { - result.tileParam_ = tileParam_; - } else { - result.tileParam_ = tileParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00020000) == 0x00020000)) { - to_bitField1_ |= 0x00000200; - } - 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.hasConcatParam()) { - mergeConcatParam(other.getConcatParam()); - } - if (other.hasContrastiveLossParam()) { - mergeContrastiveLossParam(other.getContrastiveLossParam()); - } - if (other.hasConvolutionParam()) { - mergeConvolutionParam(other.getConvolutionParam()); - } - 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.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.hasLogParam()) { - mergeLogParam(other.getLogParam()); - } - if (other.hasLrnParam()) { - mergeLrnParam(other.getLrnParam()); - } - if (other.hasMemoryDataParam()) { - mergeMemoryDataParam(other.getMemoryDataParam()); - } - if (other.hasMvnParam()) { - mergeMvnParam(other.getMvnParam()); - } - 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.hasReductionParam()) { - mergeReductionParam(other.getReductionParam()); - } - if (other.hasReluParam()) { - mergeReluParam(other.getReluParam()); - } - if (other.hasReshapeParam()) { - mergeReshapeParam(other.getReshapeParam()); - } - 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.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - 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_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - 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 com.google.protobuf.ProtocolStringList - getBottomList() { - return bottom_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - 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 com.google.protobuf.ProtocolStringList - getTopList() { - return top_.getUnmodifiableView(); - } - /** - * 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(); - com.google.protobuf.AbstractMessageLite.Builder.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; - } - - private int phase_ = 0; - /** - * 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() { - caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); - return result == null ? caffe.Caffe.Phase.TRAIN : result; - } - /** - * 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.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.Phase phase = 10; - * - *
-       * The train / test phase for computation.
-       * 
- */ - public Builder clearPhase() { - bitField0_ = (bitField0_ & ~0x00000010); - phase_ = 0; - onChanged(); - return this; - } - - 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_); - } - /** - * 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 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 Builder setLossWeight( - int index, float value) { - ensureLossWeightIsMutable(); - lossWeight_.set(index, value); - onChanged(); - return this; - } - /** - * 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 Builder addLossWeight(float value) { - ensureLossWeightIsMutable(); - lossWeight_.add(value); - onChanged(); - return this; - } - /** - * 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 Builder addAllLossWeight( - java.lang.Iterable values) { - ensureLossWeightIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lossWeight_); - onChanged(); - return this; - } - /** - * 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 Builder clearLossWeight() { - lossWeight_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private java.util.List param_ = - java.util.Collections.emptyList(); - private void ensureParamIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - param_ = new java.util.ArrayList(param_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder> paramBuilder_; - - /** - * 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() { - if (paramBuilder_ == null) { - return java.util.Collections.unmodifiableList(param_); - } else { - return paramBuilder_.getMessageList(); - } - } - /** - * 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() { - if (paramBuilder_ == null) { - return param_.size(); - } else { - return paramBuilder_.getCount(); - } - } - /** - * 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) { - if (paramBuilder_ == null) { - return param_.get(index); - } else { - return paramBuilder_.getMessage(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 Builder setParam( - int index, caffe.Caffe.ParamSpec value) { - if (paramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.set(index, value); - onChanged(); - } else { - paramBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder setParam( - int index, caffe.Caffe.ParamSpec.Builder builderForValue) { - if (paramBuilder_ == null) { - ensureParamIsMutable(); - param_.set(index, builderForValue.build()); - onChanged(); - } else { - paramBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder addParam(caffe.Caffe.ParamSpec value) { - if (paramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.add(value); - onChanged(); - } else { - paramBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder addParam( - int index, caffe.Caffe.ParamSpec value) { - if (paramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.add(index, value); - onChanged(); - } else { - paramBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder addParam( - caffe.Caffe.ParamSpec.Builder builderForValue) { - if (paramBuilder_ == null) { - ensureParamIsMutable(); - param_.add(builderForValue.build()); - onChanged(); - } else { - paramBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder addParam( - int index, caffe.Caffe.ParamSpec.Builder builderForValue) { - if (paramBuilder_ == null) { - ensureParamIsMutable(); - param_.add(index, builderForValue.build()); - onChanged(); - } else { - paramBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder addAllParam( - java.lang.Iterable values) { - if (paramBuilder_ == null) { - ensureParamIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, param_); - onChanged(); - } else { - paramBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder clearParam() { - if (paramBuilder_ == null) { - param_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - paramBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.ParamSpec param = 6; - * - *
-       * Specifies training parameters (multipliers on global learning constants,
-       * and the name and other settings used for weight sharing).
-       * 
- */ - public Builder removeParam(int index) { - if (paramBuilder_ == null) { - ensureParamIsMutable(); - param_.remove(index); - onChanged(); - } else { - paramBuilder_.remove(index); - } - return this; - } - /** - * 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.Builder getParamBuilder( - int index) { - return getParamFieldBuilder().getBuilder(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) { - if (paramBuilder_ == null) { - return param_.get(index); } else { - return paramBuilder_.getMessageOrBuilder(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 java.util.List - getParamOrBuilderList() { - if (paramBuilder_ != null) { - return paramBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(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 caffe.Caffe.ParamSpec.Builder addParamBuilder() { - return getParamFieldBuilder().addBuilder( - caffe.Caffe.ParamSpec.getDefaultInstance()); - } - /** - * 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.Builder addParamBuilder( - int index) { - return getParamFieldBuilder().addBuilder( - index, caffe.Caffe.ParamSpec.getDefaultInstance()); - } - /** - * 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 - getParamBuilderList() { - return getParamFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder> - getParamFieldBuilder() { - if (paramBuilder_ == null) { - paramBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder>( - param_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - param_ = null; - } - return paramBuilder_; - } - - private java.util.List blobs_ = - java.util.Collections.emptyList(); - private void ensureBlobsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - blobs_ = new java.util.ArrayList(blobs_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; - - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public java.util.List getBlobsList() { - if (blobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(blobs_); - } else { - return blobsBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public int getBlobsCount() { - if (blobsBuilder_ == null) { - return blobs_.size(); - } else { - return blobsBuilder_.getCount(); - } - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public caffe.Caffe.BlobProto getBlobs(int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); - } else { - return blobsBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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 = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public Builder addAllBlobs( - java.lang.Iterable values) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blobs_); - onChanged(); - } else { - blobsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public Builder clearBlobs() { - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - blobsBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public Builder removeBlobs(int index) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - blobs_.remove(index); - onChanged(); - } else { - blobsBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public caffe.Caffe.BlobProto.Builder getBlobsBuilder( - int index) { - return getBlobsFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); } else { - return blobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public java.util.List - getBlobsOrBuilderList() { - if (blobsBuilder_ != null) { - return blobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blobs_); - } - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { - return getBlobsFieldBuilder().addBuilder( - caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder( - int index) { - return getBlobsFieldBuilder().addBuilder( - index, caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 7; - * - *
-       * The blobs containing the numeric parameters of the layer.
-       * 
- */ - 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_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); - blobs_ = null; - } - return blobsBuilder_; - } - - private java.util.List propagateDown_ = java.util.Collections.emptyList(); - private void ensurePropagateDownIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - propagateDown_ = new java.util.ArrayList(propagateDown_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public java.util.List - getPropagateDownList() { - return java.util.Collections.unmodifiableList(propagateDown_); - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public boolean getPropagateDown(int index) { - return propagateDown_.get(index); - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public Builder setPropagateDown( - int index, boolean value) { - ensurePropagateDownIsMutable(); - propagateDown_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public Builder addPropagateDown(boolean value) { - ensurePropagateDownIsMutable(); - propagateDown_.add(value); - onChanged(); - return this; - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public Builder addAllPropagateDown( - java.lang.Iterable values) { - ensurePropagateDownIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, propagateDown_); - onChanged(); - return this; - } - /** - * repeated bool propagate_down = 11; - * - *
-       * Specifies on which bottoms the backpropagation should be skipped.
-       * The size must be either 0 or equal to the number of bottoms.
-       * 
- */ - public Builder clearPropagateDown() { - propagateDown_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - private java.util.List include_ = - java.util.Collections.emptyList(); - private void ensureIncludeIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { - include_ = new java.util.ArrayList(include_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> includeBuilder_; - - /** - * 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() { - if (includeBuilder_ == null) { - return java.util.Collections.unmodifiableList(include_); - } else { - return includeBuilder_.getMessageList(); - } - } - /** - * 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() { - if (includeBuilder_ == null) { - return include_.size(); - } else { - return includeBuilder_.getCount(); - } - } - /** - * 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) { - if (includeBuilder_ == null) { - return include_.get(index); - } else { - return includeBuilder_.getMessage(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 Builder setInclude( - int index, caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.set(index, value); - onChanged(); - } else { - includeBuilder_.setMessage(index, value); - } - return this; - } - /** - * 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 Builder setInclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.set(index, builderForValue.build()); - onChanged(); - } else { - includeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * 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 Builder addInclude(caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.add(value); - onChanged(); - } else { - includeBuilder_.addMessage(value); - } - return this; - } - /** - * 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 Builder addInclude( - int index, caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.add(index, value); - onChanged(); - } else { - includeBuilder_.addMessage(index, value); - } - return this; - } - /** - * 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 Builder addInclude( - caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.add(builderForValue.build()); - onChanged(); - } else { - includeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * 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 Builder addInclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.add(index, builderForValue.build()); - onChanged(); - } else { - includeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * 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 Builder addAllInclude( - java.lang.Iterable values) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, include_); - onChanged(); - } else { - includeBuilder_.addAllMessages(values); - } - return this; - } - /** - * 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 Builder clearInclude() { - if (includeBuilder_ == null) { - include_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - includeBuilder_.clear(); - } - return this; - } - /** - * 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 Builder removeInclude(int index) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.remove(index); - onChanged(); - } else { - includeBuilder_.remove(index); - } - return this; - } - /** - * 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.Builder getIncludeBuilder( - int index) { - return getIncludeFieldBuilder().getBuilder(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) { - if (includeBuilder_ == null) { - return include_.get(index); } else { - return includeBuilder_.getMessageOrBuilder(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 java.util.List - getIncludeOrBuilderList() { - if (includeBuilder_ != null) { - return includeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(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 caffe.Caffe.NetStateRule.Builder addIncludeBuilder() { - return getIncludeFieldBuilder().addBuilder( - caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * 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.Builder addIncludeBuilder( - int index) { - return getIncludeFieldBuilder().addBuilder( - index, caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * 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 - getIncludeBuilderList() { - return getIncludeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> - getIncludeFieldBuilder() { - if (includeBuilder_ == null) { - includeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( - include_, - ((bitField0_ & 0x00000200) == 0x00000200), - getParentForChildren(), - isClean()); - include_ = null; - } - return includeBuilder_; - } - - private java.util.List exclude_ = - java.util.Collections.emptyList(); - private void ensureExcludeIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { - exclude_ = new java.util.ArrayList(exclude_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> excludeBuilder_; - - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public java.util.List getExcludeList() { - if (excludeBuilder_ == null) { - return java.util.Collections.unmodifiableList(exclude_); - } else { - return excludeBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public int getExcludeCount() { - if (excludeBuilder_ == null) { - return exclude_.size(); - } else { - return excludeBuilder_.getCount(); - } - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public caffe.Caffe.NetStateRule getExclude(int index) { - if (excludeBuilder_ == null) { - return exclude_.get(index); - } else { - return excludeBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder setExclude( - int index, caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.set(index, value); - onChanged(); - } else { - excludeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder setExclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.set(index, builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder addExclude(caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.add(value); - onChanged(); - } else { - excludeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder addExclude( - int index, caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.add(index, value); - onChanged(); - } else { - excludeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder addExclude( - caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.add(builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder addExclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.add(index, builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder addAllExclude( - java.lang.Iterable values) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, exclude_); - onChanged(); - } else { - excludeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder clearExclude() { - if (excludeBuilder_ == null) { - exclude_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - excludeBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public Builder removeExclude(int index) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.remove(index); - onChanged(); - } else { - excludeBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public caffe.Caffe.NetStateRule.Builder getExcludeBuilder( - int index) { - return getExcludeFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( - int index) { - if (excludeBuilder_ == null) { - return exclude_.get(index); } else { - return excludeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public java.util.List - getExcludeOrBuilderList() { - if (excludeBuilder_ != null) { - return excludeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(exclude_); - } - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public caffe.Caffe.NetStateRule.Builder addExcludeBuilder() { - return getExcludeFieldBuilder().addBuilder( - caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public caffe.Caffe.NetStateRule.Builder addExcludeBuilder( - int index) { - return getExcludeFieldBuilder().addBuilder( - index, caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule exclude = 9; - */ - public java.util.List - getExcludeBuilderList() { - return getExcludeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> - getExcludeFieldBuilder() { - if (excludeBuilder_ == null) { - excludeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( - exclude_, - ((bitField0_ & 0x00000400) == 0x00000400), - getParentForChildren(), - isClean()); - exclude_ = null; - } - return excludeBuilder_; - } - - private caffe.Caffe.TransformationParameter transformParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> transformParamBuilder_; - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public boolean hasTransformParam() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public caffe.Caffe.TransformationParameter getTransformParam() { - if (transformParamBuilder_ == null) { - return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } else { - return transformParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public Builder setTransformParam(caffe.Caffe.TransformationParameter value) { - if (transformParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformParam_ = value; - onChanged(); - } else { - transformParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public Builder setTransformParam( - caffe.Caffe.TransformationParameter.Builder builderForValue) { - if (transformParamBuilder_ == null) { - transformParam_ = builderForValue.build(); - onChanged(); - } else { - transformParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public Builder mergeTransformParam(caffe.Caffe.TransformationParameter value) { - if (transformParamBuilder_ == null) { - if (((bitField0_ & 0x00000800) == 0x00000800) && - transformParam_ != null && - transformParam_ != caffe.Caffe.TransformationParameter.getDefaultInstance()) { - transformParam_ = - caffe.Caffe.TransformationParameter.newBuilder(transformParam_).mergeFrom(value).buildPartial(); - } else { - transformParam_ = value; - } - onChanged(); - } else { - transformParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public Builder clearTransformParam() { - if (transformParamBuilder_ == null) { - transformParam_ = null; - onChanged(); - } else { - transformParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000800); - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public caffe.Caffe.TransformationParameter.Builder getTransformParamBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getTransformParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { - if (transformParamBuilder_ != null) { - return transformParamBuilder_.getMessageOrBuilder(); - } else { - return transformParam_ == null ? - caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - } - /** - * optional .caffe.TransformationParameter transform_param = 100; - * - *
-       * Parameters for data pre-processing.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> - getTransformParamFieldBuilder() { - if (transformParamBuilder_ == null) { - transformParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder>( - getTransformParam(), - getParentForChildren(), - isClean()); - transformParam_ = null; - } - return transformParamBuilder_; - } - - private caffe.Caffe.LossParameter lossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> lossParamBuilder_; - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public boolean hasLossParam() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public caffe.Caffe.LossParameter getLossParam() { - if (lossParamBuilder_ == null) { - return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } else { - return lossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public Builder setLossParam(caffe.Caffe.LossParameter value) { - if (lossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lossParam_ = value; - onChanged(); - } else { - lossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public Builder setLossParam( - caffe.Caffe.LossParameter.Builder builderForValue) { - if (lossParamBuilder_ == null) { - lossParam_ = builderForValue.build(); - onChanged(); - } else { - lossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public Builder mergeLossParam(caffe.Caffe.LossParameter value) { - if (lossParamBuilder_ == null) { - if (((bitField0_ & 0x00001000) == 0x00001000) && - lossParam_ != null && - lossParam_ != caffe.Caffe.LossParameter.getDefaultInstance()) { - lossParam_ = - caffe.Caffe.LossParameter.newBuilder(lossParam_).mergeFrom(value).buildPartial(); - } else { - lossParam_ = value; - } - onChanged(); - } else { - lossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public Builder clearLossParam() { - if (lossParamBuilder_ == null) { - lossParam_ = null; - onChanged(); - } else { - lossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public caffe.Caffe.LossParameter.Builder getLossParamBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { - if (lossParamBuilder_ != null) { - return lossParamBuilder_.getMessageOrBuilder(); - } else { - return lossParam_ == null ? - caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - } - /** - * optional .caffe.LossParameter loss_param = 101; - * - *
-       * Parameters shared by loss layers.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> - getLossParamFieldBuilder() { - if (lossParamBuilder_ == null) { - lossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder>( - getLossParam(), - getParentForChildren(), - isClean()); - lossParam_ = null; - } - return lossParamBuilder_; - } - - private caffe.Caffe.AccuracyParameter accuracyParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> accuracyParamBuilder_; - /** - * 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_ & 0x00002000) == 0x00002000); - } - /** - * 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() { - if (accuracyParamBuilder_ == null) { - return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } else { - return accuracyParamBuilder_.getMessage(); - } - } - /** - * 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 Builder setAccuracyParam(caffe.Caffe.AccuracyParameter value) { - if (accuracyParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accuracyParam_ = value; - onChanged(); - } else { - accuracyParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * 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 Builder setAccuracyParam( - caffe.Caffe.AccuracyParameter.Builder builderForValue) { - if (accuracyParamBuilder_ == null) { - accuracyParam_ = builderForValue.build(); - onChanged(); - } else { - accuracyParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * 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 Builder mergeAccuracyParam(caffe.Caffe.AccuracyParameter value) { - if (accuracyParamBuilder_ == null) { - if (((bitField0_ & 0x00002000) == 0x00002000) && - accuracyParam_ != null && - accuracyParam_ != caffe.Caffe.AccuracyParameter.getDefaultInstance()) { - accuracyParam_ = - caffe.Caffe.AccuracyParameter.newBuilder(accuracyParam_).mergeFrom(value).buildPartial(); - } else { - accuracyParam_ = value; - } - onChanged(); - } else { - accuracyParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * 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 Builder clearAccuracyParam() { - if (accuracyParamBuilder_ == null) { - accuracyParam_ = null; - onChanged(); - } else { - accuracyParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - return this; - } - /** - * 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.Builder getAccuracyParamBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return getAccuracyParamFieldBuilder().getBuilder(); - } - /** - * 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() { - if (accuracyParamBuilder_ != null) { - return accuracyParamBuilder_.getMessageOrBuilder(); - } else { - return accuracyParam_ == null ? - caffe.Caffe.AccuracyParameter.getDefaultInstance() : 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.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> - getAccuracyParamFieldBuilder() { - if (accuracyParamBuilder_ == null) { - accuracyParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder>( - getAccuracyParam(), - getParentForChildren(), - isClean()); - accuracyParam_ = null; - } - return accuracyParamBuilder_; - } - - private caffe.Caffe.ArgMaxParameter argmaxParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> argmaxParamBuilder_; - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public boolean hasArgmaxParam() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public caffe.Caffe.ArgMaxParameter getArgmaxParam() { - if (argmaxParamBuilder_ == null) { - return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } else { - return argmaxParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public Builder setArgmaxParam(caffe.Caffe.ArgMaxParameter value) { - if (argmaxParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - argmaxParam_ = value; - onChanged(); - } else { - argmaxParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public Builder setArgmaxParam( - caffe.Caffe.ArgMaxParameter.Builder builderForValue) { - if (argmaxParamBuilder_ == null) { - argmaxParam_ = builderForValue.build(); - onChanged(); - } else { - argmaxParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public Builder mergeArgmaxParam(caffe.Caffe.ArgMaxParameter value) { - if (argmaxParamBuilder_ == null) { - if (((bitField0_ & 0x00004000) == 0x00004000) && - argmaxParam_ != null && - argmaxParam_ != caffe.Caffe.ArgMaxParameter.getDefaultInstance()) { - argmaxParam_ = - caffe.Caffe.ArgMaxParameter.newBuilder(argmaxParam_).mergeFrom(value).buildPartial(); - } else { - argmaxParam_ = value; - } - onChanged(); - } else { - argmaxParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public Builder clearArgmaxParam() { - if (argmaxParamBuilder_ == null) { - argmaxParam_ = null; - onChanged(); - } else { - argmaxParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00004000); - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public caffe.Caffe.ArgMaxParameter.Builder getArgmaxParamBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return getArgmaxParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { - if (argmaxParamBuilder_ != null) { - return argmaxParamBuilder_.getMessageOrBuilder(); - } else { - return argmaxParam_ == null ? - caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 103; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> - getArgmaxParamFieldBuilder() { - if (argmaxParamBuilder_ == null) { - argmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder>( - getArgmaxParam(), - getParentForChildren(), - isClean()); - argmaxParam_ = null; - } - return argmaxParamBuilder_; - } - - private caffe.Caffe.ConcatParameter concatParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> concatParamBuilder_; - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public boolean hasConcatParam() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public caffe.Caffe.ConcatParameter getConcatParam() { - if (concatParamBuilder_ == null) { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } else { - return concatParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public Builder setConcatParam(caffe.Caffe.ConcatParameter value) { - if (concatParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - concatParam_ = value; - onChanged(); - } else { - concatParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public Builder setConcatParam( - caffe.Caffe.ConcatParameter.Builder builderForValue) { - if (concatParamBuilder_ == null) { - concatParam_ = builderForValue.build(); - onChanged(); - } else { - concatParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public Builder mergeConcatParam(caffe.Caffe.ConcatParameter value) { - if (concatParamBuilder_ == null) { - if (((bitField0_ & 0x00008000) == 0x00008000) && - concatParam_ != null && - concatParam_ != caffe.Caffe.ConcatParameter.getDefaultInstance()) { - concatParam_ = - caffe.Caffe.ConcatParameter.newBuilder(concatParam_).mergeFrom(value).buildPartial(); - } else { - concatParam_ = value; - } - onChanged(); - } else { - concatParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public Builder clearConcatParam() { - if (concatParamBuilder_ == null) { - concatParam_ = null; - onChanged(); - } else { - concatParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00008000); - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public caffe.Caffe.ConcatParameter.Builder getConcatParamBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return getConcatParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { - if (concatParamBuilder_ != null) { - return concatParamBuilder_.getMessageOrBuilder(); - } else { - return concatParam_ == null ? - caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - } - /** - * optional .caffe.ConcatParameter concat_param = 104; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> - getConcatParamFieldBuilder() { - if (concatParamBuilder_ == null) { - concatParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder>( - getConcatParam(), - getParentForChildren(), - isClean()); - concatParam_ = null; - } - return concatParamBuilder_; - } - - private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> contrastiveLossParamBuilder_; - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public boolean hasContrastiveLossParam() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { - if (contrastiveLossParamBuilder_ == null) { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } else { - return contrastiveLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public Builder setContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { - if (contrastiveLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contrastiveLossParam_ = value; - onChanged(); - } else { - contrastiveLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public Builder setContrastiveLossParam( - caffe.Caffe.ContrastiveLossParameter.Builder builderForValue) { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = builderForValue.build(); - onChanged(); - } else { - contrastiveLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public Builder mergeContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { - if (contrastiveLossParamBuilder_ == null) { - if (((bitField0_ & 0x00010000) == 0x00010000) && - contrastiveLossParam_ != null && - contrastiveLossParam_ != caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) { - contrastiveLossParam_ = - caffe.Caffe.ContrastiveLossParameter.newBuilder(contrastiveLossParam_).mergeFrom(value).buildPartial(); - } else { - contrastiveLossParam_ = value; - } - onChanged(); - } else { - contrastiveLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public Builder clearContrastiveLossParam() { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = null; - onChanged(); - } else { - contrastiveLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00010000); - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public caffe.Caffe.ContrastiveLossParameter.Builder getContrastiveLossParamBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return getContrastiveLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { - if (contrastiveLossParamBuilder_ != null) { - return contrastiveLossParamBuilder_.getMessageOrBuilder(); - } else { - return contrastiveLossParam_ == null ? - caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> - getContrastiveLossParamFieldBuilder() { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder>( - getContrastiveLossParam(), - getParentForChildren(), - isClean()); - contrastiveLossParam_ = null; - } - return contrastiveLossParamBuilder_; - } - - private caffe.Caffe.ConvolutionParameter convolutionParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> convolutionParamBuilder_; - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public boolean hasConvolutionParam() { - return ((bitField0_ & 0x00020000) == 0x00020000); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public caffe.Caffe.ConvolutionParameter getConvolutionParam() { - if (convolutionParamBuilder_ == null) { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } else { - return convolutionParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public Builder setConvolutionParam(caffe.Caffe.ConvolutionParameter value) { - if (convolutionParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - convolutionParam_ = value; - onChanged(); - } else { - convolutionParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public Builder setConvolutionParam( - caffe.Caffe.ConvolutionParameter.Builder builderForValue) { - if (convolutionParamBuilder_ == null) { - convolutionParam_ = builderForValue.build(); - onChanged(); - } else { - convolutionParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public Builder mergeConvolutionParam(caffe.Caffe.ConvolutionParameter value) { - if (convolutionParamBuilder_ == null) { - if (((bitField0_ & 0x00020000) == 0x00020000) && - convolutionParam_ != null && - convolutionParam_ != caffe.Caffe.ConvolutionParameter.getDefaultInstance()) { - convolutionParam_ = - caffe.Caffe.ConvolutionParameter.newBuilder(convolutionParam_).mergeFrom(value).buildPartial(); - } else { - convolutionParam_ = value; - } - onChanged(); - } else { - convolutionParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public Builder clearConvolutionParam() { - if (convolutionParamBuilder_ == null) { - convolutionParam_ = null; - onChanged(); - } else { - convolutionParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00020000); - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public caffe.Caffe.ConvolutionParameter.Builder getConvolutionParamBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getConvolutionParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { - if (convolutionParamBuilder_ != null) { - return convolutionParamBuilder_.getMessageOrBuilder(); - } else { - return convolutionParam_ == null ? - caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 106; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> - getConvolutionParamFieldBuilder() { - if (convolutionParamBuilder_ == null) { - convolutionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder>( - getConvolutionParam(), - getParentForChildren(), - isClean()); - convolutionParam_ = null; - } - return convolutionParamBuilder_; - } - - private caffe.Caffe.DataParameter dataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> dataParamBuilder_; - /** - * optional .caffe.DataParameter data_param = 107; - */ - public boolean hasDataParam() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public caffe.Caffe.DataParameter getDataParam() { - if (dataParamBuilder_ == null) { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } else { - return dataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public Builder setDataParam(caffe.Caffe.DataParameter value) { - if (dataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataParam_ = value; - onChanged(); - } else { - dataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public Builder setDataParam( - caffe.Caffe.DataParameter.Builder builderForValue) { - if (dataParamBuilder_ == null) { - dataParam_ = builderForValue.build(); - onChanged(); - } else { - dataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public Builder mergeDataParam(caffe.Caffe.DataParameter value) { - if (dataParamBuilder_ == null) { - if (((bitField0_ & 0x00040000) == 0x00040000) && - dataParam_ != null && - dataParam_ != caffe.Caffe.DataParameter.getDefaultInstance()) { - dataParam_ = - caffe.Caffe.DataParameter.newBuilder(dataParam_).mergeFrom(value).buildPartial(); - } else { - dataParam_ = value; - } - onChanged(); - } else { - dataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public Builder clearDataParam() { - if (dataParamBuilder_ == null) { - dataParam_ = null; - onChanged(); - } else { - dataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00040000); - return this; - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public caffe.Caffe.DataParameter.Builder getDataParamBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return getDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { - if (dataParamBuilder_ != null) { - return dataParamBuilder_.getMessageOrBuilder(); - } else { - return dataParam_ == null ? - caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - } - /** - * optional .caffe.DataParameter data_param = 107; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> - getDataParamFieldBuilder() { - if (dataParamBuilder_ == null) { - dataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder>( - getDataParam(), - getParentForChildren(), - isClean()); - dataParam_ = null; - } - return dataParamBuilder_; - } - - private caffe.Caffe.DropoutParameter dropoutParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> dropoutParamBuilder_; - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public boolean hasDropoutParam() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public caffe.Caffe.DropoutParameter getDropoutParam() { - if (dropoutParamBuilder_ == null) { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } else { - return dropoutParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public Builder setDropoutParam(caffe.Caffe.DropoutParameter value) { - if (dropoutParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dropoutParam_ = value; - onChanged(); - } else { - dropoutParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public Builder setDropoutParam( - caffe.Caffe.DropoutParameter.Builder builderForValue) { - if (dropoutParamBuilder_ == null) { - dropoutParam_ = builderForValue.build(); - onChanged(); - } else { - dropoutParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public Builder mergeDropoutParam(caffe.Caffe.DropoutParameter value) { - if (dropoutParamBuilder_ == null) { - if (((bitField0_ & 0x00080000) == 0x00080000) && - dropoutParam_ != null && - dropoutParam_ != caffe.Caffe.DropoutParameter.getDefaultInstance()) { - dropoutParam_ = - caffe.Caffe.DropoutParameter.newBuilder(dropoutParam_).mergeFrom(value).buildPartial(); - } else { - dropoutParam_ = value; - } - onChanged(); - } else { - dropoutParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public Builder clearDropoutParam() { - if (dropoutParamBuilder_ == null) { - dropoutParam_ = null; - onChanged(); - } else { - dropoutParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00080000); - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public caffe.Caffe.DropoutParameter.Builder getDropoutParamBuilder() { - bitField0_ |= 0x00080000; - onChanged(); - return getDropoutParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { - if (dropoutParamBuilder_ != null) { - return dropoutParamBuilder_.getMessageOrBuilder(); - } else { - return dropoutParam_ == null ? - caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - } - /** - * optional .caffe.DropoutParameter dropout_param = 108; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> - getDropoutParamFieldBuilder() { - if (dropoutParamBuilder_ == null) { - dropoutParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder>( - getDropoutParam(), - getParentForChildren(), - isClean()); - dropoutParam_ = null; - } - return dropoutParamBuilder_; - } - - private caffe.Caffe.DummyDataParameter dummyDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> dummyDataParamBuilder_; - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public boolean hasDummyDataParam() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public caffe.Caffe.DummyDataParameter getDummyDataParam() { - if (dummyDataParamBuilder_ == null) { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } else { - return dummyDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public Builder setDummyDataParam(caffe.Caffe.DummyDataParameter value) { - if (dummyDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dummyDataParam_ = value; - onChanged(); - } else { - dummyDataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public Builder setDummyDataParam( - caffe.Caffe.DummyDataParameter.Builder builderForValue) { - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = builderForValue.build(); - onChanged(); - } else { - dummyDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public Builder mergeDummyDataParam(caffe.Caffe.DummyDataParameter value) { - if (dummyDataParamBuilder_ == null) { - if (((bitField0_ & 0x00100000) == 0x00100000) && - dummyDataParam_ != null && - dummyDataParam_ != caffe.Caffe.DummyDataParameter.getDefaultInstance()) { - dummyDataParam_ = - caffe.Caffe.DummyDataParameter.newBuilder(dummyDataParam_).mergeFrom(value).buildPartial(); - } else { - dummyDataParam_ = value; - } - onChanged(); - } else { - dummyDataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public Builder clearDummyDataParam() { - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = null; - onChanged(); - } else { - dummyDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00100000); - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public caffe.Caffe.DummyDataParameter.Builder getDummyDataParamBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return getDummyDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { - if (dummyDataParamBuilder_ != null) { - return dummyDataParamBuilder_.getMessageOrBuilder(); - } else { - return dummyDataParam_ == null ? - caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 109; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> - getDummyDataParamFieldBuilder() { - if (dummyDataParamBuilder_ == null) { - dummyDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder>( - getDummyDataParam(), - getParentForChildren(), - isClean()); - dummyDataParam_ = null; - } - return dummyDataParamBuilder_; - } - - private caffe.Caffe.EltwiseParameter eltwiseParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> eltwiseParamBuilder_; - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public boolean hasEltwiseParam() { - return ((bitField0_ & 0x00200000) == 0x00200000); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public caffe.Caffe.EltwiseParameter getEltwiseParam() { - if (eltwiseParamBuilder_ == null) { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } else { - return eltwiseParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public Builder setEltwiseParam(caffe.Caffe.EltwiseParameter value) { - if (eltwiseParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eltwiseParam_ = value; - onChanged(); - } else { - eltwiseParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public Builder setEltwiseParam( - caffe.Caffe.EltwiseParameter.Builder builderForValue) { - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = builderForValue.build(); - onChanged(); - } else { - eltwiseParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public Builder mergeEltwiseParam(caffe.Caffe.EltwiseParameter value) { - if (eltwiseParamBuilder_ == null) { - if (((bitField0_ & 0x00200000) == 0x00200000) && - eltwiseParam_ != null && - eltwiseParam_ != caffe.Caffe.EltwiseParameter.getDefaultInstance()) { - eltwiseParam_ = - caffe.Caffe.EltwiseParameter.newBuilder(eltwiseParam_).mergeFrom(value).buildPartial(); - } else { - eltwiseParam_ = value; - } - onChanged(); - } else { - eltwiseParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public Builder clearEltwiseParam() { - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = null; - onChanged(); - } else { - eltwiseParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00200000); - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public caffe.Caffe.EltwiseParameter.Builder getEltwiseParamBuilder() { - bitField0_ |= 0x00200000; - onChanged(); - return getEltwiseParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { - if (eltwiseParamBuilder_ != null) { - return eltwiseParamBuilder_.getMessageOrBuilder(); - } else { - return eltwiseParam_ == null ? - caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 110; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> - getEltwiseParamFieldBuilder() { - if (eltwiseParamBuilder_ == null) { - eltwiseParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder>( - getEltwiseParam(), - getParentForChildren(), - isClean()); - eltwiseParam_ = null; - } - return eltwiseParamBuilder_; - } - - private caffe.Caffe.EmbedParameter embedParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder> embedParamBuilder_; - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public boolean hasEmbedParam() { - return ((bitField0_ & 0x00400000) == 0x00400000); - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public caffe.Caffe.EmbedParameter getEmbedParam() { - if (embedParamBuilder_ == null) { - return embedParam_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; - } else { - return embedParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public Builder setEmbedParam(caffe.Caffe.EmbedParameter value) { - if (embedParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - embedParam_ = value; - onChanged(); - } else { - embedParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public Builder setEmbedParam( - caffe.Caffe.EmbedParameter.Builder builderForValue) { - if (embedParamBuilder_ == null) { - embedParam_ = builderForValue.build(); - onChanged(); - } else { - embedParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public Builder mergeEmbedParam(caffe.Caffe.EmbedParameter value) { - if (embedParamBuilder_ == null) { - if (((bitField0_ & 0x00400000) == 0x00400000) && - embedParam_ != null && - embedParam_ != caffe.Caffe.EmbedParameter.getDefaultInstance()) { - embedParam_ = - caffe.Caffe.EmbedParameter.newBuilder(embedParam_).mergeFrom(value).buildPartial(); - } else { - embedParam_ = value; - } - onChanged(); - } else { - embedParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public Builder clearEmbedParam() { - if (embedParamBuilder_ == null) { - embedParam_ = null; - onChanged(); - } else { - embedParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00400000); - return this; - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public caffe.Caffe.EmbedParameter.Builder getEmbedParamBuilder() { - bitField0_ |= 0x00400000; - onChanged(); - return getEmbedParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - public caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder() { - if (embedParamBuilder_ != null) { - return embedParamBuilder_.getMessageOrBuilder(); - } else { - return embedParam_ == null ? - caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; - } - } - /** - * optional .caffe.EmbedParameter embed_param = 137; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder> - getEmbedParamFieldBuilder() { - if (embedParamBuilder_ == null) { - embedParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder>( - getEmbedParam(), - getParentForChildren(), - isClean()); - embedParam_ = null; - } - return embedParamBuilder_; - } - - private caffe.Caffe.ExpParameter expParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> expParamBuilder_; - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public boolean hasExpParam() { - return ((bitField0_ & 0x00800000) == 0x00800000); - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public caffe.Caffe.ExpParameter getExpParam() { - if (expParamBuilder_ == null) { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } else { - return expParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public Builder setExpParam(caffe.Caffe.ExpParameter value) { - if (expParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expParam_ = value; - onChanged(); - } else { - expParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public Builder setExpParam( - caffe.Caffe.ExpParameter.Builder builderForValue) { - if (expParamBuilder_ == null) { - expParam_ = builderForValue.build(); - onChanged(); - } else { - expParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public Builder mergeExpParam(caffe.Caffe.ExpParameter value) { - if (expParamBuilder_ == null) { - if (((bitField0_ & 0x00800000) == 0x00800000) && - expParam_ != null && - expParam_ != caffe.Caffe.ExpParameter.getDefaultInstance()) { - expParam_ = - caffe.Caffe.ExpParameter.newBuilder(expParam_).mergeFrom(value).buildPartial(); - } else { - expParam_ = value; - } - onChanged(); - } else { - expParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public Builder clearExpParam() { - if (expParamBuilder_ == null) { - expParam_ = null; - onChanged(); - } else { - expParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00800000); - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public caffe.Caffe.ExpParameter.Builder getExpParamBuilder() { - bitField0_ |= 0x00800000; - onChanged(); - return getExpParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { - if (expParamBuilder_ != null) { - return expParamBuilder_.getMessageOrBuilder(); - } else { - return expParam_ == null ? - caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - } - /** - * optional .caffe.ExpParameter exp_param = 111; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> - getExpParamFieldBuilder() { - if (expParamBuilder_ == null) { - expParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder>( - getExpParam(), - getParentForChildren(), - isClean()); - expParam_ = null; - } - return expParamBuilder_; - } - - private caffe.Caffe.FlattenParameter flattenParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder> flattenParamBuilder_; - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public boolean hasFlattenParam() { - return ((bitField0_ & 0x01000000) == 0x01000000); - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public caffe.Caffe.FlattenParameter getFlattenParam() { - if (flattenParamBuilder_ == null) { - return flattenParam_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; - } else { - return flattenParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public Builder setFlattenParam(caffe.Caffe.FlattenParameter value) { - if (flattenParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - flattenParam_ = value; - onChanged(); - } else { - flattenParamBuilder_.setMessage(value); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public Builder setFlattenParam( - caffe.Caffe.FlattenParameter.Builder builderForValue) { - if (flattenParamBuilder_ == null) { - flattenParam_ = builderForValue.build(); - onChanged(); - } else { - flattenParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public Builder mergeFlattenParam(caffe.Caffe.FlattenParameter value) { - if (flattenParamBuilder_ == null) { - if (((bitField0_ & 0x01000000) == 0x01000000) && - flattenParam_ != null && - flattenParam_ != caffe.Caffe.FlattenParameter.getDefaultInstance()) { - flattenParam_ = - caffe.Caffe.FlattenParameter.newBuilder(flattenParam_).mergeFrom(value).buildPartial(); - } else { - flattenParam_ = value; - } - onChanged(); - } else { - flattenParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public Builder clearFlattenParam() { - if (flattenParamBuilder_ == null) { - flattenParam_ = null; - onChanged(); - } else { - flattenParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x01000000); - return this; - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public caffe.Caffe.FlattenParameter.Builder getFlattenParamBuilder() { - bitField0_ |= 0x01000000; - onChanged(); - return getFlattenParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - public caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder() { - if (flattenParamBuilder_ != null) { - return flattenParamBuilder_.getMessageOrBuilder(); - } else { - return flattenParam_ == null ? - caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; - } - } - /** - * optional .caffe.FlattenParameter flatten_param = 135; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder> - getFlattenParamFieldBuilder() { - if (flattenParamBuilder_ == null) { - flattenParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder>( - getFlattenParam(), - getParentForChildren(), - isClean()); - flattenParam_ = null; - } - return flattenParamBuilder_; - } - - private caffe.Caffe.HDF5DataParameter hdf5DataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> hdf5DataParamBuilder_; - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public boolean hasHdf5DataParam() { - return ((bitField0_ & 0x02000000) == 0x02000000); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { - if (hdf5DataParamBuilder_ == null) { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } else { - return hdf5DataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public Builder setHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { - if (hdf5DataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hdf5DataParam_ = value; - onChanged(); - } else { - hdf5DataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public Builder setHdf5DataParam( - caffe.Caffe.HDF5DataParameter.Builder builderForValue) { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = builderForValue.build(); - onChanged(); - } else { - hdf5DataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public Builder mergeHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { - if (hdf5DataParamBuilder_ == null) { - if (((bitField0_ & 0x02000000) == 0x02000000) && - hdf5DataParam_ != null && - hdf5DataParam_ != caffe.Caffe.HDF5DataParameter.getDefaultInstance()) { - hdf5DataParam_ = - caffe.Caffe.HDF5DataParameter.newBuilder(hdf5DataParam_).mergeFrom(value).buildPartial(); - } else { - hdf5DataParam_ = value; - } - onChanged(); - } else { - hdf5DataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public Builder clearHdf5DataParam() { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = null; - onChanged(); - } else { - hdf5DataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x02000000); - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public caffe.Caffe.HDF5DataParameter.Builder getHdf5DataParamBuilder() { - bitField0_ |= 0x02000000; - onChanged(); - return getHdf5DataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { - if (hdf5DataParamBuilder_ != null) { - return hdf5DataParamBuilder_.getMessageOrBuilder(); - } else { - return hdf5DataParam_ == null ? - caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 112; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> - getHdf5DataParamFieldBuilder() { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder>( - getHdf5DataParam(), - getParentForChildren(), - isClean()); - hdf5DataParam_ = null; - } - return hdf5DataParamBuilder_; - } - - private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public boolean hasHdf5OutputParam() { - return ((bitField0_ & 0x04000000) == 0x04000000); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } else { - return hdf5OutputParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hdf5OutputParam_ = value; - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(value); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public Builder setHdf5OutputParam( - caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = builderForValue.build(); - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (((bitField0_ & 0x04000000) == 0x04000000) && - hdf5OutputParam_ != null && - hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { - hdf5OutputParam_ = - caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); - } else { - hdf5OutputParam_ = value; - } - onChanged(); - } else { - hdf5OutputParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public Builder clearHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - onChanged(); - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x04000000); - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { - bitField0_ |= 0x04000000; - onChanged(); - return getHdf5OutputParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - if (hdf5OutputParamBuilder_ != null) { - return hdf5OutputParamBuilder_.getMessageOrBuilder(); - } else { - return hdf5OutputParam_ == null ? - caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> - getHdf5OutputParamFieldBuilder() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( - getHdf5OutputParam(), - getParentForChildren(), - isClean()); - hdf5OutputParam_ = null; - } - return hdf5OutputParamBuilder_; - } - - private caffe.Caffe.HingeLossParameter hingeLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> hingeLossParamBuilder_; - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public boolean hasHingeLossParam() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public caffe.Caffe.HingeLossParameter getHingeLossParam() { - if (hingeLossParamBuilder_ == null) { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } else { - return hingeLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public Builder setHingeLossParam(caffe.Caffe.HingeLossParameter value) { - if (hingeLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hingeLossParam_ = value; - onChanged(); - } else { - hingeLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public Builder setHingeLossParam( - caffe.Caffe.HingeLossParameter.Builder builderForValue) { - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = builderForValue.build(); - onChanged(); - } else { - hingeLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public Builder mergeHingeLossParam(caffe.Caffe.HingeLossParameter value) { - if (hingeLossParamBuilder_ == null) { - if (((bitField0_ & 0x08000000) == 0x08000000) && - hingeLossParam_ != null && - hingeLossParam_ != caffe.Caffe.HingeLossParameter.getDefaultInstance()) { - hingeLossParam_ = - caffe.Caffe.HingeLossParameter.newBuilder(hingeLossParam_).mergeFrom(value).buildPartial(); - } else { - hingeLossParam_ = value; - } - onChanged(); - } else { - hingeLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public Builder clearHingeLossParam() { - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = null; - onChanged(); - } else { - hingeLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x08000000); - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public caffe.Caffe.HingeLossParameter.Builder getHingeLossParamBuilder() { - bitField0_ |= 0x08000000; - onChanged(); - return getHingeLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { - if (hingeLossParamBuilder_ != null) { - return hingeLossParamBuilder_.getMessageOrBuilder(); - } else { - return hingeLossParam_ == null ? - caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 114; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> - getHingeLossParamFieldBuilder() { - if (hingeLossParamBuilder_ == null) { - hingeLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder>( - getHingeLossParam(), - getParentForChildren(), - isClean()); - hingeLossParam_ = null; - } - return hingeLossParamBuilder_; - } - - private caffe.Caffe.ImageDataParameter imageDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> imageDataParamBuilder_; - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public boolean hasImageDataParam() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public caffe.Caffe.ImageDataParameter getImageDataParam() { - if (imageDataParamBuilder_ == null) { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } else { - return imageDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public Builder setImageDataParam(caffe.Caffe.ImageDataParameter value) { - if (imageDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageDataParam_ = value; - onChanged(); - } else { - imageDataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public Builder setImageDataParam( - caffe.Caffe.ImageDataParameter.Builder builderForValue) { - if (imageDataParamBuilder_ == null) { - imageDataParam_ = builderForValue.build(); - onChanged(); - } else { - imageDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public Builder mergeImageDataParam(caffe.Caffe.ImageDataParameter value) { - if (imageDataParamBuilder_ == null) { - if (((bitField0_ & 0x10000000) == 0x10000000) && - imageDataParam_ != null && - imageDataParam_ != caffe.Caffe.ImageDataParameter.getDefaultInstance()) { - imageDataParam_ = - caffe.Caffe.ImageDataParameter.newBuilder(imageDataParam_).mergeFrom(value).buildPartial(); - } else { - imageDataParam_ = value; - } - onChanged(); - } else { - imageDataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public Builder clearImageDataParam() { - if (imageDataParamBuilder_ == null) { - imageDataParam_ = null; - onChanged(); - } else { - imageDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x10000000); - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public caffe.Caffe.ImageDataParameter.Builder getImageDataParamBuilder() { - bitField0_ |= 0x10000000; - onChanged(); - return getImageDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { - if (imageDataParamBuilder_ != null) { - return imageDataParamBuilder_.getMessageOrBuilder(); - } else { - return imageDataParam_ == null ? - caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - } - /** - * optional .caffe.ImageDataParameter image_data_param = 115; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> - getImageDataParamFieldBuilder() { - if (imageDataParamBuilder_ == null) { - imageDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder>( - getImageDataParam(), - getParentForChildren(), - isClean()); - imageDataParam_ = null; - } - return imageDataParamBuilder_; - } - - private caffe.Caffe.InfogainLossParameter infogainLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> infogainLossParamBuilder_; - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public boolean hasInfogainLossParam() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { - if (infogainLossParamBuilder_ == null) { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } else { - return infogainLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public Builder setInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { - if (infogainLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infogainLossParam_ = value; - onChanged(); - } else { - infogainLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public Builder setInfogainLossParam( - caffe.Caffe.InfogainLossParameter.Builder builderForValue) { - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = builderForValue.build(); - onChanged(); - } else { - infogainLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public Builder mergeInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { - if (infogainLossParamBuilder_ == null) { - if (((bitField0_ & 0x20000000) == 0x20000000) && - infogainLossParam_ != null && - infogainLossParam_ != caffe.Caffe.InfogainLossParameter.getDefaultInstance()) { - infogainLossParam_ = - caffe.Caffe.InfogainLossParameter.newBuilder(infogainLossParam_).mergeFrom(value).buildPartial(); - } else { - infogainLossParam_ = value; - } - onChanged(); - } else { - infogainLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public Builder clearInfogainLossParam() { - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = null; - onChanged(); - } else { - infogainLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x20000000); - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public caffe.Caffe.InfogainLossParameter.Builder getInfogainLossParamBuilder() { - bitField0_ |= 0x20000000; - onChanged(); - return getInfogainLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { - if (infogainLossParamBuilder_ != null) { - return infogainLossParamBuilder_.getMessageOrBuilder(); - } else { - return infogainLossParam_ == null ? - caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 116; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> - getInfogainLossParamFieldBuilder() { - if (infogainLossParamBuilder_ == null) { - infogainLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder>( - getInfogainLossParam(), - getParentForChildren(), - isClean()); - infogainLossParam_ = null; - } - return infogainLossParamBuilder_; - } - - private caffe.Caffe.InnerProductParameter innerProductParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> innerProductParamBuilder_; - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public boolean hasInnerProductParam() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public caffe.Caffe.InnerProductParameter getInnerProductParam() { - if (innerProductParamBuilder_ == null) { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } else { - return innerProductParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public Builder setInnerProductParam(caffe.Caffe.InnerProductParameter value) { - if (innerProductParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - innerProductParam_ = value; - onChanged(); - } else { - innerProductParamBuilder_.setMessage(value); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public Builder setInnerProductParam( - caffe.Caffe.InnerProductParameter.Builder builderForValue) { - if (innerProductParamBuilder_ == null) { - innerProductParam_ = builderForValue.build(); - onChanged(); - } else { - innerProductParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public Builder mergeInnerProductParam(caffe.Caffe.InnerProductParameter value) { - if (innerProductParamBuilder_ == null) { - if (((bitField0_ & 0x40000000) == 0x40000000) && - innerProductParam_ != null && - innerProductParam_ != caffe.Caffe.InnerProductParameter.getDefaultInstance()) { - innerProductParam_ = - caffe.Caffe.InnerProductParameter.newBuilder(innerProductParam_).mergeFrom(value).buildPartial(); - } else { - innerProductParam_ = value; - } - onChanged(); - } else { - innerProductParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public Builder clearInnerProductParam() { - if (innerProductParamBuilder_ == null) { - innerProductParam_ = null; - onChanged(); - } else { - innerProductParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x40000000); - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public caffe.Caffe.InnerProductParameter.Builder getInnerProductParamBuilder() { - bitField0_ |= 0x40000000; - onChanged(); - return getInnerProductParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { - if (innerProductParamBuilder_ != null) { - return innerProductParamBuilder_.getMessageOrBuilder(); - } else { - return innerProductParam_ == null ? - caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 117; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> - getInnerProductParamFieldBuilder() { - if (innerProductParamBuilder_ == null) { - innerProductParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder>( - getInnerProductParam(), - getParentForChildren(), - isClean()); - innerProductParam_ = null; - } - return innerProductParamBuilder_; - } - - private caffe.Caffe.LogParameter logParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder> logParamBuilder_; - /** - * optional .caffe.LogParameter log_param = 134; - */ - public boolean hasLogParam() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public caffe.Caffe.LogParameter getLogParam() { - if (logParamBuilder_ == null) { - return logParam_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; - } else { - return logParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public Builder setLogParam(caffe.Caffe.LogParameter value) { - if (logParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - logParam_ = value; - onChanged(); - } else { - logParamBuilder_.setMessage(value); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public Builder setLogParam( - caffe.Caffe.LogParameter.Builder builderForValue) { - if (logParamBuilder_ == null) { - logParam_ = builderForValue.build(); - onChanged(); - } else { - logParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public Builder mergeLogParam(caffe.Caffe.LogParameter value) { - if (logParamBuilder_ == null) { - if (((bitField0_ & 0x80000000) == 0x80000000) && - logParam_ != null && - logParam_ != caffe.Caffe.LogParameter.getDefaultInstance()) { - logParam_ = - caffe.Caffe.LogParameter.newBuilder(logParam_).mergeFrom(value).buildPartial(); - } else { - logParam_ = value; - } - onChanged(); - } else { - logParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public Builder clearLogParam() { - if (logParamBuilder_ == null) { - logParam_ = null; - onChanged(); - } else { - logParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x80000000); - return this; - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public caffe.Caffe.LogParameter.Builder getLogParamBuilder() { - bitField0_ |= 0x80000000; - onChanged(); - return getLogParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - public caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder() { - if (logParamBuilder_ != null) { - return logParamBuilder_.getMessageOrBuilder(); - } else { - return logParam_ == null ? - caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; - } - } - /** - * optional .caffe.LogParameter log_param = 134; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder> - getLogParamFieldBuilder() { - if (logParamBuilder_ == null) { - logParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder>( - getLogParam(), - getParentForChildren(), - isClean()); - logParam_ = null; - } - return logParamBuilder_; - } - - private caffe.Caffe.LRNParameter lrnParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> lrnParamBuilder_; - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public boolean hasLrnParam() { - return ((bitField1_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public caffe.Caffe.LRNParameter getLrnParam() { - if (lrnParamBuilder_ == null) { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } else { - return lrnParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public Builder setLrnParam(caffe.Caffe.LRNParameter value) { - if (lrnParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lrnParam_ = value; - onChanged(); - } else { - lrnParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public Builder setLrnParam( - caffe.Caffe.LRNParameter.Builder builderForValue) { - if (lrnParamBuilder_ == null) { - lrnParam_ = builderForValue.build(); - onChanged(); - } else { - lrnParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public Builder mergeLrnParam(caffe.Caffe.LRNParameter value) { - if (lrnParamBuilder_ == null) { - if (((bitField1_ & 0x00000001) == 0x00000001) && - lrnParam_ != null && - lrnParam_ != caffe.Caffe.LRNParameter.getDefaultInstance()) { - lrnParam_ = - caffe.Caffe.LRNParameter.newBuilder(lrnParam_).mergeFrom(value).buildPartial(); - } else { - lrnParam_ = value; - } - onChanged(); - } else { - lrnParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public Builder clearLrnParam() { - if (lrnParamBuilder_ == null) { - lrnParam_ = null; - onChanged(); - } else { - lrnParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000001); - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public caffe.Caffe.LRNParameter.Builder getLrnParamBuilder() { - bitField1_ |= 0x00000001; - onChanged(); - return getLrnParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { - if (lrnParamBuilder_ != null) { - return lrnParamBuilder_.getMessageOrBuilder(); - } else { - return lrnParam_ == null ? - caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - } - /** - * optional .caffe.LRNParameter lrn_param = 118; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> - getLrnParamFieldBuilder() { - if (lrnParamBuilder_ == null) { - lrnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder>( - getLrnParam(), - getParentForChildren(), - isClean()); - lrnParam_ = null; - } - return lrnParamBuilder_; - } - - private caffe.Caffe.MemoryDataParameter memoryDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> memoryDataParamBuilder_; - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public boolean hasMemoryDataParam() { - return ((bitField1_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { - if (memoryDataParamBuilder_ == null) { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } else { - return memoryDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public Builder setMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { - if (memoryDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - memoryDataParam_ = value; - onChanged(); - } else { - memoryDataParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public Builder setMemoryDataParam( - caffe.Caffe.MemoryDataParameter.Builder builderForValue) { - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = builderForValue.build(); - onChanged(); - } else { - memoryDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public Builder mergeMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { - if (memoryDataParamBuilder_ == null) { - if (((bitField1_ & 0x00000002) == 0x00000002) && - memoryDataParam_ != null && - memoryDataParam_ != caffe.Caffe.MemoryDataParameter.getDefaultInstance()) { - memoryDataParam_ = - caffe.Caffe.MemoryDataParameter.newBuilder(memoryDataParam_).mergeFrom(value).buildPartial(); - } else { - memoryDataParam_ = value; - } - onChanged(); - } else { - memoryDataParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public Builder clearMemoryDataParam() { - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = null; - onChanged(); - } else { - memoryDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000002); - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public caffe.Caffe.MemoryDataParameter.Builder getMemoryDataParamBuilder() { - bitField1_ |= 0x00000002; - onChanged(); - return getMemoryDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { - if (memoryDataParamBuilder_ != null) { - return memoryDataParamBuilder_.getMessageOrBuilder(); - } else { - return memoryDataParam_ == null ? - caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 119; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> - getMemoryDataParamFieldBuilder() { - if (memoryDataParamBuilder_ == null) { - memoryDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder>( - getMemoryDataParam(), - getParentForChildren(), - isClean()); - memoryDataParam_ = null; - } - return memoryDataParamBuilder_; - } - - private caffe.Caffe.MVNParameter mvnParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> mvnParamBuilder_; - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public boolean hasMvnParam() { - return ((bitField1_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public caffe.Caffe.MVNParameter getMvnParam() { - if (mvnParamBuilder_ == null) { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } else { - return mvnParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public Builder setMvnParam(caffe.Caffe.MVNParameter value) { - if (mvnParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mvnParam_ = value; - onChanged(); - } else { - mvnParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public Builder setMvnParam( - caffe.Caffe.MVNParameter.Builder builderForValue) { - if (mvnParamBuilder_ == null) { - mvnParam_ = builderForValue.build(); - onChanged(); - } else { - mvnParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public Builder mergeMvnParam(caffe.Caffe.MVNParameter value) { - if (mvnParamBuilder_ == null) { - if (((bitField1_ & 0x00000004) == 0x00000004) && - mvnParam_ != null && - mvnParam_ != caffe.Caffe.MVNParameter.getDefaultInstance()) { - mvnParam_ = - caffe.Caffe.MVNParameter.newBuilder(mvnParam_).mergeFrom(value).buildPartial(); - } else { - mvnParam_ = value; - } - onChanged(); - } else { - mvnParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public Builder clearMvnParam() { - if (mvnParamBuilder_ == null) { - mvnParam_ = null; - onChanged(); - } else { - mvnParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000004); - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public caffe.Caffe.MVNParameter.Builder getMvnParamBuilder() { - bitField1_ |= 0x00000004; - onChanged(); - return getMvnParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { - if (mvnParamBuilder_ != null) { - return mvnParamBuilder_.getMessageOrBuilder(); - } else { - return mvnParam_ == null ? - caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - } - /** - * optional .caffe.MVNParameter mvn_param = 120; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> - getMvnParamFieldBuilder() { - if (mvnParamBuilder_ == null) { - mvnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder>( - getMvnParam(), - getParentForChildren(), - isClean()); - mvnParam_ = null; - } - return mvnParamBuilder_; - } - - private caffe.Caffe.PoolingParameter poolingParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> poolingParamBuilder_; - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public boolean hasPoolingParam() { - return ((bitField1_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public caffe.Caffe.PoolingParameter getPoolingParam() { - if (poolingParamBuilder_ == null) { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } else { - return poolingParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public Builder setPoolingParam(caffe.Caffe.PoolingParameter value) { - if (poolingParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - poolingParam_ = value; - onChanged(); - } else { - poolingParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public Builder setPoolingParam( - caffe.Caffe.PoolingParameter.Builder builderForValue) { - if (poolingParamBuilder_ == null) { - poolingParam_ = builderForValue.build(); - onChanged(); - } else { - poolingParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public Builder mergePoolingParam(caffe.Caffe.PoolingParameter value) { - if (poolingParamBuilder_ == null) { - if (((bitField1_ & 0x00000008) == 0x00000008) && - poolingParam_ != null && - poolingParam_ != caffe.Caffe.PoolingParameter.getDefaultInstance()) { - poolingParam_ = - caffe.Caffe.PoolingParameter.newBuilder(poolingParam_).mergeFrom(value).buildPartial(); - } else { - poolingParam_ = value; - } - onChanged(); - } else { - poolingParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public Builder clearPoolingParam() { - if (poolingParamBuilder_ == null) { - poolingParam_ = null; - onChanged(); - } else { - poolingParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000008); - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public caffe.Caffe.PoolingParameter.Builder getPoolingParamBuilder() { - bitField1_ |= 0x00000008; - onChanged(); - return getPoolingParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { - if (poolingParamBuilder_ != null) { - return poolingParamBuilder_.getMessageOrBuilder(); - } else { - return poolingParam_ == null ? - caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - } - /** - * optional .caffe.PoolingParameter pooling_param = 121; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> - getPoolingParamFieldBuilder() { - if (poolingParamBuilder_ == null) { - poolingParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder>( - getPoolingParam(), - getParentForChildren(), - isClean()); - poolingParam_ = null; - } - return poolingParamBuilder_; - } - - private caffe.Caffe.PowerParameter powerParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> powerParamBuilder_; - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public boolean hasPowerParam() { - return ((bitField1_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public caffe.Caffe.PowerParameter getPowerParam() { - if (powerParamBuilder_ == null) { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } else { - return powerParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public Builder setPowerParam(caffe.Caffe.PowerParameter value) { - if (powerParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - powerParam_ = value; - onChanged(); - } else { - powerParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public Builder setPowerParam( - caffe.Caffe.PowerParameter.Builder builderForValue) { - if (powerParamBuilder_ == null) { - powerParam_ = builderForValue.build(); - onChanged(); - } else { - powerParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public Builder mergePowerParam(caffe.Caffe.PowerParameter value) { - if (powerParamBuilder_ == null) { - if (((bitField1_ & 0x00000010) == 0x00000010) && - powerParam_ != null && - powerParam_ != caffe.Caffe.PowerParameter.getDefaultInstance()) { - powerParam_ = - caffe.Caffe.PowerParameter.newBuilder(powerParam_).mergeFrom(value).buildPartial(); - } else { - powerParam_ = value; - } - onChanged(); - } else { - powerParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public Builder clearPowerParam() { - if (powerParamBuilder_ == null) { - powerParam_ = null; - onChanged(); - } else { - powerParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000010); - return this; - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public caffe.Caffe.PowerParameter.Builder getPowerParamBuilder() { - bitField1_ |= 0x00000010; - onChanged(); - return getPowerParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { - if (powerParamBuilder_ != null) { - return powerParamBuilder_.getMessageOrBuilder(); - } else { - return powerParam_ == null ? - caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - } - /** - * optional .caffe.PowerParameter power_param = 122; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> - getPowerParamFieldBuilder() { - if (powerParamBuilder_ == null) { - powerParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder>( - getPowerParam(), - getParentForChildren(), - isClean()); - powerParam_ = null; - } - return powerParamBuilder_; - } - - private caffe.Caffe.PReLUParameter preluParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder> preluParamBuilder_; - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public boolean hasPreluParam() { - return ((bitField1_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public caffe.Caffe.PReLUParameter getPreluParam() { - if (preluParamBuilder_ == null) { - return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; - } else { - return preluParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public Builder setPreluParam(caffe.Caffe.PReLUParameter value) { - if (preluParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - preluParam_ = value; - onChanged(); - } else { - preluParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public Builder setPreluParam( - caffe.Caffe.PReLUParameter.Builder builderForValue) { - if (preluParamBuilder_ == null) { - preluParam_ = builderForValue.build(); - onChanged(); - } else { - preluParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public Builder mergePreluParam(caffe.Caffe.PReLUParameter value) { - if (preluParamBuilder_ == null) { - if (((bitField1_ & 0x00000020) == 0x00000020) && - preluParam_ != null && - preluParam_ != caffe.Caffe.PReLUParameter.getDefaultInstance()) { - preluParam_ = - caffe.Caffe.PReLUParameter.newBuilder(preluParam_).mergeFrom(value).buildPartial(); - } else { - preluParam_ = value; - } - onChanged(); - } else { - preluParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public Builder clearPreluParam() { - if (preluParamBuilder_ == null) { - preluParam_ = null; - onChanged(); - } else { - preluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - return this; - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public caffe.Caffe.PReLUParameter.Builder getPreluParamBuilder() { - bitField1_ |= 0x00000020; - onChanged(); - return getPreluParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - public caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder() { - if (preluParamBuilder_ != null) { - return preluParamBuilder_.getMessageOrBuilder(); - } else { - return preluParam_ == null ? - caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; - } - } - /** - * optional .caffe.PReLUParameter prelu_param = 131; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder> - getPreluParamFieldBuilder() { - if (preluParamBuilder_ == null) { - preluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder>( - getPreluParam(), - getParentForChildren(), - isClean()); - preluParam_ = null; - } - return preluParamBuilder_; - } - - private caffe.Caffe.PythonParameter pythonParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder> pythonParamBuilder_; - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public boolean hasPythonParam() { - return ((bitField1_ & 0x00000040) == 0x00000040); - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public caffe.Caffe.PythonParameter getPythonParam() { - if (pythonParamBuilder_ == null) { - return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; - } else { - return pythonParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public Builder setPythonParam(caffe.Caffe.PythonParameter value) { - if (pythonParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pythonParam_ = value; - onChanged(); - } else { - pythonParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public Builder setPythonParam( - caffe.Caffe.PythonParameter.Builder builderForValue) { - if (pythonParamBuilder_ == null) { - pythonParam_ = builderForValue.build(); - onChanged(); - } else { - pythonParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public Builder mergePythonParam(caffe.Caffe.PythonParameter value) { - if (pythonParamBuilder_ == null) { - if (((bitField1_ & 0x00000040) == 0x00000040) && - pythonParam_ != null && - pythonParam_ != caffe.Caffe.PythonParameter.getDefaultInstance()) { - pythonParam_ = - caffe.Caffe.PythonParameter.newBuilder(pythonParam_).mergeFrom(value).buildPartial(); - } else { - pythonParam_ = value; - } - onChanged(); - } else { - pythonParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public Builder clearPythonParam() { - if (pythonParamBuilder_ == null) { - pythonParam_ = null; - onChanged(); - } else { - pythonParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000040); - return this; - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public caffe.Caffe.PythonParameter.Builder getPythonParamBuilder() { - bitField1_ |= 0x00000040; - onChanged(); - return getPythonParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - public caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder() { - if (pythonParamBuilder_ != null) { - return pythonParamBuilder_.getMessageOrBuilder(); - } else { - return pythonParam_ == null ? - caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; - } - } - /** - * optional .caffe.PythonParameter python_param = 130; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder> - getPythonParamFieldBuilder() { - if (pythonParamBuilder_ == null) { - pythonParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder>( - getPythonParam(), - getParentForChildren(), - isClean()); - pythonParam_ = null; - } - return pythonParamBuilder_; - } - - private caffe.Caffe.ReductionParameter reductionParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder> reductionParamBuilder_; - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public boolean hasReductionParam() { - return ((bitField1_ & 0x00000080) == 0x00000080); - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public caffe.Caffe.ReductionParameter getReductionParam() { - if (reductionParamBuilder_ == null) { - return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; - } else { - return reductionParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public Builder setReductionParam(caffe.Caffe.ReductionParameter value) { - if (reductionParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reductionParam_ = value; - onChanged(); - } else { - reductionParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public Builder setReductionParam( - caffe.Caffe.ReductionParameter.Builder builderForValue) { - if (reductionParamBuilder_ == null) { - reductionParam_ = builderForValue.build(); - onChanged(); - } else { - reductionParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public Builder mergeReductionParam(caffe.Caffe.ReductionParameter value) { - if (reductionParamBuilder_ == null) { - if (((bitField1_ & 0x00000080) == 0x00000080) && - reductionParam_ != null && - reductionParam_ != caffe.Caffe.ReductionParameter.getDefaultInstance()) { - reductionParam_ = - caffe.Caffe.ReductionParameter.newBuilder(reductionParam_).mergeFrom(value).buildPartial(); - } else { - reductionParam_ = value; - } - onChanged(); - } else { - reductionParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public Builder clearReductionParam() { - if (reductionParamBuilder_ == null) { - reductionParam_ = null; - onChanged(); - } else { - reductionParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000080); - return this; - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public caffe.Caffe.ReductionParameter.Builder getReductionParamBuilder() { - bitField1_ |= 0x00000080; - onChanged(); - return getReductionParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - public caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder() { - if (reductionParamBuilder_ != null) { - return reductionParamBuilder_.getMessageOrBuilder(); - } else { - return reductionParam_ == null ? - caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; - } - } - /** - * optional .caffe.ReductionParameter reduction_param = 136; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder> - getReductionParamFieldBuilder() { - if (reductionParamBuilder_ == null) { - reductionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder>( - getReductionParam(), - getParentForChildren(), - isClean()); - reductionParam_ = null; - } - return reductionParamBuilder_; - } - - private caffe.Caffe.ReLUParameter reluParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> reluParamBuilder_; - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public boolean hasReluParam() { - return ((bitField1_ & 0x00000100) == 0x00000100); - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public caffe.Caffe.ReLUParameter getReluParam() { - if (reluParamBuilder_ == null) { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } else { - return reluParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public Builder setReluParam(caffe.Caffe.ReLUParameter value) { - if (reluParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reluParam_ = value; - onChanged(); - } else { - reluParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public Builder setReluParam( - caffe.Caffe.ReLUParameter.Builder builderForValue) { - if (reluParamBuilder_ == null) { - reluParam_ = builderForValue.build(); - onChanged(); - } else { - reluParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public Builder mergeReluParam(caffe.Caffe.ReLUParameter value) { - if (reluParamBuilder_ == null) { - if (((bitField1_ & 0x00000100) == 0x00000100) && - reluParam_ != null && - reluParam_ != caffe.Caffe.ReLUParameter.getDefaultInstance()) { - reluParam_ = - caffe.Caffe.ReLUParameter.newBuilder(reluParam_).mergeFrom(value).buildPartial(); - } else { - reluParam_ = value; - } - onChanged(); - } else { - reluParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public Builder clearReluParam() { - if (reluParamBuilder_ == null) { - reluParam_ = null; - onChanged(); - } else { - reluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000100); - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public caffe.Caffe.ReLUParameter.Builder getReluParamBuilder() { - bitField1_ |= 0x00000100; - onChanged(); - return getReluParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { - if (reluParamBuilder_ != null) { - return reluParamBuilder_.getMessageOrBuilder(); - } else { - return reluParam_ == null ? - caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - } - /** - * optional .caffe.ReLUParameter relu_param = 123; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> - getReluParamFieldBuilder() { - if (reluParamBuilder_ == null) { - reluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder>( - getReluParam(), - getParentForChildren(), - isClean()); - reluParam_ = null; - } - return reluParamBuilder_; - } - - private caffe.Caffe.ReshapeParameter reshapeParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder> reshapeParamBuilder_; - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public boolean hasReshapeParam() { - return ((bitField1_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public caffe.Caffe.ReshapeParameter getReshapeParam() { - if (reshapeParamBuilder_ == null) { - return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; - } else { - return reshapeParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public Builder setReshapeParam(caffe.Caffe.ReshapeParameter value) { - if (reshapeParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reshapeParam_ = value; - onChanged(); - } else { - reshapeParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public Builder setReshapeParam( - caffe.Caffe.ReshapeParameter.Builder builderForValue) { - if (reshapeParamBuilder_ == null) { - reshapeParam_ = builderForValue.build(); - onChanged(); - } else { - reshapeParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public Builder mergeReshapeParam(caffe.Caffe.ReshapeParameter value) { - if (reshapeParamBuilder_ == null) { - if (((bitField1_ & 0x00000200) == 0x00000200) && - reshapeParam_ != null && - reshapeParam_ != caffe.Caffe.ReshapeParameter.getDefaultInstance()) { - reshapeParam_ = - caffe.Caffe.ReshapeParameter.newBuilder(reshapeParam_).mergeFrom(value).buildPartial(); - } else { - reshapeParam_ = value; - } - onChanged(); - } else { - reshapeParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public Builder clearReshapeParam() { - if (reshapeParamBuilder_ == null) { - reshapeParam_ = null; - onChanged(); - } else { - reshapeParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000200); - return this; - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public caffe.Caffe.ReshapeParameter.Builder getReshapeParamBuilder() { - bitField1_ |= 0x00000200; - onChanged(); - return getReshapeParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - public caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder() { - if (reshapeParamBuilder_ != null) { - return reshapeParamBuilder_.getMessageOrBuilder(); - } else { - return reshapeParam_ == null ? - caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; - } - } - /** - * optional .caffe.ReshapeParameter reshape_param = 133; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder> - getReshapeParamFieldBuilder() { - if (reshapeParamBuilder_ == null) { - reshapeParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder>( - getReshapeParam(), - getParentForChildren(), - isClean()); - reshapeParam_ = null; - } - return reshapeParamBuilder_; - } - - private caffe.Caffe.SigmoidParameter sigmoidParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> sigmoidParamBuilder_; - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public boolean hasSigmoidParam() { - return ((bitField1_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public caffe.Caffe.SigmoidParameter getSigmoidParam() { - if (sigmoidParamBuilder_ == null) { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } else { - return sigmoidParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public Builder setSigmoidParam(caffe.Caffe.SigmoidParameter value) { - if (sigmoidParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sigmoidParam_ = value; - onChanged(); - } else { - sigmoidParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public Builder setSigmoidParam( - caffe.Caffe.SigmoidParameter.Builder builderForValue) { - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = builderForValue.build(); - onChanged(); - } else { - sigmoidParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public Builder mergeSigmoidParam(caffe.Caffe.SigmoidParameter value) { - if (sigmoidParamBuilder_ == null) { - if (((bitField1_ & 0x00000400) == 0x00000400) && - sigmoidParam_ != null && - sigmoidParam_ != caffe.Caffe.SigmoidParameter.getDefaultInstance()) { - sigmoidParam_ = - caffe.Caffe.SigmoidParameter.newBuilder(sigmoidParam_).mergeFrom(value).buildPartial(); - } else { - sigmoidParam_ = value; - } - onChanged(); - } else { - sigmoidParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public Builder clearSigmoidParam() { - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = null; - onChanged(); - } else { - sigmoidParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000400); - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public caffe.Caffe.SigmoidParameter.Builder getSigmoidParamBuilder() { - bitField1_ |= 0x00000400; - onChanged(); - return getSigmoidParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { - if (sigmoidParamBuilder_ != null) { - return sigmoidParamBuilder_.getMessageOrBuilder(); - } else { - return sigmoidParam_ == null ? - caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 124; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> - getSigmoidParamFieldBuilder() { - if (sigmoidParamBuilder_ == null) { - sigmoidParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder>( - getSigmoidParam(), - getParentForChildren(), - isClean()); - sigmoidParam_ = null; - } - return sigmoidParamBuilder_; - } - - private caffe.Caffe.SoftmaxParameter softmaxParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> softmaxParamBuilder_; - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public boolean hasSoftmaxParam() { - return ((bitField1_ & 0x00000800) == 0x00000800); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { - if (softmaxParamBuilder_ == null) { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } else { - return softmaxParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public Builder setSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { - if (softmaxParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - softmaxParam_ = value; - onChanged(); - } else { - softmaxParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000800; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public Builder setSoftmaxParam( - caffe.Caffe.SoftmaxParameter.Builder builderForValue) { - if (softmaxParamBuilder_ == null) { - softmaxParam_ = builderForValue.build(); - onChanged(); - } else { - softmaxParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000800; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public Builder mergeSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { - if (softmaxParamBuilder_ == null) { - if (((bitField1_ & 0x00000800) == 0x00000800) && - softmaxParam_ != null && - softmaxParam_ != caffe.Caffe.SoftmaxParameter.getDefaultInstance()) { - softmaxParam_ = - caffe.Caffe.SoftmaxParameter.newBuilder(softmaxParam_).mergeFrom(value).buildPartial(); - } else { - softmaxParam_ = value; - } - onChanged(); - } else { - softmaxParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000800; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public Builder clearSoftmaxParam() { - if (softmaxParamBuilder_ == null) { - softmaxParam_ = null; - onChanged(); - } else { - softmaxParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000800); - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public caffe.Caffe.SoftmaxParameter.Builder getSoftmaxParamBuilder() { - bitField1_ |= 0x00000800; - onChanged(); - return getSoftmaxParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { - if (softmaxParamBuilder_ != null) { - return softmaxParamBuilder_.getMessageOrBuilder(); - } else { - return softmaxParam_ == null ? - caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 125; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> - getSoftmaxParamFieldBuilder() { - if (softmaxParamBuilder_ == null) { - softmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder>( - getSoftmaxParam(), - getParentForChildren(), - isClean()); - softmaxParam_ = null; - } - return softmaxParamBuilder_; - } - - private caffe.Caffe.SPPParameter sppParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder> sppParamBuilder_; - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public boolean hasSppParam() { - return ((bitField1_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public caffe.Caffe.SPPParameter getSppParam() { - if (sppParamBuilder_ == null) { - return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; - } else { - return sppParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public Builder setSppParam(caffe.Caffe.SPPParameter value) { - if (sppParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sppParam_ = value; - onChanged(); - } else { - sppParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00001000; - return this; - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public Builder setSppParam( - caffe.Caffe.SPPParameter.Builder builderForValue) { - if (sppParamBuilder_ == null) { - sppParam_ = builderForValue.build(); - onChanged(); - } else { - sppParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00001000; - return this; - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public Builder mergeSppParam(caffe.Caffe.SPPParameter value) { - if (sppParamBuilder_ == null) { - if (((bitField1_ & 0x00001000) == 0x00001000) && - sppParam_ != null && - sppParam_ != caffe.Caffe.SPPParameter.getDefaultInstance()) { - sppParam_ = - caffe.Caffe.SPPParameter.newBuilder(sppParam_).mergeFrom(value).buildPartial(); - } else { - sppParam_ = value; - } - onChanged(); - } else { - sppParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00001000; - return this; - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public Builder clearSppParam() { - if (sppParamBuilder_ == null) { - sppParam_ = null; - onChanged(); - } else { - sppParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00001000); - return this; - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public caffe.Caffe.SPPParameter.Builder getSppParamBuilder() { - bitField1_ |= 0x00001000; - onChanged(); - return getSppParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - public caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder() { - if (sppParamBuilder_ != null) { - return sppParamBuilder_.getMessageOrBuilder(); - } else { - return sppParam_ == null ? - caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; - } - } - /** - * optional .caffe.SPPParameter spp_param = 132; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder> - getSppParamFieldBuilder() { - if (sppParamBuilder_ == null) { - sppParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder>( - getSppParam(), - getParentForChildren(), - isClean()); - sppParam_ = null; - } - return sppParamBuilder_; - } - - private caffe.Caffe.SliceParameter sliceParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> sliceParamBuilder_; - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public boolean hasSliceParam() { - return ((bitField1_ & 0x00002000) == 0x00002000); - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public caffe.Caffe.SliceParameter getSliceParam() { - if (sliceParamBuilder_ == null) { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } else { - return sliceParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public Builder setSliceParam(caffe.Caffe.SliceParameter value) { - if (sliceParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceParam_ = value; - onChanged(); - } else { - sliceParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00002000; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public Builder setSliceParam( - caffe.Caffe.SliceParameter.Builder builderForValue) { - if (sliceParamBuilder_ == null) { - sliceParam_ = builderForValue.build(); - onChanged(); - } else { - sliceParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00002000; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public Builder mergeSliceParam(caffe.Caffe.SliceParameter value) { - if (sliceParamBuilder_ == null) { - if (((bitField1_ & 0x00002000) == 0x00002000) && - sliceParam_ != null && - sliceParam_ != caffe.Caffe.SliceParameter.getDefaultInstance()) { - sliceParam_ = - caffe.Caffe.SliceParameter.newBuilder(sliceParam_).mergeFrom(value).buildPartial(); - } else { - sliceParam_ = value; - } - onChanged(); - } else { - sliceParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00002000; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public Builder clearSliceParam() { - if (sliceParamBuilder_ == null) { - sliceParam_ = null; - onChanged(); - } else { - sliceParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00002000); - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public caffe.Caffe.SliceParameter.Builder getSliceParamBuilder() { - bitField1_ |= 0x00002000; - onChanged(); - return getSliceParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { - if (sliceParamBuilder_ != null) { - return sliceParamBuilder_.getMessageOrBuilder(); - } else { - return sliceParam_ == null ? - caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - } - /** - * optional .caffe.SliceParameter slice_param = 126; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> - getSliceParamFieldBuilder() { - if (sliceParamBuilder_ == null) { - sliceParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder>( - getSliceParam(), - getParentForChildren(), - isClean()); - sliceParam_ = null; - } - return sliceParamBuilder_; - } - - private caffe.Caffe.TanHParameter tanhParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> tanhParamBuilder_; - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public boolean hasTanhParam() { - return ((bitField1_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public caffe.Caffe.TanHParameter getTanhParam() { - if (tanhParamBuilder_ == null) { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } else { - return tanhParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public Builder setTanhParam(caffe.Caffe.TanHParameter value) { - if (tanhParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tanhParam_ = value; - onChanged(); - } else { - tanhParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00004000; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public Builder setTanhParam( - caffe.Caffe.TanHParameter.Builder builderForValue) { - if (tanhParamBuilder_ == null) { - tanhParam_ = builderForValue.build(); - onChanged(); - } else { - tanhParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00004000; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public Builder mergeTanhParam(caffe.Caffe.TanHParameter value) { - if (tanhParamBuilder_ == null) { - if (((bitField1_ & 0x00004000) == 0x00004000) && - tanhParam_ != null && - tanhParam_ != caffe.Caffe.TanHParameter.getDefaultInstance()) { - tanhParam_ = - caffe.Caffe.TanHParameter.newBuilder(tanhParam_).mergeFrom(value).buildPartial(); - } else { - tanhParam_ = value; - } - onChanged(); - } else { - tanhParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00004000; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public Builder clearTanhParam() { - if (tanhParamBuilder_ == null) { - tanhParam_ = null; - onChanged(); - } else { - tanhParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00004000); - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public caffe.Caffe.TanHParameter.Builder getTanhParamBuilder() { - bitField1_ |= 0x00004000; - onChanged(); - return getTanhParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { - if (tanhParamBuilder_ != null) { - return tanhParamBuilder_.getMessageOrBuilder(); - } else { - return tanhParam_ == null ? - caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - } - /** - * optional .caffe.TanHParameter tanh_param = 127; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> - getTanhParamFieldBuilder() { - if (tanhParamBuilder_ == null) { - tanhParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder>( - getTanhParam(), - getParentForChildren(), - isClean()); - tanhParam_ = null; - } - return tanhParamBuilder_; - } - - private caffe.Caffe.ThresholdParameter thresholdParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> thresholdParamBuilder_; - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public boolean hasThresholdParam() { - return ((bitField1_ & 0x00008000) == 0x00008000); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public caffe.Caffe.ThresholdParameter getThresholdParam() { - if (thresholdParamBuilder_ == null) { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } else { - return thresholdParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public Builder setThresholdParam(caffe.Caffe.ThresholdParameter value) { - if (thresholdParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - thresholdParam_ = value; - onChanged(); - } else { - thresholdParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public Builder setThresholdParam( - caffe.Caffe.ThresholdParameter.Builder builderForValue) { - if (thresholdParamBuilder_ == null) { - thresholdParam_ = builderForValue.build(); - onChanged(); - } else { - thresholdParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public Builder mergeThresholdParam(caffe.Caffe.ThresholdParameter value) { - if (thresholdParamBuilder_ == null) { - if (((bitField1_ & 0x00008000) == 0x00008000) && - thresholdParam_ != null && - thresholdParam_ != caffe.Caffe.ThresholdParameter.getDefaultInstance()) { - thresholdParam_ = - caffe.Caffe.ThresholdParameter.newBuilder(thresholdParam_).mergeFrom(value).buildPartial(); - } else { - thresholdParam_ = value; - } - onChanged(); - } else { - thresholdParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public Builder clearThresholdParam() { - if (thresholdParamBuilder_ == null) { - thresholdParam_ = null; - onChanged(); - } else { - thresholdParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00008000); - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public caffe.Caffe.ThresholdParameter.Builder getThresholdParamBuilder() { - bitField1_ |= 0x00008000; - onChanged(); - return getThresholdParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { - if (thresholdParamBuilder_ != null) { - return thresholdParamBuilder_.getMessageOrBuilder(); - } else { - return thresholdParam_ == null ? - caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - } - /** - * optional .caffe.ThresholdParameter threshold_param = 128; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> - getThresholdParamFieldBuilder() { - if (thresholdParamBuilder_ == null) { - thresholdParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder>( - getThresholdParam(), - getParentForChildren(), - isClean()); - thresholdParam_ = null; - } - return thresholdParamBuilder_; - } - - private caffe.Caffe.TileParameter tileParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder> tileParamBuilder_; - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public boolean hasTileParam() { - return ((bitField1_ & 0x00010000) == 0x00010000); - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public caffe.Caffe.TileParameter getTileParam() { - if (tileParamBuilder_ == null) { - return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; - } else { - return tileParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public Builder setTileParam(caffe.Caffe.TileParameter value) { - if (tileParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tileParam_ = value; - onChanged(); - } else { - tileParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00010000; - return this; - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public Builder setTileParam( - caffe.Caffe.TileParameter.Builder builderForValue) { - if (tileParamBuilder_ == null) { - tileParam_ = builderForValue.build(); - onChanged(); - } else { - tileParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00010000; - return this; - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public Builder mergeTileParam(caffe.Caffe.TileParameter value) { - if (tileParamBuilder_ == null) { - if (((bitField1_ & 0x00010000) == 0x00010000) && - tileParam_ != null && - tileParam_ != caffe.Caffe.TileParameter.getDefaultInstance()) { - tileParam_ = - caffe.Caffe.TileParameter.newBuilder(tileParam_).mergeFrom(value).buildPartial(); - } else { - tileParam_ = value; - } - onChanged(); - } else { - tileParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00010000; - return this; - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public Builder clearTileParam() { - if (tileParamBuilder_ == null) { - tileParam_ = null; - onChanged(); - } else { - tileParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00010000); - return this; - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public caffe.Caffe.TileParameter.Builder getTileParamBuilder() { - bitField1_ |= 0x00010000; - onChanged(); - return getTileParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - public caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder() { - if (tileParamBuilder_ != null) { - return tileParamBuilder_.getMessageOrBuilder(); - } else { - return tileParam_ == null ? - caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; - } - } - /** - * optional .caffe.TileParameter tile_param = 138; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder> - getTileParamFieldBuilder() { - if (tileParamBuilder_ == null) { - tileParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder>( - getTileParam(), - getParentForChildren(), - isClean()); - tileParam_ = null; - } - return tileParamBuilder_; - } - - private caffe.Caffe.WindowDataParameter windowDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> windowDataParamBuilder_; - /** - * 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() { - if (windowDataParamBuilder_ == null) { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } else { - return windowDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public Builder setWindowDataParam(caffe.Caffe.WindowDataParameter value) { - if (windowDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowDataParam_ = value; - onChanged(); - } else { - windowDataParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00020000; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public Builder setWindowDataParam( - caffe.Caffe.WindowDataParameter.Builder builderForValue) { - if (windowDataParamBuilder_ == null) { - windowDataParam_ = builderForValue.build(); - onChanged(); - } else { - windowDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00020000; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public Builder mergeWindowDataParam(caffe.Caffe.WindowDataParameter value) { - if (windowDataParamBuilder_ == null) { - if (((bitField1_ & 0x00020000) == 0x00020000) && - windowDataParam_ != null && - windowDataParam_ != caffe.Caffe.WindowDataParameter.getDefaultInstance()) { - windowDataParam_ = - caffe.Caffe.WindowDataParameter.newBuilder(windowDataParam_).mergeFrom(value).buildPartial(); - } else { - windowDataParam_ = value; - } - onChanged(); - } else { - windowDataParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00020000; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public Builder clearWindowDataParam() { - if (windowDataParamBuilder_ == null) { - windowDataParam_ = null; - onChanged(); - } else { - windowDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00020000); - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public caffe.Caffe.WindowDataParameter.Builder getWindowDataParamBuilder() { - bitField1_ |= 0x00020000; - onChanged(); - return getWindowDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { - if (windowDataParamBuilder_ != null) { - return windowDataParamBuilder_.getMessageOrBuilder(); - } else { - return windowDataParam_ == null ? - caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - } - /** - * optional .caffe.WindowDataParameter window_data_param = 129; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> - getWindowDataParamFieldBuilder() { - if (windowDataParamBuilder_ == null) { - windowDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder>( - getWindowDataParam(), - getParentForChildren(), - isClean()); - windowDataParam_ = null; - } - return windowDataParamBuilder_; - } - - // @@protoc_insertion_point(builder_scope:caffe.LayerParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.LayerParameter) - private static final caffe.Caffe.LayerParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.LayerParameter(); - } - - public static caffe.Caffe.LayerParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final 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 { - try { - return new LayerParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.LayerParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TransformationParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.TransformationParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float scale = 1 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - boolean hasScale(); - /** - * optional float scale = 1 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - float getScale(); - - /** - * optional bool mirror = 2 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - boolean hasMirror(); - /** - * optional bool mirror = 2 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - boolean getMirror(); - - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - boolean hasCropSize(); - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - int getCropSize(); - - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - boolean hasMeanFile(); - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - java.lang.String getMeanFile(); - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - com.google.protobuf.ByteString - getMeanFileBytes(); - - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - java.util.List getMeanValueList(); - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - int getMeanValueCount(); - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - float getMeanValue(int index); - - /** - * optional bool force_color = 6 [default = false]; - * - *
-     * Force the decoded image to have 3 color channels.
-     * 
- */ - boolean hasForceColor(); - /** - * optional bool force_color = 6 [default = false]; - * - *
-     * Force the decoded image to have 3 color channels.
-     * 
- */ - boolean getForceColor(); - - /** - * optional bool force_gray = 7 [default = false]; - * - *
-     * Force the decoded image to have 1 color channels.
-     * 
- */ - boolean hasForceGray(); - /** - * optional bool force_gray = 7 [default = false]; - * - *
-     * Force the decoded image to have 1 color channels.
-     * 
- */ - boolean getForceGray(); - } - /** - * Protobuf type {@code caffe.TransformationParameter} - * - *
-   * Message that stores parameters used to apply transformation
-   * to the data layer's data
-   * 
- */ - public static final class TransformationParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.TransformationParameter) - TransformationParameterOrBuilder { - // Use TransformationParameter.newBuilder() to construct. - private TransformationParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TransformationParameter() { - scale_ = 1F; - mirror_ = false; - cropSize_ = 0; - meanFile_ = ""; - meanValue_ = java.util.Collections.emptyList(); - forceColor_ = false; - forceGray_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransformationParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - scale_ = input.readFloat(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - mirror_ = input.readBool(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - cropSize_ = input.readUInt32(); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000008; - meanFile_ = bs; - break; - } - case 45: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - meanValue_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - meanValue_.add(input.readFloat()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - meanValue_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - meanValue_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 48: { - bitField0_ |= 0x00000010; - forceColor_ = input.readBool(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - forceGray_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - meanValue_ = java.util.Collections.unmodifiableList(meanValue_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TransformationParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TransformationParameter.class, caffe.Caffe.TransformationParameter.Builder.class); - } - - private int bitField0_; - public static final int SCALE_FIELD_NUMBER = 1; - private float scale_; - /** - * optional float scale = 1 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float scale = 1 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public float getScale() { - return scale_; - } - - public static final int MIRROR_FIELD_NUMBER = 2; - private boolean mirror_; - /** - * optional bool mirror = 2 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool mirror = 2 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - public boolean getMirror() { - return mirror_; - } - - public static final int CROP_SIZE_FIELD_NUMBER = 3; - private int cropSize_; - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - public int getCropSize() { - return cropSize_; - } - - public static final int MEAN_FILE_FIELD_NUMBER = 4; - private volatile java.lang.Object meanFile_; - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - 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()) { - meanFile_ = s; - } - return s; - } - } - /** - * optional string mean_file = 4; - * - *
-     * mean_file and mean_value cannot be specified at the same time
-     * 
- */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEAN_VALUE_FIELD_NUMBER = 5; - private java.util.List meanValue_; - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - public java.util.List - getMeanValueList() { - return meanValue_; - } - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - public int getMeanValueCount() { - return meanValue_.size(); - } - /** - * repeated float mean_value = 5; - * - *
-     * if specified can be repeated once (would substract it from all the channels)
-     * or can be repeated the same number of times as channels
-     * (would subtract them from the corresponding channel)
-     * 
- */ - public float getMeanValue(int index) { - return meanValue_.get(index); - } - - public static final int FORCE_COLOR_FIELD_NUMBER = 6; - private boolean forceColor_; - /** - * optional bool force_color = 6 [default = false]; - * - *
-     * Force the decoded image to have 3 color channels.
-     * 
- */ - public boolean hasForceColor() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool force_color = 6 [default = false]; - * - *
-     * Force the decoded image to have 3 color channels.
-     * 
- */ - public boolean getForceColor() { - return forceColor_; - } - - public static final int FORCE_GRAY_FIELD_NUMBER = 7; - private boolean forceGray_; - /** - * optional bool force_gray = 7 [default = false]; - * - *
-     * Force the decoded image to have 1 color channels.
-     * 
- */ - public boolean hasForceGray() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool force_gray = 7 [default = false]; - * - *
-     * Force the decoded image to have 1 color channels.
-     * 
- */ - public boolean getForceGray() { - return forceGray_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, scale_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, cropSize_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, meanFile_); - } - for (int i = 0; i < meanValue_.size(); i++) { - output.writeFloat(5, meanValue_.get(i)); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(6, forceColor_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(7, forceGray_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, scale_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, cropSize_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, meanFile_); - } - { - int dataSize = 0; - dataSize = 4 * getMeanValueList().size(); - size += dataSize; - size += 1 * getMeanValueList().size(); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, forceColor_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, forceGray_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.TransformationParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TransformationParameter 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.TransformationParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TransformationParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.TransformationParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TransformationParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.TransformationParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.TransformationParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.TransformationParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TransformationParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.TransformationParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.TransformationParameter} - * - *
-     * Message that stores parameters used to apply transformation
-     * to the data layer's data
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.TransformationParameter) - caffe.Caffe.TransformationParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TransformationParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TransformationParameter.class, caffe.Caffe.TransformationParameter.Builder.class); - } - - // Construct using caffe.Caffe.TransformationParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000001); - mirror_ = false; - bitField0_ = (bitField0_ & ~0x00000002); - cropSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - meanFile_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - meanValue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - forceColor_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - forceGray_ = false; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; - } - - public caffe.Caffe.TransformationParameter getDefaultInstanceForType() { - return caffe.Caffe.TransformationParameter.getDefaultInstance(); - } - - public caffe.Caffe.TransformationParameter build() { - caffe.Caffe.TransformationParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.TransformationParameter buildPartial() { - caffe.Caffe.TransformationParameter result = new caffe.Caffe.TransformationParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.mirror_ = mirror_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.cropSize_ = cropSize_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.meanFile_ = meanFile_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - meanValue_ = java.util.Collections.unmodifiableList(meanValue_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.meanValue_ = meanValue_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.forceColor_ = forceColor_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.forceGray_ = forceGray_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.TransformationParameter) { - return mergeFrom((caffe.Caffe.TransformationParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.TransformationParameter other) { - if (other == caffe.Caffe.TransformationParameter.getDefaultInstance()) return this; - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasMirror()) { - setMirror(other.getMirror()); - } - if (other.hasCropSize()) { - setCropSize(other.getCropSize()); - } - if (other.hasMeanFile()) { - bitField0_ |= 0x00000008; - meanFile_ = other.meanFile_; - onChanged(); - } - if (!other.meanValue_.isEmpty()) { - if (meanValue_.isEmpty()) { - meanValue_ = other.meanValue_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureMeanValueIsMutable(); - meanValue_.addAll(other.meanValue_); - } - onChanged(); - } - if (other.hasForceColor()) { - setForceColor(other.getForceColor()); - } - if (other.hasForceGray()) { - setForceGray(other.getForceGray()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.TransformationParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.TransformationParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float scale_ = 1F; - /** - * optional float scale = 1 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float scale = 1 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 1 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder setScale(float value) { - bitField0_ |= 0x00000001; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 1 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000001); - scale_ = 1F; - onChanged(); - return this; - } - - private boolean mirror_ ; - /** - * optional bool mirror = 2 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool mirror = 2 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public boolean getMirror() { - return mirror_; - } - /** - * optional bool mirror = 2 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public Builder setMirror(boolean value) { - bitField0_ |= 0x00000002; - mirror_ = value; - onChanged(); - return this; - } - /** - * optional bool mirror = 2 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public Builder clearMirror() { - bitField0_ = (bitField0_ & ~0x00000002); - mirror_ = false; - onChanged(); - return this; - } - - private int cropSize_ ; - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public int getCropSize() { - return cropSize_; - } - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public Builder setCropSize(int value) { - bitField0_ |= 0x00000004; - cropSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 crop_size = 3 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public Builder clearCropSize() { - bitField0_ = (bitField0_ & ~0x00000004); - cropSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object meanFile_ = ""; - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - meanFile_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public Builder setMeanFile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - meanFile_ = value; - onChanged(); - return this; - } - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public Builder clearMeanFile() { - bitField0_ = (bitField0_ & ~0x00000008); - meanFile_ = getDefaultInstance().getMeanFile(); - onChanged(); - return this; - } - /** - * optional string mean_file = 4; - * - *
-       * mean_file and mean_value cannot be specified at the same time
-       * 
- */ - public Builder setMeanFileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - meanFile_ = value; - onChanged(); - return this; - } - - private java.util.List meanValue_ = java.util.Collections.emptyList(); - private void ensureMeanValueIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - meanValue_ = new java.util.ArrayList(meanValue_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public java.util.List - getMeanValueList() { - return java.util.Collections.unmodifiableList(meanValue_); - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public int getMeanValueCount() { - return meanValue_.size(); - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public float getMeanValue(int index) { - return meanValue_.get(index); - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public Builder setMeanValue( - int index, float value) { - ensureMeanValueIsMutable(); - meanValue_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public Builder addMeanValue(float value) { - ensureMeanValueIsMutable(); - meanValue_.add(value); - onChanged(); - return this; - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public Builder addAllMeanValue( - java.lang.Iterable values) { - ensureMeanValueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, meanValue_); - onChanged(); - return this; - } - /** - * repeated float mean_value = 5; - * - *
-       * if specified can be repeated once (would substract it from all the channels)
-       * or can be repeated the same number of times as channels
-       * (would subtract them from the corresponding channel)
-       * 
- */ - public Builder clearMeanValue() { - meanValue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private boolean forceColor_ ; - /** - * optional bool force_color = 6 [default = false]; - * - *
-       * Force the decoded image to have 3 color channels.
-       * 
- */ - public boolean hasForceColor() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool force_color = 6 [default = false]; - * - *
-       * Force the decoded image to have 3 color channels.
-       * 
- */ - public boolean getForceColor() { - return forceColor_; - } - /** - * optional bool force_color = 6 [default = false]; - * - *
-       * Force the decoded image to have 3 color channels.
-       * 
- */ - public Builder setForceColor(boolean value) { - bitField0_ |= 0x00000020; - forceColor_ = value; - onChanged(); - return this; - } - /** - * optional bool force_color = 6 [default = false]; - * - *
-       * Force the decoded image to have 3 color channels.
-       * 
- */ - public Builder clearForceColor() { - bitField0_ = (bitField0_ & ~0x00000020); - forceColor_ = false; - onChanged(); - return this; - } - - private boolean forceGray_ ; - /** - * optional bool force_gray = 7 [default = false]; - * - *
-       * Force the decoded image to have 1 color channels.
-       * 
- */ - public boolean hasForceGray() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool force_gray = 7 [default = false]; - * - *
-       * Force the decoded image to have 1 color channels.
-       * 
- */ - public boolean getForceGray() { - return forceGray_; - } - /** - * optional bool force_gray = 7 [default = false]; - * - *
-       * Force the decoded image to have 1 color channels.
-       * 
- */ - public Builder setForceGray(boolean value) { - bitField0_ |= 0x00000040; - forceGray_ = value; - onChanged(); - return this; - } - /** - * optional bool force_gray = 7 [default = false]; - * - *
-       * Force the decoded image to have 1 color channels.
-       * 
- */ - public Builder clearForceGray() { - bitField0_ = (bitField0_ & ~0x00000040); - forceGray_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.TransformationParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.TransformationParameter) - private static final caffe.Caffe.TransformationParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.TransformationParameter(); - } - - public static caffe.Caffe.TransformationParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TransformationParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TransformationParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.TransformationParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LossParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.LossParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 ignore_label = 1; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - boolean hasIgnoreLabel(); - /** - * optional int32 ignore_label = 1; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - int getIgnoreLabel(); - - /** - * optional bool normalize = 2 [default = true]; - * - *
-     * If true, normalize each batch across all instances (including spatial
-     * dimesions, but not ignored instances); else, divide by batch size only.
-     * 
- */ - boolean hasNormalize(); - /** - * optional bool normalize = 2 [default = true]; - * - *
-     * If true, normalize each batch across all instances (including spatial
-     * dimesions, but not ignored instances); else, divide by batch size only.
-     * 
- */ - boolean getNormalize(); - } - /** - * Protobuf type {@code caffe.LossParameter} - * - *
-   * Message that stores parameters shared by loss layers
-   * 
- */ - public static final class LossParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.LossParameter) - LossParameterOrBuilder { - // Use LossParameter.newBuilder() to construct. - private LossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LossParameter() { - ignoreLabel_ = 0; - normalize_ = true; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LossParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - ignoreLabel_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - normalize_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_LossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LossParameter.class, caffe.Caffe.LossParameter.Builder.class); - } - - private int bitField0_; - public static final int IGNORE_LABEL_FIELD_NUMBER = 1; - private int ignoreLabel_; - /** - * optional int32 ignore_label = 1; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - public boolean hasIgnoreLabel() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 ignore_label = 1; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - public int getIgnoreLabel() { - return ignoreLabel_; - } - - public static final int NORMALIZE_FIELD_NUMBER = 2; - private boolean normalize_; - /** - * optional bool normalize = 2 [default = true]; - * - *
-     * If true, normalize each batch across all instances (including spatial
-     * dimesions, but not ignored instances); else, divide by batch size only.
-     * 
- */ - public boolean hasNormalize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool normalize = 2 [default = true]; - * - *
-     * If true, normalize each batch across all instances (including spatial
-     * dimesions, but not ignored instances); else, divide by batch size only.
-     * 
- */ - public boolean getNormalize() { - return normalize_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, ignoreLabel_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, normalize_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, ignoreLabel_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, normalize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.LossParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LossParameter 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.LossParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LossParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.LossParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LossParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.LossParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.LossParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.LossParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LossParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.LossParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.LossParameter} - * - *
-     * Message that stores parameters shared by loss layers
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.LossParameter) - caffe.Caffe.LossParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_LossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LossParameter.class, caffe.Caffe.LossParameter.Builder.class); - } - - // Construct using caffe.Caffe.LossParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - ignoreLabel_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - normalize_ = true; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_LossParameter_descriptor; - } - - public caffe.Caffe.LossParameter getDefaultInstanceForType() { - return caffe.Caffe.LossParameter.getDefaultInstance(); - } - - public caffe.Caffe.LossParameter build() { - caffe.Caffe.LossParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.LossParameter buildPartial() { - caffe.Caffe.LossParameter result = new caffe.Caffe.LossParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.ignoreLabel_ = ignoreLabel_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.normalize_ = normalize_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.LossParameter) { - return mergeFrom((caffe.Caffe.LossParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.LossParameter other) { - if (other == caffe.Caffe.LossParameter.getDefaultInstance()) return this; - if (other.hasIgnoreLabel()) { - setIgnoreLabel(other.getIgnoreLabel()); - } - if (other.hasNormalize()) { - setNormalize(other.getNormalize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.LossParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.LossParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int ignoreLabel_ ; - /** - * optional int32 ignore_label = 1; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public boolean hasIgnoreLabel() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 ignore_label = 1; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public int getIgnoreLabel() { - return ignoreLabel_; - } - /** - * optional int32 ignore_label = 1; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public Builder setIgnoreLabel(int value) { - bitField0_ |= 0x00000001; - ignoreLabel_ = value; - onChanged(); - return this; - } - /** - * optional int32 ignore_label = 1; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public Builder clearIgnoreLabel() { - bitField0_ = (bitField0_ & ~0x00000001); - ignoreLabel_ = 0; - onChanged(); - return this; - } - - private boolean normalize_ = true; - /** - * optional bool normalize = 2 [default = true]; - * - *
-       * If true, normalize each batch across all instances (including spatial
-       * dimesions, but not ignored instances); else, divide by batch size only.
-       * 
- */ - public boolean hasNormalize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool normalize = 2 [default = true]; - * - *
-       * If true, normalize each batch across all instances (including spatial
-       * dimesions, but not ignored instances); else, divide by batch size only.
-       * 
- */ - public boolean getNormalize() { - return normalize_; - } - /** - * optional bool normalize = 2 [default = true]; - * - *
-       * If true, normalize each batch across all instances (including spatial
-       * dimesions, but not ignored instances); else, divide by batch size only.
-       * 
- */ - public Builder setNormalize(boolean value) { - bitField0_ |= 0x00000002; - normalize_ = value; - onChanged(); - return this; - } - /** - * optional bool normalize = 2 [default = true]; - * - *
-       * If true, normalize each batch across all instances (including spatial
-       * dimesions, but not ignored instances); else, divide by batch size only.
-       * 
- */ - public Builder clearNormalize() { - bitField0_ = (bitField0_ & ~0x00000002); - normalize_ = true; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.LossParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.LossParameter) - private static final caffe.Caffe.LossParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.LossParameter(); - } - - public static caffe.Caffe.LossParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LossParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LossParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.LossParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccuracyParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.AccuracyParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-     * When computing accuracy, count as correct by comparing the true label to
-     * the top k scoring classes.  By default, only compare to the top scoring
-     * class (i.e. argmax).
-     * 
- */ - boolean hasTopK(); - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-     * When computing accuracy, count as correct by comparing the true label to
-     * the top k scoring classes.  By default, only compare to the top scoring
-     * class (i.e. argmax).
-     * 
- */ - int getTopK(); - - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The "label" axis of the prediction blob, whose argmax corresponds to the
-     * predicted label -- may be negative to index from the end (e.g., -1 for the
-     * last axis).  For example, if axis == 1 and the predictions are
-     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-     * labels with integer values in {0, 1, ..., C-1}.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The "label" axis of the prediction blob, whose argmax corresponds to the
-     * predicted label -- may be negative to index from the end (e.g., -1 for the
-     * last axis).  For example, if axis == 1 and the predictions are
-     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-     * labels with integer values in {0, 1, ..., C-1}.
-     * 
- */ - int getAxis(); - - /** - * optional int32 ignore_label = 3; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - boolean hasIgnoreLabel(); - /** - * optional int32 ignore_label = 3; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - int getIgnoreLabel(); - } - /** - * Protobuf type {@code caffe.AccuracyParameter} - */ - public static final class AccuracyParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.AccuracyParameter) - AccuracyParameterOrBuilder { - // Use AccuracyParameter.newBuilder() to construct. - private AccuracyParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AccuracyParameter() { - topK_ = 1; - axis_ = 1; - ignoreLabel_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AccuracyParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - topK_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - axis_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - ignoreLabel_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_AccuracyParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_AccuracyParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.AccuracyParameter.class, caffe.Caffe.AccuracyParameter.Builder.class); - } - - private int bitField0_; - public static final int TOP_K_FIELD_NUMBER = 1; - private int topK_; - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-     * When computing accuracy, count as correct by comparing the true label to
-     * the top k scoring classes.  By default, only compare to the top scoring
-     * class (i.e. argmax).
-     * 
- */ - public boolean hasTopK() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-     * When computing accuracy, count as correct by comparing the true label to
-     * the top k scoring classes.  By default, only compare to the top scoring
-     * class (i.e. argmax).
-     * 
- */ - public int getTopK() { - return topK_; - } - - public static final int AXIS_FIELD_NUMBER = 2; - private int axis_; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The "label" axis of the prediction blob, whose argmax corresponds to the
-     * predicted label -- may be negative to index from the end (e.g., -1 for the
-     * last axis).  For example, if axis == 1 and the predictions are
-     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-     * labels with integer values in {0, 1, ..., C-1}.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The "label" axis of the prediction blob, whose argmax corresponds to the
-     * predicted label -- may be negative to index from the end (e.g., -1 for the
-     * last axis).  For example, if axis == 1 and the predictions are
-     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-     * labels with integer values in {0, 1, ..., C-1}.
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int IGNORE_LABEL_FIELD_NUMBER = 3; - private int ignoreLabel_; - /** - * optional int32 ignore_label = 3; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - public boolean hasIgnoreLabel() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 ignore_label = 3; - * - *
-     * If specified, ignore instances with the given label.
-     * 
- */ - public int getIgnoreLabel() { - return ignoreLabel_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, topK_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, ignoreLabel_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, topK_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, ignoreLabel_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.AccuracyParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.AccuracyParameter 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.AccuracyParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.AccuracyParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.AccuracyParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.AccuracyParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.AccuracyParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.AccuracyParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.AccuracyParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.AccuracyParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.AccuracyParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.AccuracyParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.AccuracyParameter) - caffe.Caffe.AccuracyParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_AccuracyParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_AccuracyParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.AccuracyParameter.class, caffe.Caffe.AccuracyParameter.Builder.class); - } - - // Construct using caffe.Caffe.AccuracyParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - topK_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - ignoreLabel_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_AccuracyParameter_descriptor; - } - - public caffe.Caffe.AccuracyParameter getDefaultInstanceForType() { - return caffe.Caffe.AccuracyParameter.getDefaultInstance(); - } - - public caffe.Caffe.AccuracyParameter build() { - caffe.Caffe.AccuracyParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.AccuracyParameter buildPartial() { - caffe.Caffe.AccuracyParameter result = new caffe.Caffe.AccuracyParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.topK_ = topK_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.ignoreLabel_ = ignoreLabel_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.AccuracyParameter) { - return mergeFrom((caffe.Caffe.AccuracyParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.AccuracyParameter other) { - if (other == caffe.Caffe.AccuracyParameter.getDefaultInstance()) return this; - if (other.hasTopK()) { - setTopK(other.getTopK()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasIgnoreLabel()) { - setIgnoreLabel(other.getIgnoreLabel()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.AccuracyParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.AccuracyParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int topK_ = 1; - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-       * When computing accuracy, count as correct by comparing the true label to
-       * the top k scoring classes.  By default, only compare to the top scoring
-       * class (i.e. argmax).
-       * 
- */ - public boolean hasTopK() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-       * When computing accuracy, count as correct by comparing the true label to
-       * the top k scoring classes.  By default, only compare to the top scoring
-       * class (i.e. argmax).
-       * 
- */ - public int getTopK() { - return topK_; - } - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-       * When computing accuracy, count as correct by comparing the true label to
-       * the top k scoring classes.  By default, only compare to the top scoring
-       * class (i.e. argmax).
-       * 
- */ - public Builder setTopK(int value) { - bitField0_ |= 0x00000001; - topK_ = value; - onChanged(); - return this; - } - /** - * optional uint32 top_k = 1 [default = 1]; - * - *
-       * When computing accuracy, count as correct by comparing the true label to
-       * the top k scoring classes.  By default, only compare to the top scoring
-       * class (i.e. argmax).
-       * 
- */ - public Builder clearTopK() { - bitField0_ = (bitField0_ & ~0x00000001); - topK_ = 1; - onChanged(); - return this; - } - - private int axis_ = 1; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The "label" axis of the prediction blob, whose argmax corresponds to the
-       * predicted label -- may be negative to index from the end (e.g., -1 for the
-       * last axis).  For example, if axis == 1 and the predictions are
-       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-       * labels with integer values in {0, 1, ..., C-1}.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The "label" axis of the prediction blob, whose argmax corresponds to the
-       * predicted label -- may be negative to index from the end (e.g., -1 for the
-       * last axis).  For example, if axis == 1 and the predictions are
-       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-       * labels with integer values in {0, 1, ..., C-1}.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The "label" axis of the prediction blob, whose argmax corresponds to the
-       * predicted label -- may be negative to index from the end (e.g., -1 for the
-       * last axis).  For example, if axis == 1 and the predictions are
-       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-       * labels with integer values in {0, 1, ..., C-1}.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000002; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The "label" axis of the prediction blob, whose argmax corresponds to the
-       * predicted label -- may be negative to index from the end (e.g., -1 for the
-       * last axis).  For example, if axis == 1 and the predictions are
-       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
-       * labels with integer values in {0, 1, ..., C-1}.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000002); - axis_ = 1; - onChanged(); - return this; - } - - private int ignoreLabel_ ; - /** - * optional int32 ignore_label = 3; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public boolean hasIgnoreLabel() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 ignore_label = 3; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public int getIgnoreLabel() { - return ignoreLabel_; - } - /** - * optional int32 ignore_label = 3; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public Builder setIgnoreLabel(int value) { - bitField0_ |= 0x00000004; - ignoreLabel_ = value; - onChanged(); - return this; - } - /** - * optional int32 ignore_label = 3; - * - *
-       * If specified, ignore instances with the given label.
-       * 
- */ - public Builder clearIgnoreLabel() { - bitField0_ = (bitField0_ & ~0x00000004); - ignoreLabel_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.AccuracyParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.AccuracyParameter) - private static final caffe.Caffe.AccuracyParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.AccuracyParameter(); - } - - public static caffe.Caffe.AccuracyParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AccuracyParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AccuracyParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.AccuracyParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ArgMaxParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ArgMaxParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-     * If true produce pairs (argmax, maxval)
-     * 
- */ - boolean hasOutMaxVal(); - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-     * If true produce pairs (argmax, maxval)
-     * 
- */ - boolean getOutMaxVal(); - - /** - * optional uint32 top_k = 2 [default = 1]; - */ - boolean hasTopK(); - /** - * optional uint32 top_k = 2 [default = 1]; - */ - int getTopK(); - - /** - * optional int32 axis = 3; - * - *
-     * The axis along which to maximise -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-     * for each index of the first / num dimension.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 3; - * - *
-     * The axis along which to maximise -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-     * for each index of the first / num dimension.
-     * 
- */ - int getAxis(); - } - /** - * Protobuf type {@code caffe.ArgMaxParameter} - */ - public static final class ArgMaxParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ArgMaxParameter) - ArgMaxParameterOrBuilder { - // Use ArgMaxParameter.newBuilder() to construct. - private ArgMaxParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ArgMaxParameter() { - outMaxVal_ = false; - topK_ = 1; - axis_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ArgMaxParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - outMaxVal_ = input.readBool(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - topK_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - axis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ArgMaxParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ArgMaxParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ArgMaxParameter.class, caffe.Caffe.ArgMaxParameter.Builder.class); - } - - private int bitField0_; - public static final int OUT_MAX_VAL_FIELD_NUMBER = 1; - private boolean outMaxVal_; - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-     * If true produce pairs (argmax, maxval)
-     * 
- */ - public boolean hasOutMaxVal() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-     * If true produce pairs (argmax, maxval)
-     * 
- */ - public boolean getOutMaxVal() { - return outMaxVal_; - } - - public static final int TOP_K_FIELD_NUMBER = 2; - private int topK_; - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public boolean hasTopK() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public int getTopK() { - return topK_; - } - - public static final int AXIS_FIELD_NUMBER = 3; - private int axis_; - /** - * optional int32 axis = 3; - * - *
-     * The axis along which to maximise -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-     * for each index of the first / num dimension.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 axis = 3; - * - *
-     * The axis along which to maximise -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-     * for each index of the first / num dimension.
-     * 
- */ - public int getAxis() { - return axis_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, outMaxVal_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, topK_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, axis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, outMaxVal_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, topK_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, axis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ArgMaxParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ArgMaxParameter 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.ArgMaxParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ArgMaxParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ArgMaxParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ArgMaxParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ArgMaxParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ArgMaxParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ArgMaxParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ArgMaxParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ArgMaxParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ArgMaxParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ArgMaxParameter) - caffe.Caffe.ArgMaxParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ArgMaxParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ArgMaxParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ArgMaxParameter.class, caffe.Caffe.ArgMaxParameter.Builder.class); - } - - // Construct using caffe.Caffe.ArgMaxParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - outMaxVal_ = false; - bitField0_ = (bitField0_ & ~0x00000001); - topK_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - axis_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ArgMaxParameter_descriptor; - } - - public caffe.Caffe.ArgMaxParameter getDefaultInstanceForType() { - return caffe.Caffe.ArgMaxParameter.getDefaultInstance(); - } - - public caffe.Caffe.ArgMaxParameter build() { - caffe.Caffe.ArgMaxParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ArgMaxParameter buildPartial() { - caffe.Caffe.ArgMaxParameter result = new caffe.Caffe.ArgMaxParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.outMaxVal_ = outMaxVal_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.topK_ = topK_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.axis_ = axis_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ArgMaxParameter) { - return mergeFrom((caffe.Caffe.ArgMaxParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ArgMaxParameter other) { - if (other == caffe.Caffe.ArgMaxParameter.getDefaultInstance()) return this; - if (other.hasOutMaxVal()) { - setOutMaxVal(other.getOutMaxVal()); - } - if (other.hasTopK()) { - setTopK(other.getTopK()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ArgMaxParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ArgMaxParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean outMaxVal_ ; - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-       * If true produce pairs (argmax, maxval)
-       * 
- */ - public boolean hasOutMaxVal() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-       * If true produce pairs (argmax, maxval)
-       * 
- */ - public boolean getOutMaxVal() { - return outMaxVal_; - } - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-       * If true produce pairs (argmax, maxval)
-       * 
- */ - public Builder setOutMaxVal(boolean value) { - bitField0_ |= 0x00000001; - outMaxVal_ = value; - onChanged(); - return this; - } - /** - * optional bool out_max_val = 1 [default = false]; - * - *
-       * If true produce pairs (argmax, maxval)
-       * 
- */ - public Builder clearOutMaxVal() { - bitField0_ = (bitField0_ & ~0x00000001); - outMaxVal_ = false; - onChanged(); - return this; - } - - private int topK_ = 1; - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public boolean hasTopK() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public int getTopK() { - return topK_; - } - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public Builder setTopK(int value) { - bitField0_ |= 0x00000002; - topK_ = value; - onChanged(); - return this; - } - /** - * optional uint32 top_k = 2 [default = 1]; - */ - public Builder clearTopK() { - bitField0_ = (bitField0_ & ~0x00000002); - topK_ = 1; - onChanged(); - return this; - } - - private int axis_ ; - /** - * optional int32 axis = 3; - * - *
-       * The axis along which to maximise -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-       * for each index of the first / num dimension.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 axis = 3; - * - *
-       * The axis along which to maximise -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-       * for each index of the first / num dimension.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 3; - * - *
-       * The axis along which to maximise -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-       * for each index of the first / num dimension.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000004; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 3; - * - *
-       * The axis along which to maximise -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
-       * for each index of the first / num dimension.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000004); - axis_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ArgMaxParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ArgMaxParameter) - private static final caffe.Caffe.ArgMaxParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ArgMaxParameter(); - } - - public static caffe.Caffe.ArgMaxParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ArgMaxParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ArgMaxParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ArgMaxParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConcatParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ConcatParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to concatenate -- may be negative to index from the
-     * end (e.g., -1 for the last axis).  Other axes must have the
-     * same dimension for all the bottom blobs.
-     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to concatenate -- may be negative to index from the
-     * end (e.g., -1 for the last axis).  Other axes must have the
-     * same dimension for all the bottom blobs.
-     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - int getAxis(); - - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - boolean hasConcatDim(); - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - int getConcatDim(); - } - /** - * Protobuf type {@code caffe.ConcatParameter} - */ - public static final class ConcatParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ConcatParameter) - ConcatParameterOrBuilder { - // Use ConcatParameter.newBuilder() to construct. - private ConcatParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ConcatParameter() { - axis_ = 1; - concatDim_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConcatParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - concatDim_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000001; - axis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ConcatParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ConcatParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ConcatParameter.class, caffe.Caffe.ConcatParameter.Builder.class); - } - - private int bitField0_; - public static final int AXIS_FIELD_NUMBER = 2; - private int axis_; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to concatenate -- may be negative to index from the
-     * end (e.g., -1 for the last axis).  Other axes must have the
-     * same dimension for all the bottom blobs.
-     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to concatenate -- may be negative to index from the
-     * end (e.g., -1 for the last axis).  Other axes must have the
-     * same dimension for all the bottom blobs.
-     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int CONCAT_DIM_FIELD_NUMBER = 1; - private int concatDim_; - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - public boolean hasConcatDim() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - public int getConcatDim() { - return concatDim_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(1, concatDim_); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(2, axis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, concatDim_); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, axis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ConcatParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ConcatParameter 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.ConcatParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ConcatParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ConcatParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ConcatParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ConcatParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ConcatParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ConcatParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ConcatParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ConcatParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ConcatParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ConcatParameter) - caffe.Caffe.ConcatParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ConcatParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ConcatParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ConcatParameter.class, caffe.Caffe.ConcatParameter.Builder.class); - } - - // Construct using caffe.Caffe.ConcatParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - concatDim_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ConcatParameter_descriptor; - } - - public caffe.Caffe.ConcatParameter getDefaultInstanceForType() { - return caffe.Caffe.ConcatParameter.getDefaultInstance(); - } - - public caffe.Caffe.ConcatParameter build() { - caffe.Caffe.ConcatParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ConcatParameter buildPartial() { - caffe.Caffe.ConcatParameter result = new caffe.Caffe.ConcatParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.concatDim_ = concatDim_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ConcatParameter) { - return mergeFrom((caffe.Caffe.ConcatParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ConcatParameter other) { - if (other == caffe.Caffe.ConcatParameter.getDefaultInstance()) return this; - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasConcatDim()) { - setConcatDim(other.getConcatDim()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ConcatParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ConcatParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int axis_ = 1; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to concatenate -- may be negative to index from the
-       * end (e.g., -1 for the last axis).  Other axes must have the
-       * same dimension for all the bottom blobs.
-       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to concatenate -- may be negative to index from the
-       * end (e.g., -1 for the last axis).  Other axes must have the
-       * same dimension for all the bottom blobs.
-       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to concatenate -- may be negative to index from the
-       * end (e.g., -1 for the last axis).  Other axes must have the
-       * same dimension for all the bottom blobs.
-       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000001; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to concatenate -- may be negative to index from the
-       * end (e.g., -1 for the last axis).  Other axes must have the
-       * same dimension for all the bottom blobs.
-       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - onChanged(); - return this; - } - - private int concatDim_ = 1; - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public boolean hasConcatDim() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public int getConcatDim() { - return concatDim_; - } - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public Builder setConcatDim(int value) { - bitField0_ |= 0x00000002; - concatDim_ = value; - onChanged(); - return this; - } - /** - * optional uint32 concat_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public Builder clearConcatDim() { - bitField0_ = (bitField0_ & ~0x00000002); - concatDim_ = 1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ConcatParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ConcatParameter) - private static final caffe.Caffe.ConcatParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ConcatParameter(); - } - - public static caffe.Caffe.ConcatParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ConcatParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ConcatParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ConcatParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ContrastiveLossParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ContrastiveLossParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float margin = 1 [default = 1]; - * - *
-     * margin for dissimilar pair
-     * 
- */ - boolean hasMargin(); - /** - * optional float margin = 1 [default = 1]; - * - *
-     * margin for dissimilar pair
-     * 
- */ - float getMargin(); - - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-     * The first implementation of this cost did not exactly match the cost of
-     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-     * Hadsell paper. New models should probably use this version.
-     * legacy_version = true uses (margin - d^2). This is kept to support /
-     * reproduce existing models and results
-     * 
- */ - boolean hasLegacyVersion(); - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-     * The first implementation of this cost did not exactly match the cost of
-     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-     * Hadsell paper. New models should probably use this version.
-     * legacy_version = true uses (margin - d^2). This is kept to support /
-     * reproduce existing models and results
-     * 
- */ - boolean getLegacyVersion(); - } - /** - * Protobuf type {@code caffe.ContrastiveLossParameter} - */ - public static final class ContrastiveLossParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ContrastiveLossParameter) - ContrastiveLossParameterOrBuilder { - // Use ContrastiveLossParameter.newBuilder() to construct. - private ContrastiveLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ContrastiveLossParameter() { - margin_ = 1F; - legacyVersion_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ContrastiveLossParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - margin_ = input.readFloat(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - legacyVersion_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ContrastiveLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ContrastiveLossParameter.class, caffe.Caffe.ContrastiveLossParameter.Builder.class); - } - - private int bitField0_; - public static final int MARGIN_FIELD_NUMBER = 1; - private float margin_; - /** - * optional float margin = 1 [default = 1]; - * - *
-     * margin for dissimilar pair
-     * 
- */ - public boolean hasMargin() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float margin = 1 [default = 1]; - * - *
-     * margin for dissimilar pair
-     * 
- */ - public float getMargin() { - return margin_; - } - - public static final int LEGACY_VERSION_FIELD_NUMBER = 2; - private boolean legacyVersion_; - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-     * The first implementation of this cost did not exactly match the cost of
-     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-     * Hadsell paper. New models should probably use this version.
-     * legacy_version = true uses (margin - d^2). This is kept to support /
-     * reproduce existing models and results
-     * 
- */ - public boolean hasLegacyVersion() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-     * The first implementation of this cost did not exactly match the cost of
-     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-     * Hadsell paper. New models should probably use this version.
-     * legacy_version = true uses (margin - d^2). This is kept to support /
-     * reproduce existing models and results
-     * 
- */ - public boolean getLegacyVersion() { - return legacyVersion_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, margin_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, legacyVersion_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, margin_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, legacyVersion_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ContrastiveLossParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ContrastiveLossParameter 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.ContrastiveLossParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ContrastiveLossParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ContrastiveLossParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ContrastiveLossParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ContrastiveLossParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ContrastiveLossParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ContrastiveLossParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ContrastiveLossParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ContrastiveLossParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ContrastiveLossParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ContrastiveLossParameter) - caffe.Caffe.ContrastiveLossParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ContrastiveLossParameter.class, caffe.Caffe.ContrastiveLossParameter.Builder.class); - } - - // Construct using caffe.Caffe.ContrastiveLossParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - margin_ = 1F; - bitField0_ = (bitField0_ & ~0x00000001); - legacyVersion_ = false; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_descriptor; - } - - public caffe.Caffe.ContrastiveLossParameter getDefaultInstanceForType() { - return caffe.Caffe.ContrastiveLossParameter.getDefaultInstance(); - } - - public caffe.Caffe.ContrastiveLossParameter build() { - caffe.Caffe.ContrastiveLossParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ContrastiveLossParameter buildPartial() { - caffe.Caffe.ContrastiveLossParameter result = new caffe.Caffe.ContrastiveLossParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.margin_ = margin_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.legacyVersion_ = legacyVersion_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ContrastiveLossParameter) { - return mergeFrom((caffe.Caffe.ContrastiveLossParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ContrastiveLossParameter other) { - if (other == caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) return this; - if (other.hasMargin()) { - setMargin(other.getMargin()); - } - if (other.hasLegacyVersion()) { - setLegacyVersion(other.getLegacyVersion()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ContrastiveLossParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ContrastiveLossParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float margin_ = 1F; - /** - * optional float margin = 1 [default = 1]; - * - *
-       * margin for dissimilar pair
-       * 
- */ - public boolean hasMargin() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float margin = 1 [default = 1]; - * - *
-       * margin for dissimilar pair
-       * 
- */ - public float getMargin() { - return margin_; - } - /** - * optional float margin = 1 [default = 1]; - * - *
-       * margin for dissimilar pair
-       * 
- */ - public Builder setMargin(float value) { - bitField0_ |= 0x00000001; - margin_ = value; - onChanged(); - return this; - } - /** - * optional float margin = 1 [default = 1]; - * - *
-       * margin for dissimilar pair
-       * 
- */ - public Builder clearMargin() { - bitField0_ = (bitField0_ & ~0x00000001); - margin_ = 1F; - onChanged(); - return this; - } - - private boolean legacyVersion_ ; - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-       * The first implementation of this cost did not exactly match the cost of
-       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-       * Hadsell paper. New models should probably use this version.
-       * legacy_version = true uses (margin - d^2). This is kept to support /
-       * reproduce existing models and results
-       * 
- */ - public boolean hasLegacyVersion() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-       * The first implementation of this cost did not exactly match the cost of
-       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-       * Hadsell paper. New models should probably use this version.
-       * legacy_version = true uses (margin - d^2). This is kept to support /
-       * reproduce existing models and results
-       * 
- */ - public boolean getLegacyVersion() { - return legacyVersion_; - } - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-       * The first implementation of this cost did not exactly match the cost of
-       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-       * Hadsell paper. New models should probably use this version.
-       * legacy_version = true uses (margin - d^2). This is kept to support /
-       * reproduce existing models and results
-       * 
- */ - public Builder setLegacyVersion(boolean value) { - bitField0_ |= 0x00000002; - legacyVersion_ = value; - onChanged(); - return this; - } - /** - * optional bool legacy_version = 2 [default = false]; - * - *
-       * The first implementation of this cost did not exactly match the cost of
-       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
-       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
-       * Hadsell paper. New models should probably use this version.
-       * legacy_version = true uses (margin - d^2). This is kept to support /
-       * reproduce existing models and results
-       * 
- */ - public Builder clearLegacyVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - legacyVersion_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ContrastiveLossParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ContrastiveLossParameter) - private static final caffe.Caffe.ContrastiveLossParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ContrastiveLossParameter(); - } - - public static caffe.Caffe.ContrastiveLossParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ContrastiveLossParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ContrastiveLossParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ContrastiveLossParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConvolutionParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ConvolutionParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - boolean hasNumOutput(); - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - int getNumOutput(); - - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean hasBiasTerm(); - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean getBiasTerm(); - - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - java.util.List getPadList(); - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - int getPadCount(); - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - int getPad(int index); - - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - java.util.List getKernelSizeList(); - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - int getKernelSizeCount(); - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - int getKernelSize(int index); - - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - java.util.List getStrideList(); - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - int getStrideCount(); - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - int getStride(int index); - - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * For 2D convolution only, the *_h and *_w versions may also be used to
-     * specify both spatial dimensions.
-     * 
- */ - boolean hasPadH(); - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * For 2D convolution only, the *_h and *_w versions may also be used to
-     * specify both spatial dimensions.
-     * 
- */ - int getPadH(); - - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width (2D only)
-     * 
- */ - boolean hasPadW(); - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width (2D only)
-     * 
- */ - int getPadW(); - - /** - * optional uint32 kernel_h = 11; - * - *
-     * The kernel height (2D only)
-     * 
- */ - boolean hasKernelH(); - /** - * optional uint32 kernel_h = 11; - * - *
-     * The kernel height (2D only)
-     * 
- */ - int getKernelH(); - - /** - * optional uint32 kernel_w = 12; - * - *
-     * The kernel width (2D only)
-     * 
- */ - boolean hasKernelW(); - /** - * optional uint32 kernel_w = 12; - * - *
-     * The kernel width (2D only)
-     * 
- */ - int getKernelW(); - - /** - * optional uint32 stride_h = 13; - * - *
-     * The stride height (2D only)
-     * 
- */ - boolean hasStrideH(); - /** - * optional uint32 stride_h = 13; - * - *
-     * The stride height (2D only)
-     * 
- */ - int getStrideH(); - - /** - * optional uint32 stride_w = 14; - * - *
-     * The stride width (2D only)
-     * 
- */ - boolean hasStrideW(); - /** - * optional uint32 stride_w = 14; - * - *
-     * The stride width (2D only)
-     * 
- */ - int getStrideW(); - - /** - * optional uint32 group = 5 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - boolean hasGroup(); - /** - * optional uint32 group = 5 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - int getGroup(); - - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - boolean hasWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameter getWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); - - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - boolean hasBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameter getBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); - - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - caffe.Caffe.ConvolutionParameter.Engine getEngine(); - - /** - * optional int32 axis = 16 [default = 1]; - * - *
-     * The axis to interpret as "channels" when performing convolution.
-     * Preceding dimensions are treated as independent inputs;
-     * succeeding dimensions are treated as "spatial".
-     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-     * groups g>1) filters across the spatial axes (H, W) of the input.
-     * With (N, C, D, H, W) inputs, and axis == 1, we perform
-     * N independent 3D convolutions, sliding (C/g)-channels
-     * filters across the spatial axes (D, H, W) of the input.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 16 [default = 1]; - * - *
-     * The axis to interpret as "channels" when performing convolution.
-     * Preceding dimensions are treated as independent inputs;
-     * succeeding dimensions are treated as "spatial".
-     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-     * groups g>1) filters across the spatial axes (H, W) of the input.
-     * With (N, C, D, H, W) inputs, and axis == 1, we perform
-     * N independent 3D convolutions, sliding (C/g)-channels
-     * filters across the spatial axes (D, H, W) of the input.
-     * 
- */ - int getAxis(); - - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-     * Whether to force use of the general ND convolution, even if a specific
-     * implementation for blobs of the appropriate number of spatial dimensions
-     * is available. (Currently, there is only a 2D-specific convolution
-     * implementation; for input blobs with num_axes != 2, this option is
-     * ignored and the ND implementation will be used.)
-     * 
- */ - boolean hasForceNdIm2Col(); - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-     * Whether to force use of the general ND convolution, even if a specific
-     * implementation for blobs of the appropriate number of spatial dimensions
-     * is available. (Currently, there is only a 2D-specific convolution
-     * implementation; for input blobs with num_axes != 2, this option is
-     * ignored and the ND implementation will be used.)
-     * 
- */ - boolean getForceNdIm2Col(); - } - /** - * Protobuf type {@code caffe.ConvolutionParameter} - */ - public static final class ConvolutionParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ConvolutionParameter) - ConvolutionParameterOrBuilder { - // Use ConvolutionParameter.newBuilder() to construct. - private ConvolutionParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ConvolutionParameter() { - numOutput_ = 0; - biasTerm_ = true; - pad_ = java.util.Collections.emptyList(); - kernelSize_ = java.util.Collections.emptyList(); - stride_ = java.util.Collections.emptyList(); - padH_ = 0; - padW_ = 0; - kernelH_ = 0; - kernelW_ = 0; - strideH_ = 0; - strideW_ = 0; - group_ = 1; - engine_ = 0; - axis_ = 1; - forceNdIm2Col_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConvolutionParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - numOutput_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - biasTerm_ = input.readBool(); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - pad_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - pad_.add(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - pad_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - pad_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - kernelSize_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - kernelSize_.add(input.readUInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { - kernelSize_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - kernelSize_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 40: { - bitField0_ |= 0x00000100; - group_ = input.readUInt32(); - break; - } - case 48: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - stride_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - stride_.add(input.readUInt32()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - stride_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - stride_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 58: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - subBuilder = weightFiller_.toBuilder(); - } - weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(weightFiller_); - weightFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case 66: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - subBuilder = biasFiller_.toBuilder(); - } - biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(biasFiller_); - biasFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 72: { - bitField0_ |= 0x00000004; - padH_ = input.readUInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000008; - padW_ = input.readUInt32(); - break; - } - case 88: { - bitField0_ |= 0x00000010; - kernelH_ = input.readUInt32(); - break; - } - case 96: { - bitField0_ |= 0x00000020; - kernelW_ = input.readUInt32(); - break; - } - case 104: { - bitField0_ |= 0x00000040; - strideH_ = input.readUInt32(); - break; - } - case 112: { - bitField0_ |= 0x00000080; - strideW_ = input.readUInt32(); - break; - } - case 120: { - int rawValue = input.readEnum(); - caffe.Caffe.ConvolutionParameter.Engine value = caffe.Caffe.ConvolutionParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(15, rawValue); - } else { - bitField0_ |= 0x00000800; - engine_ = rawValue; - } - break; - } - case 128: { - bitField0_ |= 0x00001000; - axis_ = input.readInt32(); - break; - } - case 136: { - bitField0_ |= 0x00002000; - forceNdIm2Col_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - pad_ = java.util.Collections.unmodifiableList(pad_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - kernelSize_ = java.util.Collections.unmodifiableList(kernelSize_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - stride_ = java.util.Collections.unmodifiableList(stride_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ConvolutionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ConvolutionParameter.class, caffe.Caffe.ConvolutionParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.ConvolutionParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.ConvolutionParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.ConvolutionParameter.Engine) - } - - private int bitField0_; - public static final int NUM_OUTPUT_FIELD_NUMBER = 1; - private int numOutput_; - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public int getNumOutput() { - return numOutput_; - } - - public static final int BIAS_TERM_FIELD_NUMBER = 2; - private boolean biasTerm_; - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - - public static final int PAD_FIELD_NUMBER = 3; - private java.util.List pad_; - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - public java.util.List - getPadList() { - return pad_; - } - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - public int getPadCount() { - return pad_.size(); - } - /** - * repeated uint32 pad = 3; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in all spatial dimensions, or once per spatial dimension.
-     * 
- */ - public int getPad(int index) { - return pad_.get(index); - } - - public static final int KERNEL_SIZE_FIELD_NUMBER = 4; - private java.util.List kernelSize_; - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - public java.util.List - getKernelSizeList() { - return kernelSize_; - } - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - public int getKernelSizeCount() { - return kernelSize_.size(); - } - /** - * repeated uint32 kernel_size = 4; - * - *
-     * The kernel size
-     * 
- */ - public int getKernelSize(int index) { - return kernelSize_.get(index); - } - - public static final int STRIDE_FIELD_NUMBER = 6; - private java.util.List stride_; - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - public java.util.List - getStrideList() { - return stride_; - } - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - public int getStrideCount() { - return stride_.size(); - } - /** - * repeated uint32 stride = 6; - * - *
-     * The stride; defaults to 1
-     * 
- */ - public int getStride(int index) { - return stride_.get(index); - } - - public static final int PAD_H_FIELD_NUMBER = 9; - private int padH_; - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * For 2D convolution only, the *_h and *_w versions may also be used to
-     * specify both spatial dimensions.
-     * 
- */ - public boolean hasPadH() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * For 2D convolution only, the *_h and *_w versions may also be used to
-     * specify both spatial dimensions.
-     * 
- */ - public int getPadH() { - return padH_; - } - - public static final int PAD_W_FIELD_NUMBER = 10; - private int padW_; - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width (2D only)
-     * 
- */ - public boolean hasPadW() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width (2D only)
-     * 
- */ - public int getPadW() { - return padW_; - } - - public static final int KERNEL_H_FIELD_NUMBER = 11; - private int kernelH_; - /** - * optional uint32 kernel_h = 11; - * - *
-     * The kernel height (2D only)
-     * 
- */ - public boolean hasKernelH() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 kernel_h = 11; - * - *
-     * The kernel height (2D only)
-     * 
- */ - public int getKernelH() { - return kernelH_; - } - - public static final int KERNEL_W_FIELD_NUMBER = 12; - private int kernelW_; - /** - * optional uint32 kernel_w = 12; - * - *
-     * The kernel width (2D only)
-     * 
- */ - public boolean hasKernelW() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 kernel_w = 12; - * - *
-     * The kernel width (2D only)
-     * 
- */ - public int getKernelW() { - return kernelW_; - } - - public static final int STRIDE_H_FIELD_NUMBER = 13; - private int strideH_; - /** - * optional uint32 stride_h = 13; - * - *
-     * The stride height (2D only)
-     * 
- */ - public boolean hasStrideH() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 stride_h = 13; - * - *
-     * The stride height (2D only)
-     * 
- */ - public int getStrideH() { - return strideH_; - } - - public static final int STRIDE_W_FIELD_NUMBER = 14; - private int strideW_; - /** - * optional uint32 stride_w = 14; - * - *
-     * The stride width (2D only)
-     * 
- */ - public boolean hasStrideW() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 stride_w = 14; - * - *
-     * The stride width (2D only)
-     * 
- */ - public int getStrideW() { - return strideW_; - } - - public static final int GROUP_FIELD_NUMBER = 5; - private int group_; - /** - * optional uint32 group = 5 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - public boolean hasGroup() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 group = 5 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - public int getGroup() { - return group_; - } - - public static final int WEIGHT_FILLER_FIELD_NUMBER = 7; - private caffe.Caffe.FillerParameter weightFiller_; - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - - public static final int BIAS_FILLER_FIELD_NUMBER = 8; - private caffe.Caffe.FillerParameter biasFiller_; - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - - public static final int ENGINE_FIELD_NUMBER = 15; - private int engine_; - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public caffe.Caffe.ConvolutionParameter.Engine getEngine() { - caffe.Caffe.ConvolutionParameter.Engine result = caffe.Caffe.ConvolutionParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.ConvolutionParameter.Engine.DEFAULT : result; - } - - public static final int AXIS_FIELD_NUMBER = 16; - private int axis_; - /** - * optional int32 axis = 16 [default = 1]; - * - *
-     * The axis to interpret as "channels" when performing convolution.
-     * Preceding dimensions are treated as independent inputs;
-     * succeeding dimensions are treated as "spatial".
-     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-     * groups g>1) filters across the spatial axes (H, W) of the input.
-     * With (N, C, D, H, W) inputs, and axis == 1, we perform
-     * N independent 3D convolutions, sliding (C/g)-channels
-     * filters across the spatial axes (D, H, W) of the input.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional int32 axis = 16 [default = 1]; - * - *
-     * The axis to interpret as "channels" when performing convolution.
-     * Preceding dimensions are treated as independent inputs;
-     * succeeding dimensions are treated as "spatial".
-     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-     * groups g>1) filters across the spatial axes (H, W) of the input.
-     * With (N, C, D, H, W) inputs, and axis == 1, we perform
-     * N independent 3D convolutions, sliding (C/g)-channels
-     * filters across the spatial axes (D, H, W) of the input.
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int FORCE_ND_IM2COL_FIELD_NUMBER = 17; - private boolean forceNdIm2Col_; - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-     * Whether to force use of the general ND convolution, even if a specific
-     * implementation for blobs of the appropriate number of spatial dimensions
-     * is available. (Currently, there is only a 2D-specific convolution
-     * implementation; for input blobs with num_axes != 2, this option is
-     * ignored and the ND implementation will be used.)
-     * 
- */ - public boolean hasForceNdIm2Col() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-     * Whether to force use of the general ND convolution, even if a specific
-     * implementation for blobs of the appropriate number of spatial dimensions
-     * is available. (Currently, there is only a 2D-specific convolution
-     * implementation; for input blobs with num_axes != 2, this option is
-     * ignored and the ND implementation will be used.)
-     * 
- */ - public boolean getForceNdIm2Col() { - return forceNdIm2Col_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, biasTerm_); - } - for (int i = 0; i < pad_.size(); i++) { - output.writeUInt32(3, pad_.get(i)); - } - for (int i = 0; i < kernelSize_.size(); i++) { - output.writeUInt32(4, kernelSize_.get(i)); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeUInt32(5, group_); - } - for (int i = 0; i < stride_.size(); i++) { - output.writeUInt32(6, stride_.get(i)); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeMessage(7, getWeightFiller()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeMessage(8, getBiasFiller()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(9, padH_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(10, padW_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(11, kernelH_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt32(12, kernelW_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(13, strideH_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeUInt32(14, strideW_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeEnum(15, engine_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeInt32(16, axis_); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeBool(17, forceNdIm2Col_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, biasTerm_); - } - { - int dataSize = 0; - for (int i = 0; i < pad_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(pad_.get(i)); - } - size += dataSize; - size += 1 * getPadList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < kernelSize_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(kernelSize_.get(i)); - } - size += dataSize; - size += 1 * getKernelSizeList().size(); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, group_); - } - { - int dataSize = 0; - for (int i = 0; i < stride_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(stride_.get(i)); - } - size += dataSize; - size += 1 * getStrideList().size(); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getWeightFiller()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getBiasFiller()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, padH_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, padW_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(11, kernelH_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(12, kernelW_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(13, strideH_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(14, strideW_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, engine_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(16, axis_); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(17, forceNdIm2Col_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ConvolutionParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ConvolutionParameter 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.ConvolutionParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ConvolutionParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ConvolutionParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ConvolutionParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ConvolutionParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ConvolutionParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ConvolutionParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ConvolutionParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ConvolutionParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ConvolutionParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ConvolutionParameter) - caffe.Caffe.ConvolutionParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ConvolutionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ConvolutionParameter.class, caffe.Caffe.ConvolutionParameter.Builder.class); - } - - // Construct using caffe.Caffe.ConvolutionParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getWeightFillerFieldBuilder(); - getBiasFillerFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - numOutput_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - biasTerm_ = true; - bitField0_ = (bitField0_ & ~0x00000002); - pad_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - kernelSize_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - stride_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - padH_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - padW_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - kernelH_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - kernelW_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - strideH_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - strideW_ = 0; - bitField0_ = (bitField0_ & ~0x00000400); - group_ = 1; - bitField0_ = (bitField0_ & ~0x00000800); - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00004000); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00008000); - forceNdIm2Col_ = false; - bitField0_ = (bitField0_ & ~0x00010000); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; - } - - public caffe.Caffe.ConvolutionParameter getDefaultInstanceForType() { - return caffe.Caffe.ConvolutionParameter.getDefaultInstance(); - } - - public caffe.Caffe.ConvolutionParameter build() { - caffe.Caffe.ConvolutionParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ConvolutionParameter buildPartial() { - caffe.Caffe.ConvolutionParameter result = new caffe.Caffe.ConvolutionParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.numOutput_ = numOutput_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.biasTerm_ = biasTerm_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - pad_ = java.util.Collections.unmodifiableList(pad_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.pad_ = pad_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - kernelSize_ = java.util.Collections.unmodifiableList(kernelSize_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.kernelSize_ = kernelSize_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - stride_ = java.util.Collections.unmodifiableList(stride_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.stride_ = stride_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000004; - } - result.padH_ = padH_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000008; - } - result.padW_ = padW_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000010; - } - result.kernelH_ = kernelH_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000020; - } - result.kernelW_ = kernelW_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000040; - } - result.strideH_ = strideH_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000080; - } - result.strideW_ = strideW_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000100; - } - result.group_ = group_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00000200; - } - if (weightFillerBuilder_ == null) { - result.weightFiller_ = weightFiller_; - } else { - result.weightFiller_ = weightFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00002000) == 0x00002000)) { - to_bitField0_ |= 0x00000400; - } - if (biasFillerBuilder_ == null) { - result.biasFiller_ = biasFiller_; - } else { - result.biasFiller_ = biasFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00004000) == 0x00004000)) { - to_bitField0_ |= 0x00000800; - } - result.engine_ = engine_; - if (((from_bitField0_ & 0x00008000) == 0x00008000)) { - to_bitField0_ |= 0x00001000; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00010000) == 0x00010000)) { - to_bitField0_ |= 0x00002000; - } - result.forceNdIm2Col_ = forceNdIm2Col_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ConvolutionParameter) { - return mergeFrom((caffe.Caffe.ConvolutionParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ConvolutionParameter other) { - if (other == caffe.Caffe.ConvolutionParameter.getDefaultInstance()) return this; - if (other.hasNumOutput()) { - setNumOutput(other.getNumOutput()); - } - if (other.hasBiasTerm()) { - setBiasTerm(other.getBiasTerm()); - } - if (!other.pad_.isEmpty()) { - if (pad_.isEmpty()) { - pad_ = other.pad_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePadIsMutable(); - pad_.addAll(other.pad_); - } - onChanged(); - } - if (!other.kernelSize_.isEmpty()) { - if (kernelSize_.isEmpty()) { - kernelSize_ = other.kernelSize_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureKernelSizeIsMutable(); - kernelSize_.addAll(other.kernelSize_); - } - onChanged(); - } - if (!other.stride_.isEmpty()) { - if (stride_.isEmpty()) { - stride_ = other.stride_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureStrideIsMutable(); - stride_.addAll(other.stride_); - } - onChanged(); - } - if (other.hasPadH()) { - setPadH(other.getPadH()); - } - if (other.hasPadW()) { - setPadW(other.getPadW()); - } - if (other.hasKernelH()) { - setKernelH(other.getKernelH()); - } - if (other.hasKernelW()) { - setKernelW(other.getKernelW()); - } - if (other.hasStrideH()) { - setStrideH(other.getStrideH()); - } - if (other.hasStrideW()) { - setStrideW(other.getStrideW()); - } - if (other.hasGroup()) { - setGroup(other.getGroup()); - } - if (other.hasWeightFiller()) { - mergeWeightFiller(other.getWeightFiller()); - } - if (other.hasBiasFiller()) { - mergeBiasFiller(other.getBiasFiller()); - } - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasForceNdIm2Col()) { - setForceNdIm2Col(other.getForceNdIm2Col()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ConvolutionParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ConvolutionParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int numOutput_ ; - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public int getNumOutput() { - return numOutput_; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder setNumOutput(int value) { - bitField0_ |= 0x00000001; - numOutput_ = value; - onChanged(); - return this; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder clearNumOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - numOutput_ = 0; - onChanged(); - return this; - } - - private boolean biasTerm_ = true; - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder setBiasTerm(boolean value) { - bitField0_ |= 0x00000002; - biasTerm_ = value; - onChanged(); - return this; - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder clearBiasTerm() { - bitField0_ = (bitField0_ & ~0x00000002); - biasTerm_ = true; - onChanged(); - return this; - } - - private java.util.List pad_ = java.util.Collections.emptyList(); - private void ensurePadIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - pad_ = new java.util.ArrayList(pad_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public java.util.List - getPadList() { - return java.util.Collections.unmodifiableList(pad_); - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public int getPadCount() { - return pad_.size(); - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public int getPad(int index) { - return pad_.get(index); - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public Builder setPad( - int index, int value) { - ensurePadIsMutable(); - pad_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public Builder addPad(int value) { - ensurePadIsMutable(); - pad_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public Builder addAllPad( - java.lang.Iterable values) { - ensurePadIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pad_); - onChanged(); - return this; - } - /** - * repeated uint32 pad = 3; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in all spatial dimensions, or once per spatial dimension.
-       * 
- */ - public Builder clearPad() { - pad_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private java.util.List kernelSize_ = java.util.Collections.emptyList(); - private void ensureKernelSizeIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - kernelSize_ = new java.util.ArrayList(kernelSize_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public java.util.List - getKernelSizeList() { - return java.util.Collections.unmodifiableList(kernelSize_); - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public int getKernelSizeCount() { - return kernelSize_.size(); - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public int getKernelSize(int index) { - return kernelSize_.get(index); - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public Builder setKernelSize( - int index, int value) { - ensureKernelSizeIsMutable(); - kernelSize_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public Builder addKernelSize(int value) { - ensureKernelSizeIsMutable(); - kernelSize_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public Builder addAllKernelSize( - java.lang.Iterable values) { - ensureKernelSizeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kernelSize_); - onChanged(); - return this; - } - /** - * repeated uint32 kernel_size = 4; - * - *
-       * The kernel size
-       * 
- */ - public Builder clearKernelSize() { - kernelSize_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private java.util.List stride_ = java.util.Collections.emptyList(); - private void ensureStrideIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - stride_ = new java.util.ArrayList(stride_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public java.util.List - getStrideList() { - return java.util.Collections.unmodifiableList(stride_); - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public int getStrideCount() { - return stride_.size(); - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public int getStride(int index) { - return stride_.get(index); - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public Builder setStride( - int index, int value) { - ensureStrideIsMutable(); - stride_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public Builder addStride(int value) { - ensureStrideIsMutable(); - stride_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public Builder addAllStride( - java.lang.Iterable values) { - ensureStrideIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, stride_); - onChanged(); - return this; - } - /** - * repeated uint32 stride = 6; - * - *
-       * The stride; defaults to 1
-       * 
- */ - public Builder clearStride() { - stride_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private int padH_ ; - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * For 2D convolution only, the *_h and *_w versions may also be used to
-       * specify both spatial dimensions.
-       * 
- */ - public boolean hasPadH() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * For 2D convolution only, the *_h and *_w versions may also be used to
-       * specify both spatial dimensions.
-       * 
- */ - public int getPadH() { - return padH_; - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * For 2D convolution only, the *_h and *_w versions may also be used to
-       * specify both spatial dimensions.
-       * 
- */ - public Builder setPadH(int value) { - bitField0_ |= 0x00000020; - padH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * For 2D convolution only, the *_h and *_w versions may also be used to
-       * specify both spatial dimensions.
-       * 
- */ - public Builder clearPadH() { - bitField0_ = (bitField0_ & ~0x00000020); - padH_ = 0; - onChanged(); - return this; - } - - private int padW_ ; - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width (2D only)
-       * 
- */ - public boolean hasPadW() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width (2D only)
-       * 
- */ - public int getPadW() { - return padW_; - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width (2D only)
-       * 
- */ - public Builder setPadW(int value) { - bitField0_ |= 0x00000040; - padW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width (2D only)
-       * 
- */ - public Builder clearPadW() { - bitField0_ = (bitField0_ & ~0x00000040); - padW_ = 0; - onChanged(); - return this; - } - - private int kernelH_ ; - /** - * optional uint32 kernel_h = 11; - * - *
-       * The kernel height (2D only)
-       * 
- */ - public boolean hasKernelH() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 kernel_h = 11; - * - *
-       * The kernel height (2D only)
-       * 
- */ - public int getKernelH() { - return kernelH_; - } - /** - * optional uint32 kernel_h = 11; - * - *
-       * The kernel height (2D only)
-       * 
- */ - public Builder setKernelH(int value) { - bitField0_ |= 0x00000080; - kernelH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernel_h = 11; - * - *
-       * The kernel height (2D only)
-       * 
- */ - public Builder clearKernelH() { - bitField0_ = (bitField0_ & ~0x00000080); - kernelH_ = 0; - onChanged(); - return this; - } - - private int kernelW_ ; - /** - * optional uint32 kernel_w = 12; - * - *
-       * The kernel width (2D only)
-       * 
- */ - public boolean hasKernelW() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 kernel_w = 12; - * - *
-       * The kernel width (2D only)
-       * 
- */ - public int getKernelW() { - return kernelW_; - } - /** - * optional uint32 kernel_w = 12; - * - *
-       * The kernel width (2D only)
-       * 
- */ - public Builder setKernelW(int value) { - bitField0_ |= 0x00000100; - kernelW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernel_w = 12; - * - *
-       * The kernel width (2D only)
-       * 
- */ - public Builder clearKernelW() { - bitField0_ = (bitField0_ & ~0x00000100); - kernelW_ = 0; - onChanged(); - return this; - } - - private int strideH_ ; - /** - * optional uint32 stride_h = 13; - * - *
-       * The stride height (2D only)
-       * 
- */ - public boolean hasStrideH() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 stride_h = 13; - * - *
-       * The stride height (2D only)
-       * 
- */ - public int getStrideH() { - return strideH_; - } - /** - * optional uint32 stride_h = 13; - * - *
-       * The stride height (2D only)
-       * 
- */ - public Builder setStrideH(int value) { - bitField0_ |= 0x00000200; - strideH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride_h = 13; - * - *
-       * The stride height (2D only)
-       * 
- */ - public Builder clearStrideH() { - bitField0_ = (bitField0_ & ~0x00000200); - strideH_ = 0; - onChanged(); - return this; - } - - private int strideW_ ; - /** - * optional uint32 stride_w = 14; - * - *
-       * The stride width (2D only)
-       * 
- */ - public boolean hasStrideW() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional uint32 stride_w = 14; - * - *
-       * The stride width (2D only)
-       * 
- */ - public int getStrideW() { - return strideW_; - } - /** - * optional uint32 stride_w = 14; - * - *
-       * The stride width (2D only)
-       * 
- */ - public Builder setStrideW(int value) { - bitField0_ |= 0x00000400; - strideW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride_w = 14; - * - *
-       * The stride width (2D only)
-       * 
- */ - public Builder clearStrideW() { - bitField0_ = (bitField0_ & ~0x00000400); - strideW_ = 0; - onChanged(); - return this; - } - - private int group_ = 1; - /** - * optional uint32 group = 5 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public boolean hasGroup() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional uint32 group = 5 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public int getGroup() { - return group_; - } - /** - * optional uint32 group = 5 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public Builder setGroup(int value) { - bitField0_ |= 0x00000800; - group_ = value; - onChanged(); - return this; - } - /** - * optional uint32 group = 5 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public Builder clearGroup() { - bitField0_ = (bitField0_ & ~0x00000800); - group_ = 1; - onChanged(); - return this; - } - - private caffe.Caffe.FillerParameter weightFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - if (weightFillerBuilder_ == null) { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } else { - return weightFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - weightFiller_ = value; - onChanged(); - } else { - weightFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (weightFillerBuilder_ == null) { - weightFiller_ = builderForValue.build(); - onChanged(); - } else { - weightFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (((bitField0_ & 0x00001000) == 0x00001000) && - weightFiller_ != null && - weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - weightFiller_ = - caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); - } else { - weightFiller_ = value; - } - onChanged(); - } else { - weightFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder clearWeightFiller() { - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - onChanged(); - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getWeightFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - if (weightFillerBuilder_ != null) { - return weightFillerBuilder_.getMessageOrBuilder(); - } else { - return weightFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - } - /** - * optional .caffe.FillerParameter weight_filler = 7; - * - *
-       * The filler for the weight
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getWeightFillerFieldBuilder() { - if (weightFillerBuilder_ == null) { - weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getWeightFiller(), - getParentForChildren(), - isClean()); - weightFiller_ = null; - } - return weightFillerBuilder_; - } - - private caffe.Caffe.FillerParameter biasFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - if (biasFillerBuilder_ == null) { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } else { - return biasFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - biasFiller_ = value; - onChanged(); - } else { - biasFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (biasFillerBuilder_ == null) { - biasFiller_ = builderForValue.build(); - onChanged(); - } else { - biasFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (((bitField0_ & 0x00002000) == 0x00002000) && - biasFiller_ != null && - biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - biasFiller_ = - caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); - } else { - biasFiller_ = value; - } - onChanged(); - } else { - biasFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder clearBiasFiller() { - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - onChanged(); - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return getBiasFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - if (biasFillerBuilder_ != null) { - return biasFillerBuilder_.getMessageOrBuilder(); - } else { - return biasFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - } - /** - * optional .caffe.FillerParameter bias_filler = 8; - * - *
-       * The filler for the bias
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getBiasFillerFieldBuilder() { - if (biasFillerBuilder_ == null) { - biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getBiasFiller(), - getParentForChildren(), - isClean()); - biasFiller_ = null; - } - return biasFillerBuilder_; - } - - private int engine_ = 0; - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public caffe.Caffe.ConvolutionParameter.Engine getEngine() { - caffe.Caffe.ConvolutionParameter.Engine result = caffe.Caffe.ConvolutionParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.ConvolutionParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.ConvolutionParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00004000); - engine_ = 0; - onChanged(); - return this; - } - - private int axis_ = 1; - /** - * optional int32 axis = 16 [default = 1]; - * - *
-       * The axis to interpret as "channels" when performing convolution.
-       * Preceding dimensions are treated as independent inputs;
-       * succeeding dimensions are treated as "spatial".
-       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-       * groups g>1) filters across the spatial axes (H, W) of the input.
-       * With (N, C, D, H, W) inputs, and axis == 1, we perform
-       * N independent 3D convolutions, sliding (C/g)-channels
-       * filters across the spatial axes (D, H, W) of the input.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional int32 axis = 16 [default = 1]; - * - *
-       * The axis to interpret as "channels" when performing convolution.
-       * Preceding dimensions are treated as independent inputs;
-       * succeeding dimensions are treated as "spatial".
-       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-       * groups g>1) filters across the spatial axes (H, W) of the input.
-       * With (N, C, D, H, W) inputs, and axis == 1, we perform
-       * N independent 3D convolutions, sliding (C/g)-channels
-       * filters across the spatial axes (D, H, W) of the input.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 16 [default = 1]; - * - *
-       * The axis to interpret as "channels" when performing convolution.
-       * Preceding dimensions are treated as independent inputs;
-       * succeeding dimensions are treated as "spatial".
-       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-       * groups g>1) filters across the spatial axes (H, W) of the input.
-       * With (N, C, D, H, W) inputs, and axis == 1, we perform
-       * N independent 3D convolutions, sliding (C/g)-channels
-       * filters across the spatial axes (D, H, W) of the input.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00008000; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 16 [default = 1]; - * - *
-       * The axis to interpret as "channels" when performing convolution.
-       * Preceding dimensions are treated as independent inputs;
-       * succeeding dimensions are treated as "spatial".
-       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
-       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
-       * groups g>1) filters across the spatial axes (H, W) of the input.
-       * With (N, C, D, H, W) inputs, and axis == 1, we perform
-       * N independent 3D convolutions, sliding (C/g)-channels
-       * filters across the spatial axes (D, H, W) of the input.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00008000); - axis_ = 1; - onChanged(); - return this; - } - - private boolean forceNdIm2Col_ ; - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-       * Whether to force use of the general ND convolution, even if a specific
-       * implementation for blobs of the appropriate number of spatial dimensions
-       * is available. (Currently, there is only a 2D-specific convolution
-       * implementation; for input blobs with num_axes != 2, this option is
-       * ignored and the ND implementation will be used.)
-       * 
- */ - public boolean hasForceNdIm2Col() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-       * Whether to force use of the general ND convolution, even if a specific
-       * implementation for blobs of the appropriate number of spatial dimensions
-       * is available. (Currently, there is only a 2D-specific convolution
-       * implementation; for input blobs with num_axes != 2, this option is
-       * ignored and the ND implementation will be used.)
-       * 
- */ - public boolean getForceNdIm2Col() { - return forceNdIm2Col_; - } - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-       * Whether to force use of the general ND convolution, even if a specific
-       * implementation for blobs of the appropriate number of spatial dimensions
-       * is available. (Currently, there is only a 2D-specific convolution
-       * implementation; for input blobs with num_axes != 2, this option is
-       * ignored and the ND implementation will be used.)
-       * 
- */ - public Builder setForceNdIm2Col(boolean value) { - bitField0_ |= 0x00010000; - forceNdIm2Col_ = value; - onChanged(); - return this; - } - /** - * optional bool force_nd_im2col = 17 [default = false]; - * - *
-       * Whether to force use of the general ND convolution, even if a specific
-       * implementation for blobs of the appropriate number of spatial dimensions
-       * is available. (Currently, there is only a 2D-specific convolution
-       * implementation; for input blobs with num_axes != 2, this option is
-       * ignored and the ND implementation will be used.)
-       * 
- */ - public Builder clearForceNdIm2Col() { - bitField0_ = (bitField0_ & ~0x00010000); - forceNdIm2Col_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ConvolutionParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ConvolutionParameter) - private static final caffe.Caffe.ConvolutionParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ConvolutionParameter(); - } - - public static caffe.Caffe.ConvolutionParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ConvolutionParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ConvolutionParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ConvolutionParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.DataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - boolean hasBatchSize(); - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - int getBatchSize(); - - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * DEPRECATED. Each solver accesses a different subset of the database.
-     * 
- */ - boolean hasRandSkip(); - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * DEPRECATED. Each solver accesses a different subset of the database.
-     * 
- */ - int getRandSkip(); - - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - boolean hasBackend(); - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - caffe.Caffe.DataParameter.DB getBackend(); - - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - float getScale(); - - /** - * optional string mean_file = 3; - */ - boolean hasMeanFile(); - /** - * optional string mean_file = 3; - */ - java.lang.String getMeanFile(); - /** - * optional string mean_file = 3; - */ - com.google.protobuf.ByteString - getMeanFileBytes(); - - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - boolean hasCropSize(); - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - int getCropSize(); - - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - boolean hasMirror(); - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - boolean getMirror(); - - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-     * Force the encoded image to have 3 color channels
-     * 
- */ - boolean hasForceEncodedColor(); - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-     * Force the encoded image to have 3 color channels
-     * 
- */ - boolean getForceEncodedColor(); - - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-     * Prefetch queue (Number of batches to prefetch to host memory, increase if
-     * data access bandwidth varies).
-     * 
- */ - boolean hasPrefetch(); - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-     * Prefetch queue (Number of batches to prefetch to host memory, increase if
-     * data access bandwidth varies).
-     * 
- */ - int getPrefetch(); - } - /** - * Protobuf type {@code caffe.DataParameter} - */ - public static final class DataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.DataParameter) - DataParameterOrBuilder { - // Use DataParameter.newBuilder() to construct. - private DataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DataParameter() { - source_ = ""; - batchSize_ = 0; - randSkip_ = 0; - backend_ = 0; - scale_ = 1F; - meanFile_ = ""; - cropSize_ = 0; - mirror_ = false; - forceEncodedColor_ = false; - prefetch_ = 4; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - source_ = bs; - break; - } - case 21: { - bitField0_ |= 0x00000010; - scale_ = input.readFloat(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - meanFile_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000002; - batchSize_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000040; - cropSize_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000080; - mirror_ = input.readBool(); - break; - } - case 56: { - bitField0_ |= 0x00000004; - randSkip_ = input.readUInt32(); - break; - } - case 64: { - int rawValue = input.readEnum(); - caffe.Caffe.DataParameter.DB value = caffe.Caffe.DataParameter.DB.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(8, rawValue); - } else { - bitField0_ |= 0x00000008; - backend_ = rawValue; - } - break; - } - case 72: { - bitField0_ |= 0x00000100; - forceEncodedColor_ = input.readBool(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - prefetch_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_DataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DataParameter.class, caffe.Caffe.DataParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.DataParameter.DB} - */ - public enum DB - implements com.google.protobuf.ProtocolMessageEnum { - /** - * LEVELDB = 0; - */ - LEVELDB(0, 0), - /** - * LMDB = 1; - */ - LMDB(1, 1), - ; - - /** - * LEVELDB = 0; - */ - public static final int LEVELDB_VALUE = 0; - /** - * LMDB = 1; - */ - public static final int LMDB_VALUE = 1; - - - public final int getNumber() { - return value; - } - - public static DB valueOf(int value) { - switch (value) { - case 0: return LEVELDB; - case 1: return LMDB; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DB> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DB findValueByNumber(int number) { - return DB.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.DataParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final DB[] VALUES = values(); - - public static DB 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 DB(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.DataParameter.DB) - } - - private int bitField0_; - public static final int SOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 4; - private int batchSize_; - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - public int getBatchSize() { - return batchSize_; - } - - public static final int RAND_SKIP_FIELD_NUMBER = 7; - private int randSkip_; - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * DEPRECATED. Each solver accesses a different subset of the database.
-     * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * DEPRECATED. Each solver accesses a different subset of the database.
-     * 
- */ - public int getRandSkip() { - return randSkip_; - } - - public static final int BACKEND_FIELD_NUMBER = 8; - private int backend_; - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public boolean hasBackend() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public caffe.Caffe.DataParameter.DB getBackend() { - caffe.Caffe.DataParameter.DB result = caffe.Caffe.DataParameter.DB.valueOf(backend_); - return result == null ? caffe.Caffe.DataParameter.DB.LEVELDB : result; - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - public float getScale() { - return scale_; - } - - public static final int MEAN_FILE_FIELD_NUMBER = 3; - private volatile java.lang.Object meanFile_; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - 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()) { - meanFile_ = s; - } - return s; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROP_SIZE_FIELD_NUMBER = 5; - private int cropSize_; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - public int getCropSize() { - return cropSize_; - } - - public static final int MIRROR_FIELD_NUMBER = 6; - private boolean mirror_; - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - public boolean getMirror() { - return mirror_; - } - - public static final int FORCE_ENCODED_COLOR_FIELD_NUMBER = 9; - private boolean forceEncodedColor_; - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-     * Force the encoded image to have 3 color channels
-     * 
- */ - public boolean hasForceEncodedColor() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-     * Force the encoded image to have 3 color channels
-     * 
- */ - public boolean getForceEncodedColor() { - return forceEncodedColor_; - } - - public static final int PREFETCH_FIELD_NUMBER = 10; - private int prefetch_; - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-     * Prefetch queue (Number of batches to prefetch to host memory, increase if
-     * data access bandwidth varies).
-     * 
- */ - public boolean hasPrefetch() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-     * Prefetch queue (Number of batches to prefetch to host memory, increase if
-     * data access bandwidth varies).
-     * 
- */ - public int getPrefetch() { - return prefetch_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(4, batchSize_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(5, cropSize_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBool(6, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(7, randSkip_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(8, backend_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBool(9, forceEncodedColor_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt32(10, prefetch_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, batchSize_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, cropSize_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, randSkip_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, backend_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, forceEncodedColor_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, prefetch_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.DataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DataParameter 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.DataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.DataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.DataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.DataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.DataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.DataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.DataParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.DataParameter) - caffe.Caffe.DataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_DataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DataParameter.class, caffe.Caffe.DataParameter.Builder.class); - } - - // Construct using caffe.Caffe.DataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - batchSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - randSkip_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - backend_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000010); - meanFile_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - cropSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - mirror_ = false; - bitField0_ = (bitField0_ & ~0x00000080); - forceEncodedColor_ = false; - bitField0_ = (bitField0_ & ~0x00000100); - prefetch_ = 4; - bitField0_ = (bitField0_ & ~0x00000200); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_DataParameter_descriptor; - } - - public caffe.Caffe.DataParameter getDefaultInstanceForType() { - return caffe.Caffe.DataParameter.getDefaultInstance(); - } - - public caffe.Caffe.DataParameter build() { - caffe.Caffe.DataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.DataParameter buildPartial() { - caffe.Caffe.DataParameter result = new caffe.Caffe.DataParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.batchSize_ = batchSize_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.randSkip_ = randSkip_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.backend_ = backend_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.meanFile_ = meanFile_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.cropSize_ = cropSize_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.mirror_ = mirror_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.forceEncodedColor_ = forceEncodedColor_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.prefetch_ = prefetch_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.DataParameter) { - return mergeFrom((caffe.Caffe.DataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.DataParameter other) { - if (other == caffe.Caffe.DataParameter.getDefaultInstance()) return this; - if (other.hasSource()) { - bitField0_ |= 0x00000001; - source_ = other.source_; - onChanged(); - } - if (other.hasBatchSize()) { - setBatchSize(other.getBatchSize()); - } - if (other.hasRandSkip()) { - setRandSkip(other.getRandSkip()); - } - if (other.hasBackend()) { - setBackend(other.getBackend()); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasMeanFile()) { - bitField0_ |= 0x00000020; - meanFile_ = other.meanFile_; - onChanged(); - } - if (other.hasCropSize()) { - setCropSize(other.getCropSize()); - } - if (other.hasMirror()) { - setMirror(other.getMirror()); - } - if (other.hasForceEncodedColor()) { - setForceEncodedColor(other.getForceEncodedColor()); - } - if (other.hasPrefetch()) { - setPrefetch(other.getPrefetch()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.DataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.DataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object source_ = ""; - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000001); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - - private int batchSize_ ; - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public int getBatchSize() { - return batchSize_; - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder setBatchSize(int value) { - bitField0_ |= 0x00000002; - batchSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder clearBatchSize() { - bitField0_ = (bitField0_ & ~0x00000002); - batchSize_ = 0; - onChanged(); - return this; - } - - private int randSkip_ ; - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * DEPRECATED. Each solver accesses a different subset of the database.
-       * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * DEPRECATED. Each solver accesses a different subset of the database.
-       * 
- */ - public int getRandSkip() { - return randSkip_; - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * DEPRECATED. Each solver accesses a different subset of the database.
-       * 
- */ - public Builder setRandSkip(int value) { - bitField0_ |= 0x00000004; - randSkip_ = value; - onChanged(); - return this; - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * DEPRECATED. Each solver accesses a different subset of the database.
-       * 
- */ - public Builder clearRandSkip() { - bitField0_ = (bitField0_ & ~0x00000004); - randSkip_ = 0; - onChanged(); - return this; - } - - private int backend_ = 0; - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public boolean hasBackend() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public caffe.Caffe.DataParameter.DB getBackend() { - caffe.Caffe.DataParameter.DB result = caffe.Caffe.DataParameter.DB.valueOf(backend_); - return result == null ? caffe.Caffe.DataParameter.DB.LEVELDB : result; - } - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public Builder setBackend(caffe.Caffe.DataParameter.DB value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - backend_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; - */ - public Builder clearBackend() { - bitField0_ = (bitField0_ & ~0x00000008); - backend_ = 0; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public Builder setScale(float value) { - bitField0_ |= 0x00000010; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000010); - scale_ = 1F; - onChanged(); - return this; - } - - private java.lang.Object meanFile_ = ""; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - meanFile_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - meanFile_ = value; - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder clearMeanFile() { - bitField0_ = (bitField0_ & ~0x00000020); - meanFile_ = getDefaultInstance().getMeanFile(); - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - meanFile_ = value; - onChanged(); - return this; - } - - private int cropSize_ ; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public int getCropSize() { - return cropSize_; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public Builder setCropSize(int value) { - bitField0_ |= 0x00000040; - cropSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public Builder clearCropSize() { - bitField0_ = (bitField0_ & ~0x00000040); - cropSize_ = 0; - onChanged(); - return this; - } - - private boolean mirror_ ; - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public boolean getMirror() { - return mirror_; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public Builder setMirror(boolean value) { - bitField0_ |= 0x00000080; - mirror_ = value; - onChanged(); - return this; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public Builder clearMirror() { - bitField0_ = (bitField0_ & ~0x00000080); - mirror_ = false; - onChanged(); - return this; - } - - private boolean forceEncodedColor_ ; - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-       * Force the encoded image to have 3 color channels
-       * 
- */ - public boolean hasForceEncodedColor() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-       * Force the encoded image to have 3 color channels
-       * 
- */ - public boolean getForceEncodedColor() { - return forceEncodedColor_; - } - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-       * Force the encoded image to have 3 color channels
-       * 
- */ - public Builder setForceEncodedColor(boolean value) { - bitField0_ |= 0x00000100; - forceEncodedColor_ = value; - onChanged(); - return this; - } - /** - * optional bool force_encoded_color = 9 [default = false]; - * - *
-       * Force the encoded image to have 3 color channels
-       * 
- */ - public Builder clearForceEncodedColor() { - bitField0_ = (bitField0_ & ~0x00000100); - forceEncodedColor_ = false; - onChanged(); - return this; - } - - private int prefetch_ = 4; - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-       * Prefetch queue (Number of batches to prefetch to host memory, increase if
-       * data access bandwidth varies).
-       * 
- */ - public boolean hasPrefetch() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-       * Prefetch queue (Number of batches to prefetch to host memory, increase if
-       * data access bandwidth varies).
-       * 
- */ - public int getPrefetch() { - return prefetch_; - } - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-       * Prefetch queue (Number of batches to prefetch to host memory, increase if
-       * data access bandwidth varies).
-       * 
- */ - public Builder setPrefetch(int value) { - bitField0_ |= 0x00000200; - prefetch_ = value; - onChanged(); - return this; - } - /** - * optional uint32 prefetch = 10 [default = 4]; - * - *
-       * Prefetch queue (Number of batches to prefetch to host memory, increase if
-       * data access bandwidth varies).
-       * 
- */ - public Builder clearPrefetch() { - bitField0_ = (bitField0_ & ~0x00000200); - prefetch_ = 4; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.DataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.DataParameter) - private static final caffe.Caffe.DataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.DataParameter(); - } - - public static caffe.Caffe.DataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.DataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DropoutParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.DropoutParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - boolean hasDropoutRatio(); - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - float getDropoutRatio(); - } - /** - * Protobuf type {@code caffe.DropoutParameter} - */ - public static final class DropoutParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.DropoutParameter) - DropoutParameterOrBuilder { - // Use DropoutParameter.newBuilder() to construct. - private DropoutParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DropoutParameter() { - dropoutRatio_ = 0.5F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DropoutParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - dropoutRatio_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_DropoutParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DropoutParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DropoutParameter.class, caffe.Caffe.DropoutParameter.Builder.class); - } - - private int bitField0_; - public static final int DROPOUT_RATIO_FIELD_NUMBER = 1; - private float dropoutRatio_; - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - public boolean hasDropoutRatio() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - public float getDropoutRatio() { - return dropoutRatio_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, dropoutRatio_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, dropoutRatio_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.DropoutParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DropoutParameter 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.DropoutParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DropoutParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.DropoutParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DropoutParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.DropoutParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.DropoutParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.DropoutParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DropoutParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.DropoutParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.DropoutParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.DropoutParameter) - caffe.Caffe.DropoutParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_DropoutParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DropoutParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DropoutParameter.class, caffe.Caffe.DropoutParameter.Builder.class); - } - - // Construct using caffe.Caffe.DropoutParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - dropoutRatio_ = 0.5F; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_DropoutParameter_descriptor; - } - - public caffe.Caffe.DropoutParameter getDefaultInstanceForType() { - return caffe.Caffe.DropoutParameter.getDefaultInstance(); - } - - public caffe.Caffe.DropoutParameter build() { - caffe.Caffe.DropoutParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.DropoutParameter buildPartial() { - caffe.Caffe.DropoutParameter result = new caffe.Caffe.DropoutParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.dropoutRatio_ = dropoutRatio_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.DropoutParameter) { - return mergeFrom((caffe.Caffe.DropoutParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.DropoutParameter other) { - if (other == caffe.Caffe.DropoutParameter.getDefaultInstance()) return this; - if (other.hasDropoutRatio()) { - setDropoutRatio(other.getDropoutRatio()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.DropoutParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.DropoutParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float dropoutRatio_ = 0.5F; - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public boolean hasDropoutRatio() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public float getDropoutRatio() { - return dropoutRatio_; - } - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public Builder setDropoutRatio(float value) { - bitField0_ |= 0x00000001; - dropoutRatio_ = value; - onChanged(); - return this; - } - /** - * optional float dropout_ratio = 1 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public Builder clearDropoutRatio() { - bitField0_ = (bitField0_ & ~0x00000001); - dropoutRatio_ = 0.5F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.DropoutParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.DropoutParameter) - private static final caffe.Caffe.DropoutParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.DropoutParameter(); - } - - public static caffe.Caffe.DropoutParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DropoutParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DropoutParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.DropoutParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DummyDataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.DummyDataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - java.util.List - getDataFillerList(); - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - caffe.Caffe.FillerParameter getDataFiller(int index); - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - int getDataFillerCount(); - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - java.util.List - getDataFillerOrBuilderList(); - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( - int index); - - /** - * repeated .caffe.BlobShape shape = 6; - */ - java.util.List - getShapeList(); - /** - * repeated .caffe.BlobShape shape = 6; - */ - caffe.Caffe.BlobShape getShape(int index); - /** - * repeated .caffe.BlobShape shape = 6; - */ - int getShapeCount(); - /** - * repeated .caffe.BlobShape shape = 6; - */ - java.util.List - getShapeOrBuilderList(); - /** - * repeated .caffe.BlobShape shape = 6; - */ - caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( - int index); - - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - java.util.List getNumList(); - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - int getNumCount(); - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - int getNum(int index); - - /** - * repeated uint32 channels = 3; - */ - java.util.List getChannelsList(); - /** - * repeated uint32 channels = 3; - */ - int getChannelsCount(); - /** - * repeated uint32 channels = 3; - */ - int getChannels(int index); - - /** - * repeated uint32 height = 4; - */ - java.util.List getHeightList(); - /** - * repeated uint32 height = 4; - */ - int getHeightCount(); - /** - * repeated uint32 height = 4; - */ - int getHeight(int index); - - /** - * repeated uint32 width = 5; - */ - java.util.List getWidthList(); - /** - * repeated uint32 width = 5; - */ - int getWidthCount(); - /** - * repeated uint32 width = 5; - */ - int getWidth(int index); - } - /** - * Protobuf type {@code caffe.DummyDataParameter} - * - *
-   * DummyDataLayer fills any number of arbitrarily shaped blobs with random
-   * (or constant) data generated by "Fillers" (see "message FillerParameter").
-   * 
- */ - public static final class DummyDataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.DummyDataParameter) - DummyDataParameterOrBuilder { - // Use DummyDataParameter.newBuilder() to construct. - private DummyDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DummyDataParameter() { - dataFiller_ = java.util.Collections.emptyList(); - shape_ = java.util.Collections.emptyList(); - num_ = java.util.Collections.emptyList(); - channels_ = java.util.Collections.emptyList(); - height_ = java.util.Collections.emptyList(); - width_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DummyDataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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)) { - dataFiller_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - dataFiller_.add(input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry)); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - num_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - num_.add(input.readUInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - num_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - num_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - channels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - channels_.add(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { - channels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - channels_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - height_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - height_.add(input.readUInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - height_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - height_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - width_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - width_.add(input.readUInt32()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { - width_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - width_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - shape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - shape_.add(input.readMessage(caffe.Caffe.BlobShape.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - dataFiller_ = java.util.Collections.unmodifiableList(dataFiller_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - num_ = java.util.Collections.unmodifiableList(num_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - channels_ = java.util.Collections.unmodifiableList(channels_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - height_ = java.util.Collections.unmodifiableList(height_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - width_ = java.util.Collections.unmodifiableList(width_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - shape_ = java.util.Collections.unmodifiableList(shape_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DummyDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DummyDataParameter.class, caffe.Caffe.DummyDataParameter.Builder.class); - } - - public static final int DATA_FILLER_FIELD_NUMBER = 1; - private java.util.List dataFiller_; - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - public java.util.List getDataFillerList() { - return dataFiller_; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - public java.util.List - getDataFillerOrBuilderList() { - return dataFiller_; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - public int getDataFillerCount() { - return dataFiller_.size(); - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - public caffe.Caffe.FillerParameter getDataFiller(int index) { - return dataFiller_.get(index); - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-     * shape fields, and 0, 1 or N data_fillers.
-     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-     * specified, the ith is applied to the ith top blob.
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( - int index) { - return dataFiller_.get(index); - } - - public static final int SHAPE_FIELD_NUMBER = 6; - private java.util.List shape_; - /** - * repeated .caffe.BlobShape shape = 6; - */ - public java.util.List getShapeList() { - return shape_; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public java.util.List - getShapeOrBuilderList() { - return shape_; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public int getShapeCount() { - return shape_.size(); - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShape getShape(int index) { - return shape_.get(index); - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( - int index) { - return shape_.get(index); - } - - public static final int NUM_FIELD_NUMBER = 2; - private java.util.List num_; - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - public java.util.List - getNumList() { - return num_; - } - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - public int getNumCount() { - return num_.size(); - } - /** - * repeated uint32 num = 2; - * - *
-     * 4D dimensions -- deprecated.  Use "shape" instead.
-     * 
- */ - public int getNum(int index) { - return num_.get(index); - } - - public static final int CHANNELS_FIELD_NUMBER = 3; - private java.util.List channels_; - /** - * repeated uint32 channels = 3; - */ - public java.util.List - getChannelsList() { - return channels_; - } - /** - * repeated uint32 channels = 3; - */ - public int getChannelsCount() { - return channels_.size(); - } - /** - * repeated uint32 channels = 3; - */ - public int getChannels(int index) { - return channels_.get(index); - } - - public static final int HEIGHT_FIELD_NUMBER = 4; - private java.util.List height_; - /** - * repeated uint32 height = 4; - */ - public java.util.List - getHeightList() { - return height_; - } - /** - * repeated uint32 height = 4; - */ - public int getHeightCount() { - return height_.size(); - } - /** - * repeated uint32 height = 4; - */ - public int getHeight(int index) { - return height_.get(index); - } - - public static final int WIDTH_FIELD_NUMBER = 5; - private java.util.List width_; - /** - * repeated uint32 width = 5; - */ - public java.util.List - getWidthList() { - return width_; - } - /** - * repeated uint32 width = 5; - */ - public int getWidthCount() { - return width_.size(); - } - /** - * repeated uint32 width = 5; - */ - public int getWidth(int index) { - return width_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < dataFiller_.size(); i++) { - output.writeMessage(1, dataFiller_.get(i)); - } - for (int i = 0; i < num_.size(); i++) { - output.writeUInt32(2, num_.get(i)); - } - for (int i = 0; i < channels_.size(); i++) { - output.writeUInt32(3, channels_.get(i)); - } - for (int i = 0; i < height_.size(); i++) { - output.writeUInt32(4, height_.get(i)); - } - for (int i = 0; i < width_.size(); i++) { - output.writeUInt32(5, width_.get(i)); - } - for (int i = 0; i < shape_.size(); i++) { - output.writeMessage(6, shape_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < dataFiller_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, dataFiller_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < num_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(num_.get(i)); - } - size += dataSize; - size += 1 * getNumList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < channels_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(channels_.get(i)); - } - size += dataSize; - size += 1 * getChannelsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < height_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(height_.get(i)); - } - size += dataSize; - size += 1 * getHeightList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < width_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(width_.get(i)); - } - size += dataSize; - size += 1 * getWidthList().size(); - } - for (int i = 0; i < shape_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, shape_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.DummyDataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DummyDataParameter 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.DummyDataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.DummyDataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.DummyDataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DummyDataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.DummyDataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.DummyDataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.DummyDataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.DummyDataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.DummyDataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.DummyDataParameter} - * - *
-     * DummyDataLayer fills any number of arbitrarily shaped blobs with random
-     * (or constant) data generated by "Fillers" (see "message FillerParameter").
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.DummyDataParameter) - caffe.Caffe.DummyDataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_DummyDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.DummyDataParameter.class, caffe.Caffe.DummyDataParameter.Builder.class); - } - - // Construct using caffe.Caffe.DummyDataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDataFillerFieldBuilder(); - getShapeFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (dataFillerBuilder_ == null) { - dataFiller_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - dataFillerBuilder_.clear(); - } - if (shapeBuilder_ == null) { - shape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - shapeBuilder_.clear(); - } - num_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - channels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - height_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - width_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; - } - - public caffe.Caffe.DummyDataParameter getDefaultInstanceForType() { - return caffe.Caffe.DummyDataParameter.getDefaultInstance(); - } - - public caffe.Caffe.DummyDataParameter build() { - caffe.Caffe.DummyDataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.DummyDataParameter buildPartial() { - caffe.Caffe.DummyDataParameter result = new caffe.Caffe.DummyDataParameter(this); - int from_bitField0_ = bitField0_; - if (dataFillerBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - dataFiller_ = java.util.Collections.unmodifiableList(dataFiller_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.dataFiller_ = dataFiller_; - } else { - result.dataFiller_ = dataFillerBuilder_.build(); - } - if (shapeBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - shape_ = java.util.Collections.unmodifiableList(shape_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.shape_ = shape_; - } else { - result.shape_ = shapeBuilder_.build(); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - num_ = java.util.Collections.unmodifiableList(num_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.num_ = num_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - channels_ = java.util.Collections.unmodifiableList(channels_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.channels_ = channels_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - height_ = java.util.Collections.unmodifiableList(height_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.height_ = height_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - width_ = java.util.Collections.unmodifiableList(width_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.width_ = width_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.DummyDataParameter) { - return mergeFrom((caffe.Caffe.DummyDataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.DummyDataParameter other) { - if (other == caffe.Caffe.DummyDataParameter.getDefaultInstance()) return this; - if (dataFillerBuilder_ == null) { - if (!other.dataFiller_.isEmpty()) { - if (dataFiller_.isEmpty()) { - dataFiller_ = other.dataFiller_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDataFillerIsMutable(); - dataFiller_.addAll(other.dataFiller_); - } - onChanged(); - } - } else { - if (!other.dataFiller_.isEmpty()) { - if (dataFillerBuilder_.isEmpty()) { - dataFillerBuilder_.dispose(); - dataFillerBuilder_ = null; - dataFiller_ = other.dataFiller_; - bitField0_ = (bitField0_ & ~0x00000001); - dataFillerBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDataFillerFieldBuilder() : null; - } else { - dataFillerBuilder_.addAllMessages(other.dataFiller_); - } - } - } - if (shapeBuilder_ == null) { - if (!other.shape_.isEmpty()) { - if (shape_.isEmpty()) { - shape_ = other.shape_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureShapeIsMutable(); - shape_.addAll(other.shape_); - } - onChanged(); - } - } else { - if (!other.shape_.isEmpty()) { - if (shapeBuilder_.isEmpty()) { - shapeBuilder_.dispose(); - shapeBuilder_ = null; - shape_ = other.shape_; - bitField0_ = (bitField0_ & ~0x00000002); - shapeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getShapeFieldBuilder() : null; - } else { - shapeBuilder_.addAllMessages(other.shape_); - } - } - } - if (!other.num_.isEmpty()) { - if (num_.isEmpty()) { - num_ = other.num_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNumIsMutable(); - num_.addAll(other.num_); - } - onChanged(); - } - if (!other.channels_.isEmpty()) { - if (channels_.isEmpty()) { - channels_ = other.channels_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureChannelsIsMutable(); - channels_.addAll(other.channels_); - } - onChanged(); - } - if (!other.height_.isEmpty()) { - if (height_.isEmpty()) { - height_ = other.height_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureHeightIsMutable(); - height_.addAll(other.height_); - } - onChanged(); - } - if (!other.width_.isEmpty()) { - if (width_.isEmpty()) { - width_ = other.width_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureWidthIsMutable(); - width_.addAll(other.width_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.DummyDataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.DummyDataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List dataFiller_ = - java.util.Collections.emptyList(); - private void ensureDataFillerIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - dataFiller_ = new java.util.ArrayList(dataFiller_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> dataFillerBuilder_; - - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public java.util.List getDataFillerList() { - if (dataFillerBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataFiller_); - } else { - return dataFillerBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public int getDataFillerCount() { - if (dataFillerBuilder_ == null) { - return dataFiller_.size(); - } else { - return dataFillerBuilder_.getCount(); - } - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public caffe.Caffe.FillerParameter getDataFiller(int index) { - if (dataFillerBuilder_ == null) { - return dataFiller_.get(index); - } else { - return dataFillerBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder setDataFiller( - int index, caffe.Caffe.FillerParameter value) { - if (dataFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataFillerIsMutable(); - dataFiller_.set(index, value); - onChanged(); - } else { - dataFillerBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder setDataFiller( - int index, caffe.Caffe.FillerParameter.Builder builderForValue) { - if (dataFillerBuilder_ == null) { - ensureDataFillerIsMutable(); - dataFiller_.set(index, builderForValue.build()); - onChanged(); - } else { - dataFillerBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder addDataFiller(caffe.Caffe.FillerParameter value) { - if (dataFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataFillerIsMutable(); - dataFiller_.add(value); - onChanged(); - } else { - dataFillerBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder addDataFiller( - int index, caffe.Caffe.FillerParameter value) { - if (dataFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataFillerIsMutable(); - dataFiller_.add(index, value); - onChanged(); - } else { - dataFillerBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder addDataFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (dataFillerBuilder_ == null) { - ensureDataFillerIsMutable(); - dataFiller_.add(builderForValue.build()); - onChanged(); - } else { - dataFillerBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder addDataFiller( - int index, caffe.Caffe.FillerParameter.Builder builderForValue) { - if (dataFillerBuilder_ == null) { - ensureDataFillerIsMutable(); - dataFiller_.add(index, builderForValue.build()); - onChanged(); - } else { - dataFillerBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder addAllDataFiller( - java.lang.Iterable values) { - if (dataFillerBuilder_ == null) { - ensureDataFillerIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dataFiller_); - onChanged(); - } else { - dataFillerBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder clearDataFiller() { - if (dataFillerBuilder_ == null) { - dataFiller_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dataFillerBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public Builder removeDataFiller(int index) { - if (dataFillerBuilder_ == null) { - ensureDataFillerIsMutable(); - dataFiller_.remove(index); - onChanged(); - } else { - dataFillerBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getDataFillerBuilder( - int index) { - return getDataFillerFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( - int index) { - if (dataFillerBuilder_ == null) { - return dataFiller_.get(index); } else { - return dataFillerBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public java.util.List - getDataFillerOrBuilderList() { - if (dataFillerBuilder_ != null) { - return dataFillerBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataFiller_); - } - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder addDataFillerBuilder() { - return getDataFillerFieldBuilder().addBuilder( - caffe.Caffe.FillerParameter.getDefaultInstance()); - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder addDataFillerBuilder( - int index) { - return getDataFillerFieldBuilder().addBuilder( - index, caffe.Caffe.FillerParameter.getDefaultInstance()); - } - /** - * repeated .caffe.FillerParameter data_filler = 1; - * - *
-       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
-       * shape fields, and 0, 1 or N data_fillers.
-       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
-       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
-       * specified, the ith is applied to the ith top blob.
-       * 
- */ - public java.util.List - getDataFillerBuilderList() { - return getDataFillerFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getDataFillerFieldBuilder() { - if (dataFillerBuilder_ == null) { - dataFillerBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - dataFiller_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - dataFiller_ = null; - } - return dataFillerBuilder_; - } - - private java.util.List shape_ = - java.util.Collections.emptyList(); - private void ensureShapeIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - shape_ = new java.util.ArrayList(shape_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_; - - /** - * repeated .caffe.BlobShape shape = 6; - */ - public java.util.List getShapeList() { - if (shapeBuilder_ == null) { - return java.util.Collections.unmodifiableList(shape_); - } else { - return shapeBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public int getShapeCount() { - if (shapeBuilder_ == null) { - return shape_.size(); - } else { - return shapeBuilder_.getCount(); - } - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShape getShape(int index) { - if (shapeBuilder_ == null) { - return shape_.get(index); - } else { - return shapeBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder setShape( - int index, caffe.Caffe.BlobShape value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.set(index, value); - onChanged(); - } else { - shapeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder setShape( - int index, caffe.Caffe.BlobShape.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.set(index, builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder addShape(caffe.Caffe.BlobShape value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.add(value); - onChanged(); - } else { - shapeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder addShape( - int index, caffe.Caffe.BlobShape value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.add(index, value); - onChanged(); - } else { - shapeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder addShape( - caffe.Caffe.BlobShape.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.add(builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder addShape( - int index, caffe.Caffe.BlobShape.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.add(index, builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder addAllShape( - java.lang.Iterable values) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, shape_); - onChanged(); - } else { - shapeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - shapeBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public Builder removeShape(int index) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.remove(index); - onChanged(); - } else { - shapeBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShape.Builder getShapeBuilder( - int index) { - return getShapeFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( - int index) { - if (shapeBuilder_ == null) { - return shape_.get(index); } else { - return shapeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public java.util.List - getShapeOrBuilderList() { - if (shapeBuilder_ != null) { - return shapeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(shape_); - } - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShape.Builder addShapeBuilder() { - return getShapeFieldBuilder().addBuilder( - caffe.Caffe.BlobShape.getDefaultInstance()); - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public caffe.Caffe.BlobShape.Builder addShapeBuilder( - int index) { - return getShapeFieldBuilder().addBuilder( - index, caffe.Caffe.BlobShape.getDefaultInstance()); - } - /** - * repeated .caffe.BlobShape shape = 6; - */ - public java.util.List - getShapeBuilderList() { - return getShapeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> - getShapeFieldBuilder() { - if (shapeBuilder_ == null) { - shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>( - shape_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - shape_ = null; - } - return shapeBuilder_; - } - - private java.util.List num_ = java.util.Collections.emptyList(); - private void ensureNumIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - num_ = new java.util.ArrayList(num_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public java.util.List - getNumList() { - return java.util.Collections.unmodifiableList(num_); - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public int getNumCount() { - return num_.size(); - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public int getNum(int index) { - return num_.get(index); - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public Builder setNum( - int index, int value) { - ensureNumIsMutable(); - num_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public Builder addNum(int value) { - ensureNumIsMutable(); - num_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public Builder addAllNum( - java.lang.Iterable values) { - ensureNumIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, num_); - onChanged(); - return this; - } - /** - * repeated uint32 num = 2; - * - *
-       * 4D dimensions -- deprecated.  Use "shape" instead.
-       * 
- */ - public Builder clearNum() { - num_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private java.util.List channels_ = java.util.Collections.emptyList(); - private void ensureChannelsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - channels_ = new java.util.ArrayList(channels_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated uint32 channels = 3; - */ - public java.util.List - getChannelsList() { - return java.util.Collections.unmodifiableList(channels_); - } - /** - * repeated uint32 channels = 3; - */ - public int getChannelsCount() { - return channels_.size(); - } - /** - * repeated uint32 channels = 3; - */ - public int getChannels(int index) { - return channels_.get(index); - } - /** - * repeated uint32 channels = 3; - */ - public Builder setChannels( - int index, int value) { - ensureChannelsIsMutable(); - channels_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 channels = 3; - */ - public Builder addChannels(int value) { - ensureChannelsIsMutable(); - channels_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 channels = 3; - */ - public Builder addAllChannels( - java.lang.Iterable values) { - ensureChannelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, channels_); - onChanged(); - return this; - } - /** - * repeated uint32 channels = 3; - */ - public Builder clearChannels() { - channels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private java.util.List height_ = java.util.Collections.emptyList(); - private void ensureHeightIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - height_ = new java.util.ArrayList(height_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated uint32 height = 4; - */ - public java.util.List - getHeightList() { - return java.util.Collections.unmodifiableList(height_); - } - /** - * repeated uint32 height = 4; - */ - public int getHeightCount() { - return height_.size(); - } - /** - * repeated uint32 height = 4; - */ - public int getHeight(int index) { - return height_.get(index); - } - /** - * repeated uint32 height = 4; - */ - public Builder setHeight( - int index, int value) { - ensureHeightIsMutable(); - height_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 height = 4; - */ - public Builder addHeight(int value) { - ensureHeightIsMutable(); - height_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 height = 4; - */ - public Builder addAllHeight( - java.lang.Iterable values) { - ensureHeightIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, height_); - onChanged(); - return this; - } - /** - * repeated uint32 height = 4; - */ - public Builder clearHeight() { - height_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private java.util.List width_ = java.util.Collections.emptyList(); - private void ensureWidthIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - width_ = new java.util.ArrayList(width_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated uint32 width = 5; - */ - public java.util.List - getWidthList() { - return java.util.Collections.unmodifiableList(width_); - } - /** - * repeated uint32 width = 5; - */ - public int getWidthCount() { - return width_.size(); - } - /** - * repeated uint32 width = 5; - */ - public int getWidth(int index) { - return width_.get(index); - } - /** - * repeated uint32 width = 5; - */ - public Builder setWidth( - int index, int value) { - ensureWidthIsMutable(); - width_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 width = 5; - */ - public Builder addWidth(int value) { - ensureWidthIsMutable(); - width_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 width = 5; - */ - public Builder addAllWidth( - java.lang.Iterable values) { - ensureWidthIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, width_); - onChanged(); - return this; - } - /** - * repeated uint32 width = 5; - */ - public Builder clearWidth() { - width_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.DummyDataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.DummyDataParameter) - private static final caffe.Caffe.DummyDataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.DummyDataParameter(); - } - - public static caffe.Caffe.DummyDataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DummyDataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DummyDataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.DummyDataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface EltwiseParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.EltwiseParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-     * element-wise operation
-     * 
- */ - boolean hasOperation(); - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-     * element-wise operation
-     * 
- */ - caffe.Caffe.EltwiseParameter.EltwiseOp getOperation(); - - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - java.util.List getCoeffList(); - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - int getCoeffCount(); - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - float getCoeff(int index); - - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-     * of computing the gradient for the PROD operation. (No effect for SUM op.)
-     * 
- */ - boolean hasStableProdGrad(); - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-     * of computing the gradient for the PROD operation. (No effect for SUM op.)
-     * 
- */ - boolean getStableProdGrad(); - } - /** - * Protobuf type {@code caffe.EltwiseParameter} - */ - public static final class EltwiseParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.EltwiseParameter) - EltwiseParameterOrBuilder { - // Use EltwiseParameter.newBuilder() to construct. - private EltwiseParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EltwiseParameter() { - operation_ = 1; - coeff_ = java.util.Collections.emptyList(); - stableProdGrad_ = true; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EltwiseParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.EltwiseParameter.EltwiseOp value = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - operation_ = rawValue; - } - break; - } - case 21: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - coeff_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - coeff_.add(input.readFloat()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { - coeff_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - coeff_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 24: { - bitField0_ |= 0x00000002; - stableProdGrad_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - coeff_ = java.util.Collections.unmodifiableList(coeff_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_EltwiseParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.EltwiseParameter.class, caffe.Caffe.EltwiseParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.EltwiseParameter.EltwiseOp} - */ - public enum EltwiseOp - implements com.google.protobuf.ProtocolMessageEnum { - /** - * PROD = 0; - */ - PROD(0, 0), - /** - * SUM = 1; - */ - SUM(1, 1), - /** - * MAX = 2; - */ - MAX(2, 2), - ; - - /** - * PROD = 0; - */ - public static final int PROD_VALUE = 0; - /** - * SUM = 1; - */ - public static final int SUM_VALUE = 1; - /** - * MAX = 2; - */ - public static final int MAX_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static EltwiseOp valueOf(int value) { - switch (value) { - case 0: return PROD; - case 1: return SUM; - case 2: return MAX; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EltwiseOp> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EltwiseOp findValueByNumber(int number) { - return EltwiseOp.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.EltwiseParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final EltwiseOp[] VALUES = values(); - - public static EltwiseOp 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 EltwiseOp(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.EltwiseParameter.EltwiseOp) - } - - private int bitField0_; - public static final int OPERATION_FIELD_NUMBER = 1; - private int operation_; - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-     * element-wise operation
-     * 
- */ - public boolean hasOperation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-     * element-wise operation
-     * 
- */ - public caffe.Caffe.EltwiseParameter.EltwiseOp getOperation() { - caffe.Caffe.EltwiseParameter.EltwiseOp result = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(operation_); - return result == null ? caffe.Caffe.EltwiseParameter.EltwiseOp.SUM : result; - } - - public static final int COEFF_FIELD_NUMBER = 2; - private java.util.List coeff_; - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - public java.util.List - getCoeffList() { - return coeff_; - } - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - public int getCoeffCount() { - return coeff_.size(); - } - /** - * repeated float coeff = 2; - * - *
-     * blob-wise coefficient for SUM operation
-     * 
- */ - public float getCoeff(int index) { - return coeff_.get(index); - } - - public static final int STABLE_PROD_GRAD_FIELD_NUMBER = 3; - private boolean stableProdGrad_; - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-     * of computing the gradient for the PROD operation. (No effect for SUM op.)
-     * 
- */ - public boolean hasStableProdGrad() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-     * of computing the gradient for the PROD operation. (No effect for SUM op.)
-     * 
- */ - public boolean getStableProdGrad() { - return stableProdGrad_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, operation_); - } - for (int i = 0; i < coeff_.size(); i++) { - output.writeFloat(2, coeff_.get(i)); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(3, stableProdGrad_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, operation_); - } - { - int dataSize = 0; - dataSize = 4 * getCoeffList().size(); - size += dataSize; - size += 1 * getCoeffList().size(); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, stableProdGrad_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.EltwiseParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.EltwiseParameter 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.EltwiseParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.EltwiseParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.EltwiseParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.EltwiseParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.EltwiseParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.EltwiseParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.EltwiseParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.EltwiseParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.EltwiseParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.EltwiseParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.EltwiseParameter) - caffe.Caffe.EltwiseParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_EltwiseParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.EltwiseParameter.class, caffe.Caffe.EltwiseParameter.Builder.class); - } - - // Construct using caffe.Caffe.EltwiseParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - operation_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - coeff_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - stableProdGrad_ = true; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; - } - - public caffe.Caffe.EltwiseParameter getDefaultInstanceForType() { - return caffe.Caffe.EltwiseParameter.getDefaultInstance(); - } - - public caffe.Caffe.EltwiseParameter build() { - caffe.Caffe.EltwiseParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.EltwiseParameter buildPartial() { - caffe.Caffe.EltwiseParameter result = new caffe.Caffe.EltwiseParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.operation_ = operation_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - coeff_ = java.util.Collections.unmodifiableList(coeff_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.coeff_ = coeff_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; - } - result.stableProdGrad_ = stableProdGrad_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.EltwiseParameter) { - return mergeFrom((caffe.Caffe.EltwiseParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.EltwiseParameter other) { - if (other == caffe.Caffe.EltwiseParameter.getDefaultInstance()) return this; - if (other.hasOperation()) { - setOperation(other.getOperation()); - } - if (!other.coeff_.isEmpty()) { - if (coeff_.isEmpty()) { - coeff_ = other.coeff_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureCoeffIsMutable(); - coeff_.addAll(other.coeff_); - } - onChanged(); - } - if (other.hasStableProdGrad()) { - setStableProdGrad(other.getStableProdGrad()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.EltwiseParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.EltwiseParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int operation_ = 1; - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-       * element-wise operation
-       * 
- */ - public boolean hasOperation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-       * element-wise operation
-       * 
- */ - public caffe.Caffe.EltwiseParameter.EltwiseOp getOperation() { - caffe.Caffe.EltwiseParameter.EltwiseOp result = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(operation_); - return result == null ? caffe.Caffe.EltwiseParameter.EltwiseOp.SUM : result; - } - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-       * element-wise operation
-       * 
- */ - public Builder setOperation(caffe.Caffe.EltwiseParameter.EltwiseOp value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - operation_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; - * - *
-       * element-wise operation
-       * 
- */ - public Builder clearOperation() { - bitField0_ = (bitField0_ & ~0x00000001); - operation_ = 1; - onChanged(); - return this; - } - - private java.util.List coeff_ = java.util.Collections.emptyList(); - private void ensureCoeffIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - coeff_ = new java.util.ArrayList(coeff_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public java.util.List - getCoeffList() { - return java.util.Collections.unmodifiableList(coeff_); - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public int getCoeffCount() { - return coeff_.size(); - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public float getCoeff(int index) { - return coeff_.get(index); - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public Builder setCoeff( - int index, float value) { - ensureCoeffIsMutable(); - coeff_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public Builder addCoeff(float value) { - ensureCoeffIsMutable(); - coeff_.add(value); - onChanged(); - return this; - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public Builder addAllCoeff( - java.lang.Iterable values) { - ensureCoeffIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, coeff_); - onChanged(); - return this; - } - /** - * repeated float coeff = 2; - * - *
-       * blob-wise coefficient for SUM operation
-       * 
- */ - public Builder clearCoeff() { - coeff_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private boolean stableProdGrad_ = true; - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-       * of computing the gradient for the PROD operation. (No effect for SUM op.)
-       * 
- */ - public boolean hasStableProdGrad() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-       * of computing the gradient for the PROD operation. (No effect for SUM op.)
-       * 
- */ - public boolean getStableProdGrad() { - return stableProdGrad_; - } - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-       * of computing the gradient for the PROD operation. (No effect for SUM op.)
-       * 
- */ - public Builder setStableProdGrad(boolean value) { - bitField0_ |= 0x00000004; - stableProdGrad_ = value; - onChanged(); - return this; - } - /** - * optional bool stable_prod_grad = 3 [default = true]; - * - *
-       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
-       * of computing the gradient for the PROD operation. (No effect for SUM op.)
-       * 
- */ - public Builder clearStableProdGrad() { - bitField0_ = (bitField0_ & ~0x00000004); - stableProdGrad_ = true; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.EltwiseParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.EltwiseParameter) - private static final caffe.Caffe.EltwiseParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.EltwiseParameter(); - } - - public static caffe.Caffe.EltwiseParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public EltwiseParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new EltwiseParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.EltwiseParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface EmbedParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.EmbedParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - boolean hasNumOutput(); - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - int getNumOutput(); - - /** - * optional uint32 input_dim = 2; - * - *
-     * The input is given as integers to be interpreted as one-hot
-     * vector indices with dimension num_input.  Hence num_input should be
-     * 1 greater than the maximum possible input value.
-     * 
- */ - boolean hasInputDim(); - /** - * optional uint32 input_dim = 2; - * - *
-     * The input is given as integers to be interpreted as one-hot
-     * vector indices with dimension num_input.  Hence num_input should be
-     * 1 greater than the maximum possible input value.
-     * 
- */ - int getInputDim(); - - /** - * optional bool bias_term = 3 [default = true]; - * - *
-     * Whether to use a bias term
-     * 
- */ - boolean hasBiasTerm(); - /** - * optional bool bias_term = 3 [default = true]; - * - *
-     * Whether to use a bias term
-     * 
- */ - boolean getBiasTerm(); - - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - boolean hasWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameter getWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); - - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - boolean hasBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameter getBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); - } - /** - * Protobuf type {@code caffe.EmbedParameter} - * - *
-   * Message that stores parameters used by EmbedLayer
-   * 
- */ - public static final class EmbedParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.EmbedParameter) - EmbedParameterOrBuilder { - // Use EmbedParameter.newBuilder() to construct. - private EmbedParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EmbedParameter() { - numOutput_ = 0; - inputDim_ = 0; - biasTerm_ = true; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EmbedParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - numOutput_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - inputDim_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - biasTerm_ = input.readBool(); - break; - } - case 34: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = weightFiller_.toBuilder(); - } - weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(weightFiller_); - weightFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 42: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = biasFiller_.toBuilder(); - } - biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(biasFiller_); - biasFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_EmbedParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_EmbedParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.EmbedParameter.class, caffe.Caffe.EmbedParameter.Builder.class); - } - - private int bitField0_; - public static final int NUM_OUTPUT_FIELD_NUMBER = 1; - private int numOutput_; - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public int getNumOutput() { - return numOutput_; - } - - public static final int INPUT_DIM_FIELD_NUMBER = 2; - private int inputDim_; - /** - * optional uint32 input_dim = 2; - * - *
-     * The input is given as integers to be interpreted as one-hot
-     * vector indices with dimension num_input.  Hence num_input should be
-     * 1 greater than the maximum possible input value.
-     * 
- */ - public boolean hasInputDim() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 input_dim = 2; - * - *
-     * The input is given as integers to be interpreted as one-hot
-     * vector indices with dimension num_input.  Hence num_input should be
-     * 1 greater than the maximum possible input value.
-     * 
- */ - public int getInputDim() { - return inputDim_; - } - - public static final int BIAS_TERM_FIELD_NUMBER = 3; - private boolean biasTerm_; - /** - * optional bool bias_term = 3 [default = true]; - * - *
-     * Whether to use a bias term
-     * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bool bias_term = 3 [default = true]; - * - *
-     * Whether to use a bias term
-     * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - - public static final int WEIGHT_FILLER_FIELD_NUMBER = 4; - private caffe.Caffe.FillerParameter weightFiller_; - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - - public static final int BIAS_FILLER_FIELD_NUMBER = 5; - private caffe.Caffe.FillerParameter biasFiller_; - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, inputDim_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, biasTerm_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, getWeightFiller()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, getBiasFiller()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, inputDim_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, biasTerm_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getWeightFiller()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getBiasFiller()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.EmbedParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.EmbedParameter 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.EmbedParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.EmbedParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.EmbedParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.EmbedParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.EmbedParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.EmbedParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.EmbedParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.EmbedParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.EmbedParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.EmbedParameter} - * - *
-     * Message that stores parameters used by EmbedLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.EmbedParameter) - caffe.Caffe.EmbedParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_EmbedParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_EmbedParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.EmbedParameter.class, caffe.Caffe.EmbedParameter.Builder.class); - } - - // Construct using caffe.Caffe.EmbedParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getWeightFillerFieldBuilder(); - getBiasFillerFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - numOutput_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - inputDim_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - biasTerm_ = true; - bitField0_ = (bitField0_ & ~0x00000004); - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_EmbedParameter_descriptor; - } - - public caffe.Caffe.EmbedParameter getDefaultInstanceForType() { - return caffe.Caffe.EmbedParameter.getDefaultInstance(); - } - - public caffe.Caffe.EmbedParameter build() { - caffe.Caffe.EmbedParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.EmbedParameter buildPartial() { - caffe.Caffe.EmbedParameter result = new caffe.Caffe.EmbedParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.numOutput_ = numOutput_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.inputDim_ = inputDim_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.biasTerm_ = biasTerm_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (weightFillerBuilder_ == null) { - result.weightFiller_ = weightFiller_; - } else { - result.weightFiller_ = weightFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (biasFillerBuilder_ == null) { - result.biasFiller_ = biasFiller_; - } else { - result.biasFiller_ = biasFillerBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.EmbedParameter) { - return mergeFrom((caffe.Caffe.EmbedParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.EmbedParameter other) { - if (other == caffe.Caffe.EmbedParameter.getDefaultInstance()) return this; - if (other.hasNumOutput()) { - setNumOutput(other.getNumOutput()); - } - if (other.hasInputDim()) { - setInputDim(other.getInputDim()); - } - if (other.hasBiasTerm()) { - setBiasTerm(other.getBiasTerm()); - } - if (other.hasWeightFiller()) { - mergeWeightFiller(other.getWeightFiller()); - } - if (other.hasBiasFiller()) { - mergeBiasFiller(other.getBiasFiller()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.EmbedParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.EmbedParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int numOutput_ ; - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public int getNumOutput() { - return numOutput_; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder setNumOutput(int value) { - bitField0_ |= 0x00000001; - numOutput_ = value; - onChanged(); - return this; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder clearNumOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - numOutput_ = 0; - onChanged(); - return this; - } - - private int inputDim_ ; - /** - * optional uint32 input_dim = 2; - * - *
-       * The input is given as integers to be interpreted as one-hot
-       * vector indices with dimension num_input.  Hence num_input should be
-       * 1 greater than the maximum possible input value.
-       * 
- */ - public boolean hasInputDim() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 input_dim = 2; - * - *
-       * The input is given as integers to be interpreted as one-hot
-       * vector indices with dimension num_input.  Hence num_input should be
-       * 1 greater than the maximum possible input value.
-       * 
- */ - public int getInputDim() { - return inputDim_; - } - /** - * optional uint32 input_dim = 2; - * - *
-       * The input is given as integers to be interpreted as one-hot
-       * vector indices with dimension num_input.  Hence num_input should be
-       * 1 greater than the maximum possible input value.
-       * 
- */ - public Builder setInputDim(int value) { - bitField0_ |= 0x00000002; - inputDim_ = value; - onChanged(); - return this; - } - /** - * optional uint32 input_dim = 2; - * - *
-       * The input is given as integers to be interpreted as one-hot
-       * vector indices with dimension num_input.  Hence num_input should be
-       * 1 greater than the maximum possible input value.
-       * 
- */ - public Builder clearInputDim() { - bitField0_ = (bitField0_ & ~0x00000002); - inputDim_ = 0; - onChanged(); - return this; - } - - private boolean biasTerm_ = true; - /** - * optional bool bias_term = 3 [default = true]; - * - *
-       * Whether to use a bias term
-       * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bool bias_term = 3 [default = true]; - * - *
-       * Whether to use a bias term
-       * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - /** - * optional bool bias_term = 3 [default = true]; - * - *
-       * Whether to use a bias term
-       * 
- */ - public Builder setBiasTerm(boolean value) { - bitField0_ |= 0x00000004; - biasTerm_ = value; - onChanged(); - return this; - } - /** - * optional bool bias_term = 3 [default = true]; - * - *
-       * Whether to use a bias term
-       * 
- */ - public Builder clearBiasTerm() { - bitField0_ = (bitField0_ & ~0x00000004); - biasTerm_ = true; - onChanged(); - return this; - } - - private caffe.Caffe.FillerParameter weightFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - if (weightFillerBuilder_ == null) { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } else { - return weightFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - weightFiller_ = value; - onChanged(); - } else { - weightFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (weightFillerBuilder_ == null) { - weightFiller_ = builderForValue.build(); - onChanged(); - } else { - weightFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - weightFiller_ != null && - weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - weightFiller_ = - caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); - } else { - weightFiller_ = value; - } - onChanged(); - } else { - weightFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder clearWeightFiller() { - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - onChanged(); - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWeightFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - if (weightFillerBuilder_ != null) { - return weightFillerBuilder_.getMessageOrBuilder(); - } else { - return weightFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - } - /** - * optional .caffe.FillerParameter weight_filler = 4; - * - *
-       * The filler for the weight
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getWeightFillerFieldBuilder() { - if (weightFillerBuilder_ == null) { - weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getWeightFiller(), - getParentForChildren(), - isClean()); - weightFiller_ = null; - } - return weightFillerBuilder_; - } - - private caffe.Caffe.FillerParameter biasFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - if (biasFillerBuilder_ == null) { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } else { - return biasFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - biasFiller_ = value; - onChanged(); - } else { - biasFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (biasFillerBuilder_ == null) { - biasFiller_ = builderForValue.build(); - onChanged(); - } else { - biasFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - biasFiller_ != null && - biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - biasFiller_ = - caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); - } else { - biasFiller_ = value; - } - onChanged(); - } else { - biasFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder clearBiasFiller() { - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - onChanged(); - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getBiasFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - if (biasFillerBuilder_ != null) { - return biasFillerBuilder_.getMessageOrBuilder(); - } else { - return biasFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - } - /** - * optional .caffe.FillerParameter bias_filler = 5; - * - *
-       * The filler for the bias
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getBiasFillerFieldBuilder() { - if (biasFillerBuilder_ == null) { - biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getBiasFiller(), - getParentForChildren(), - isClean()); - biasFiller_ = null; - } - return biasFillerBuilder_; - } - - // @@protoc_insertion_point(builder_scope:caffe.EmbedParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.EmbedParameter) - private static final caffe.Caffe.EmbedParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.EmbedParameter(); - } - - public static caffe.Caffe.EmbedParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public EmbedParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new EmbedParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.EmbedParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ExpParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ExpParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float base = 1 [default = -1]; - * - *
-     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = exp(shift + scale * x).
-     * 
- */ - boolean hasBase(); - /** - * optional float base = 1 [default = -1]; - * - *
-     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = exp(shift + scale * x).
-     * 
- */ - float getBase(); - - /** - * optional float scale = 2 [default = 1]; - */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - */ - float getScale(); - - /** - * optional float shift = 3 [default = 0]; - */ - boolean hasShift(); - /** - * optional float shift = 3 [default = 0]; - */ - float getShift(); - } - /** - * Protobuf type {@code caffe.ExpParameter} - * - *
-   * Message that stores parameters used by ExpLayer
-   * 
- */ - public static final class ExpParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ExpParameter) - ExpParameterOrBuilder { - // Use ExpParameter.newBuilder() to construct. - private ExpParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ExpParameter() { - base_ = -1F; - scale_ = 1F; - shift_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExpParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - base_ = input.readFloat(); - break; - } - case 21: { - bitField0_ |= 0x00000002; - scale_ = input.readFloat(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - shift_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ExpParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ExpParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ExpParameter.class, caffe.Caffe.ExpParameter.Builder.class); - } - - private int bitField0_; - public static final int BASE_FIELD_NUMBER = 1; - private float base_; - /** - * optional float base = 1 [default = -1]; - * - *
-     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = exp(shift + scale * x).
-     * 
- */ - public boolean hasBase() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float base = 1 [default = -1]; - * - *
-     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = exp(shift + scale * x).
-     * 
- */ - public float getBase() { - return base_; - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - - public static final int SHIFT_FIELD_NUMBER = 3; - private float shift_; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, base_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, shift_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, base_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, shift_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ExpParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ExpParameter 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.ExpParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ExpParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ExpParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ExpParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ExpParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ExpParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ExpParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ExpParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ExpParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ExpParameter} - * - *
-     * Message that stores parameters used by ExpLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ExpParameter) - caffe.Caffe.ExpParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ExpParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ExpParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ExpParameter.class, caffe.Caffe.ExpParameter.Builder.class); - } - - // Construct using caffe.Caffe.ExpParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - base_ = -1F; - bitField0_ = (bitField0_ & ~0x00000001); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000002); - shift_ = 0F; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ExpParameter_descriptor; - } - - public caffe.Caffe.ExpParameter getDefaultInstanceForType() { - return caffe.Caffe.ExpParameter.getDefaultInstance(); - } - - public caffe.Caffe.ExpParameter build() { - caffe.Caffe.ExpParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ExpParameter buildPartial() { - caffe.Caffe.ExpParameter result = new caffe.Caffe.ExpParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.base_ = base_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.shift_ = shift_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ExpParameter) { - return mergeFrom((caffe.Caffe.ExpParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ExpParameter other) { - if (other == caffe.Caffe.ExpParameter.getDefaultInstance()) return this; - if (other.hasBase()) { - setBase(other.getBase()); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasShift()) { - setShift(other.getShift()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ExpParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ExpParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float base_ = -1F; - /** - * optional float base = 1 [default = -1]; - * - *
-       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = exp(shift + scale * x).
-       * 
- */ - public boolean hasBase() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = exp(shift + scale * x).
-       * 
- */ - public float getBase() { - return base_; - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = exp(shift + scale * x).
-       * 
- */ - public Builder setBase(float value) { - bitField0_ |= 0x00000001; - base_ = value; - onChanged(); - return this; - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = exp(shift + scale * x).
-       * 
- */ - public Builder clearBase() { - bitField0_ = (bitField0_ & ~0x00000001); - base_ = -1F; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder setScale(float value) { - bitField0_ |= 0x00000002; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000002); - scale_ = 1F; - onChanged(); - return this; - } - - private float shift_ ; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder setShift(float value) { - bitField0_ |= 0x00000004; - shift_ = value; - onChanged(); - return this; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder clearShift() { - bitField0_ = (bitField0_ & ~0x00000004); - shift_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ExpParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ExpParameter) - private static final caffe.Caffe.ExpParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ExpParameter(); - } - - public static caffe.Caffe.ExpParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ExpParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ExpParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ExpParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface FlattenParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.FlattenParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The first axis to flatten: all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The first axis to flatten: all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - int getAxis(); - - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-     * The last axis to flatten: all following axes are retained in the output.
-     * May be negative to index from the end (e.g., the default -1 for the last
-     * axis).
-     * 
- */ - boolean hasEndAxis(); - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-     * The last axis to flatten: all following axes are retained in the output.
-     * May be negative to index from the end (e.g., the default -1 for the last
-     * axis).
-     * 
- */ - int getEndAxis(); - } - /** - * Protobuf type {@code caffe.FlattenParameter} - * - *
-   */ Message that stores parameters used by FlattenLayer
-   * 
- */ - public static final class FlattenParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.FlattenParameter) - FlattenParameterOrBuilder { - // Use FlattenParameter.newBuilder() to construct. - private FlattenParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FlattenParameter() { - axis_ = 1; - endAxis_ = -1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FlattenParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - axis_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - endAxis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_FlattenParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_FlattenParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.FlattenParameter.class, caffe.Caffe.FlattenParameter.Builder.class); - } - - private int bitField0_; - public static final int AXIS_FIELD_NUMBER = 1; - private int axis_; - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The first axis to flatten: all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The first axis to flatten: all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int END_AXIS_FIELD_NUMBER = 2; - private int endAxis_; - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-     * The last axis to flatten: all following axes are retained in the output.
-     * May be negative to index from the end (e.g., the default -1 for the last
-     * axis).
-     * 
- */ - public boolean hasEndAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-     * The last axis to flatten: all following axes are retained in the output.
-     * May be negative to index from the end (e.g., the default -1 for the last
-     * axis).
-     * 
- */ - public int getEndAxis() { - return endAxis_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, axis_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, endAxis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, axis_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, endAxis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.FlattenParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.FlattenParameter 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.FlattenParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.FlattenParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.FlattenParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.FlattenParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.FlattenParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.FlattenParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.FlattenParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.FlattenParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.FlattenParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.FlattenParameter} - * - *
-     */ Message that stores parameters used by FlattenLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.FlattenParameter) - caffe.Caffe.FlattenParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_FlattenParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_FlattenParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.FlattenParameter.class, caffe.Caffe.FlattenParameter.Builder.class); - } - - // Construct using caffe.Caffe.FlattenParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - endAxis_ = -1; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_FlattenParameter_descriptor; - } - - public caffe.Caffe.FlattenParameter getDefaultInstanceForType() { - return caffe.Caffe.FlattenParameter.getDefaultInstance(); - } - - public caffe.Caffe.FlattenParameter build() { - caffe.Caffe.FlattenParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.FlattenParameter buildPartial() { - caffe.Caffe.FlattenParameter result = new caffe.Caffe.FlattenParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.endAxis_ = endAxis_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.FlattenParameter) { - return mergeFrom((caffe.Caffe.FlattenParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.FlattenParameter other) { - if (other == caffe.Caffe.FlattenParameter.getDefaultInstance()) return this; - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasEndAxis()) { - setEndAxis(other.getEndAxis()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.FlattenParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.FlattenParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int axis_ = 1; - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The first axis to flatten: all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The first axis to flatten: all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The first axis to flatten: all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000001; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The first axis to flatten: all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - onChanged(); - return this; - } - - private int endAxis_ = -1; - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-       * The last axis to flatten: all following axes are retained in the output.
-       * May be negative to index from the end (e.g., the default -1 for the last
-       * axis).
-       * 
- */ - public boolean hasEndAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-       * The last axis to flatten: all following axes are retained in the output.
-       * May be negative to index from the end (e.g., the default -1 for the last
-       * axis).
-       * 
- */ - public int getEndAxis() { - return endAxis_; - } - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-       * The last axis to flatten: all following axes are retained in the output.
-       * May be negative to index from the end (e.g., the default -1 for the last
-       * axis).
-       * 
- */ - public Builder setEndAxis(int value) { - bitField0_ |= 0x00000002; - endAxis_ = value; - onChanged(); - return this; - } - /** - * optional int32 end_axis = 2 [default = -1]; - * - *
-       * The last axis to flatten: all following axes are retained in the output.
-       * May be negative to index from the end (e.g., the default -1 for the last
-       * axis).
-       * 
- */ - public Builder clearEndAxis() { - bitField0_ = (bitField0_ & ~0x00000002); - endAxis_ = -1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.FlattenParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.FlattenParameter) - private static final caffe.Caffe.FlattenParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.FlattenParameter(); - } - - public static caffe.Caffe.FlattenParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FlattenParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FlattenParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.FlattenParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HDF5DataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.HDF5DataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - * optional uint32 batch_size = 2; - * - *
-     * Specify the batch size.
-     * 
- */ - boolean hasBatchSize(); - /** - * optional uint32 batch_size = 2; - * - *
-     * Specify the batch size.
-     * 
- */ - int getBatchSize(); - - /** - * optional bool shuffle = 3 [default = false]; - * - *
-     * Specify whether to shuffle the data.
-     * If shuffle == true, the ordering of the HDF5 files is shuffled,
-     * and the ordering of data within any given HDF5 file is shuffled,
-     * but data between different files are not interleaved; all of a file's
-     * data are output (in a random order) before moving onto another file.
-     * 
- */ - boolean hasShuffle(); - /** - * optional bool shuffle = 3 [default = false]; - * - *
-     * Specify whether to shuffle the data.
-     * If shuffle == true, the ordering of the HDF5 files is shuffled,
-     * and the ordering of data within any given HDF5 file is shuffled,
-     * but data between different files are not interleaved; all of a file's
-     * data are output (in a random order) before moving onto another file.
-     * 
- */ - boolean getShuffle(); - } - /** - * Protobuf type {@code caffe.HDF5DataParameter} - * - *
-   * Message that stores parameters used by HDF5DataLayer
-   * 
- */ - public static final class HDF5DataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.HDF5DataParameter) - HDF5DataParameterOrBuilder { - // Use HDF5DataParameter.newBuilder() to construct. - private HDF5DataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private HDF5DataParameter() { - source_ = ""; - batchSize_ = 0; - shuffle_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HDF5DataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - source_ = bs; - break; - } - case 16: { - bitField0_ |= 0x00000002; - batchSize_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - shuffle_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_HDF5DataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HDF5DataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HDF5DataParameter.class, caffe.Caffe.HDF5DataParameter.Builder.class); - } - - private int bitField0_; - public static final int SOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 2; - private int batchSize_; - /** - * optional uint32 batch_size = 2; - * - *
-     * Specify the batch size.
-     * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 2; - * - *
-     * Specify the batch size.
-     * 
- */ - public int getBatchSize() { - return batchSize_; - } - - public static final int SHUFFLE_FIELD_NUMBER = 3; - private boolean shuffle_; - /** - * optional bool shuffle = 3 [default = false]; - * - *
-     * Specify whether to shuffle the data.
-     * If shuffle == true, the ordering of the HDF5 files is shuffled,
-     * and the ordering of data within any given HDF5 file is shuffled,
-     * but data between different files are not interleaved; all of a file's
-     * data are output (in a random order) before moving onto another file.
-     * 
- */ - public boolean hasShuffle() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bool shuffle = 3 [default = false]; - * - *
-     * Specify whether to shuffle the data.
-     * If shuffle == true, the ordering of the HDF5 files is shuffled,
-     * and the ordering of data within any given HDF5 file is shuffled,
-     * but data between different files are not interleaved; all of a file's
-     * data are output (in a random order) before moving onto another file.
-     * 
- */ - public boolean getShuffle() { - return shuffle_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, batchSize_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, shuffle_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, batchSize_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, shuffle_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.HDF5DataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HDF5DataParameter 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.HDF5DataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HDF5DataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.HDF5DataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HDF5DataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.HDF5DataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.HDF5DataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.HDF5DataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HDF5DataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.HDF5DataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.HDF5DataParameter} - * - *
-     * Message that stores parameters used by HDF5DataLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.HDF5DataParameter) - caffe.Caffe.HDF5DataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_HDF5DataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HDF5DataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HDF5DataParameter.class, caffe.Caffe.HDF5DataParameter.Builder.class); - } - - // Construct using caffe.Caffe.HDF5DataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - batchSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - shuffle_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_HDF5DataParameter_descriptor; - } - - public caffe.Caffe.HDF5DataParameter getDefaultInstanceForType() { - return caffe.Caffe.HDF5DataParameter.getDefaultInstance(); - } - - public caffe.Caffe.HDF5DataParameter build() { - caffe.Caffe.HDF5DataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.HDF5DataParameter buildPartial() { - caffe.Caffe.HDF5DataParameter result = new caffe.Caffe.HDF5DataParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.batchSize_ = batchSize_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.shuffle_ = shuffle_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.HDF5DataParameter) { - return mergeFrom((caffe.Caffe.HDF5DataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.HDF5DataParameter other) { - if (other == caffe.Caffe.HDF5DataParameter.getDefaultInstance()) return this; - if (other.hasSource()) { - bitField0_ |= 0x00000001; - source_ = other.source_; - onChanged(); - } - if (other.hasBatchSize()) { - setBatchSize(other.getBatchSize()); - } - if (other.hasShuffle()) { - setShuffle(other.getShuffle()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.HDF5DataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.HDF5DataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object source_ = ""; - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000001); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - - private int batchSize_ ; - /** - * optional uint32 batch_size = 2; - * - *
-       * Specify the batch size.
-       * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 2; - * - *
-       * Specify the batch size.
-       * 
- */ - public int getBatchSize() { - return batchSize_; - } - /** - * optional uint32 batch_size = 2; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder setBatchSize(int value) { - bitField0_ |= 0x00000002; - batchSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batch_size = 2; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder clearBatchSize() { - bitField0_ = (bitField0_ & ~0x00000002); - batchSize_ = 0; - onChanged(); - return this; - } - - private boolean shuffle_ ; - /** - * optional bool shuffle = 3 [default = false]; - * - *
-       * Specify whether to shuffle the data.
-       * If shuffle == true, the ordering of the HDF5 files is shuffled,
-       * and the ordering of data within any given HDF5 file is shuffled,
-       * but data between different files are not interleaved; all of a file's
-       * data are output (in a random order) before moving onto another file.
-       * 
- */ - public boolean hasShuffle() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bool shuffle = 3 [default = false]; - * - *
-       * Specify whether to shuffle the data.
-       * If shuffle == true, the ordering of the HDF5 files is shuffled,
-       * and the ordering of data within any given HDF5 file is shuffled,
-       * but data between different files are not interleaved; all of a file's
-       * data are output (in a random order) before moving onto another file.
-       * 
- */ - public boolean getShuffle() { - return shuffle_; - } - /** - * optional bool shuffle = 3 [default = false]; - * - *
-       * Specify whether to shuffle the data.
-       * If shuffle == true, the ordering of the HDF5 files is shuffled,
-       * and the ordering of data within any given HDF5 file is shuffled,
-       * but data between different files are not interleaved; all of a file's
-       * data are output (in a random order) before moving onto another file.
-       * 
- */ - public Builder setShuffle(boolean value) { - bitField0_ |= 0x00000004; - shuffle_ = value; - onChanged(); - return this; - } - /** - * optional bool shuffle = 3 [default = false]; - * - *
-       * Specify whether to shuffle the data.
-       * If shuffle == true, the ordering of the HDF5 files is shuffled,
-       * and the ordering of data within any given HDF5 file is shuffled,
-       * but data between different files are not interleaved; all of a file's
-       * data are output (in a random order) before moving onto another file.
-       * 
- */ - public Builder clearShuffle() { - bitField0_ = (bitField0_ & ~0x00000004); - shuffle_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.HDF5DataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.HDF5DataParameter) - private static final caffe.Caffe.HDF5DataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.HDF5DataParameter(); - } - - public static caffe.Caffe.HDF5DataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HDF5DataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new HDF5DataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.HDF5DataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HDF5OutputParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.HDF5OutputParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string file_name = 1; - */ - boolean hasFileName(); - /** - * optional string file_name = 1; - */ - java.lang.String getFileName(); - /** - * optional string file_name = 1; - */ - com.google.protobuf.ByteString - getFileNameBytes(); - } - /** - * Protobuf type {@code caffe.HDF5OutputParameter} - */ - public static final class HDF5OutputParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.HDF5OutputParameter) - HDF5OutputParameterOrBuilder { - // Use HDF5OutputParameter.newBuilder() to construct. - private HDF5OutputParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private HDF5OutputParameter() { - fileName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HDF5OutputParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - fileName_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_HDF5OutputParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HDF5OutputParameter.class, caffe.Caffe.HDF5OutputParameter.Builder.class); - } - - private int bitField0_; - public static final int FILE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fileName_; - /** - * optional string file_name = 1; - */ - public boolean hasFileName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string file_name = 1; - */ - public java.lang.String getFileName() { - java.lang.Object ref = fileName_; - 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()) { - fileName_ = s; - } - return s; - } - } - /** - * optional string file_name = 1; - */ - public com.google.protobuf.ByteString - getFileNameBytes() { - java.lang.Object ref = fileName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, fileName_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fileName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.HDF5OutputParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HDF5OutputParameter 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.HDF5OutputParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HDF5OutputParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.HDF5OutputParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HDF5OutputParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.HDF5OutputParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.HDF5OutputParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.HDF5OutputParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HDF5OutputParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.HDF5OutputParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.HDF5OutputParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.HDF5OutputParameter) - caffe.Caffe.HDF5OutputParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HDF5OutputParameter.class, caffe.Caffe.HDF5OutputParameter.Builder.class); - } - - // Construct using caffe.Caffe.HDF5OutputParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - fileName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_descriptor; - } - - public caffe.Caffe.HDF5OutputParameter getDefaultInstanceForType() { - return caffe.Caffe.HDF5OutputParameter.getDefaultInstance(); - } - - public caffe.Caffe.HDF5OutputParameter build() { - caffe.Caffe.HDF5OutputParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.HDF5OutputParameter buildPartial() { - caffe.Caffe.HDF5OutputParameter result = new caffe.Caffe.HDF5OutputParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.fileName_ = fileName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.HDF5OutputParameter) { - return mergeFrom((caffe.Caffe.HDF5OutputParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.HDF5OutputParameter other) { - if (other == caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) return this; - if (other.hasFileName()) { - bitField0_ |= 0x00000001; - fileName_ = other.fileName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.HDF5OutputParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.HDF5OutputParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object fileName_ = ""; - /** - * optional string file_name = 1; - */ - public boolean hasFileName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string file_name = 1; - */ - public java.lang.String getFileName() { - java.lang.Object ref = fileName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - fileName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string file_name = 1; - */ - public com.google.protobuf.ByteString - getFileNameBytes() { - java.lang.Object ref = fileName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string file_name = 1; - */ - public Builder setFileName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fileName_ = value; - onChanged(); - return this; - } - /** - * optional string file_name = 1; - */ - public Builder clearFileName() { - bitField0_ = (bitField0_ & ~0x00000001); - fileName_ = getDefaultInstance().getFileName(); - onChanged(); - return this; - } - /** - * optional string file_name = 1; - */ - public Builder setFileNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fileName_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.HDF5OutputParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.HDF5OutputParameter) - private static final caffe.Caffe.HDF5OutputParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.HDF5OutputParameter(); - } - - public static caffe.Caffe.HDF5OutputParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HDF5OutputParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new HDF5OutputParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.HDF5OutputParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HingeLossParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.HingeLossParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-     * Specify the Norm to use L1 or L2
-     * 
- */ - boolean hasNorm(); - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-     * Specify the Norm to use L1 or L2
-     * 
- */ - caffe.Caffe.HingeLossParameter.Norm getNorm(); - } - /** - * Protobuf type {@code caffe.HingeLossParameter} - */ - public static final class HingeLossParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.HingeLossParameter) - HingeLossParameterOrBuilder { - // Use HingeLossParameter.newBuilder() to construct. - private HingeLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private HingeLossParameter() { - norm_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HingeLossParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.HingeLossParameter.Norm value = caffe.Caffe.HingeLossParameter.Norm.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - norm_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_HingeLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HingeLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HingeLossParameter.class, caffe.Caffe.HingeLossParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.HingeLossParameter.Norm} - */ - public enum Norm - implements com.google.protobuf.ProtocolMessageEnum { - /** - * L1 = 1; - */ - L1(0, 1), - /** - * L2 = 2; - */ - L2(1, 2), - ; - - /** - * L1 = 1; - */ - public static final int L1_VALUE = 1; - /** - * L2 = 2; - */ - public static final int L2_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Norm valueOf(int value) { - switch (value) { - case 1: return L1; - case 2: return L2; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Norm> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Norm findValueByNumber(int number) { - return Norm.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.HingeLossParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Norm[] VALUES = values(); - - public static Norm 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 Norm(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.HingeLossParameter.Norm) - } - - private int bitField0_; - public static final int NORM_FIELD_NUMBER = 1; - private int norm_; - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-     * Specify the Norm to use L1 or L2
-     * 
- */ - public boolean hasNorm() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-     * Specify the Norm to use L1 or L2
-     * 
- */ - public caffe.Caffe.HingeLossParameter.Norm getNorm() { - caffe.Caffe.HingeLossParameter.Norm result = caffe.Caffe.HingeLossParameter.Norm.valueOf(norm_); - return result == null ? caffe.Caffe.HingeLossParameter.Norm.L1 : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, norm_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, norm_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.HingeLossParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HingeLossParameter 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.HingeLossParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.HingeLossParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.HingeLossParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HingeLossParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.HingeLossParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.HingeLossParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.HingeLossParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.HingeLossParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.HingeLossParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.HingeLossParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.HingeLossParameter) - caffe.Caffe.HingeLossParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_HingeLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_HingeLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.HingeLossParameter.class, caffe.Caffe.HingeLossParameter.Builder.class); - } - - // Construct using caffe.Caffe.HingeLossParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - norm_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_HingeLossParameter_descriptor; - } - - public caffe.Caffe.HingeLossParameter getDefaultInstanceForType() { - return caffe.Caffe.HingeLossParameter.getDefaultInstance(); - } - - public caffe.Caffe.HingeLossParameter build() { - caffe.Caffe.HingeLossParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.HingeLossParameter buildPartial() { - caffe.Caffe.HingeLossParameter result = new caffe.Caffe.HingeLossParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.norm_ = norm_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.HingeLossParameter) { - return mergeFrom((caffe.Caffe.HingeLossParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.HingeLossParameter other) { - if (other == caffe.Caffe.HingeLossParameter.getDefaultInstance()) return this; - if (other.hasNorm()) { - setNorm(other.getNorm()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.HingeLossParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.HingeLossParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int norm_ = 1; - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-       * Specify the Norm to use L1 or L2
-       * 
- */ - public boolean hasNorm() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-       * Specify the Norm to use L1 or L2
-       * 
- */ - public caffe.Caffe.HingeLossParameter.Norm getNorm() { - caffe.Caffe.HingeLossParameter.Norm result = caffe.Caffe.HingeLossParameter.Norm.valueOf(norm_); - return result == null ? caffe.Caffe.HingeLossParameter.Norm.L1 : result; - } - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-       * Specify the Norm to use L1 or L2
-       * 
- */ - public Builder setNorm(caffe.Caffe.HingeLossParameter.Norm value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - norm_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; - * - *
-       * Specify the Norm to use L1 or L2
-       * 
- */ - public Builder clearNorm() { - bitField0_ = (bitField0_ & ~0x00000001); - norm_ = 1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.HingeLossParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.HingeLossParameter) - private static final caffe.Caffe.HingeLossParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.HingeLossParameter(); - } - - public static caffe.Caffe.HingeLossParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HingeLossParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new HingeLossParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.HingeLossParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ImageDataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ImageDataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-     * Specify the batch size.
-     * 
- */ - boolean hasBatchSize(); - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-     * Specify the batch size.
-     * 
- */ - int getBatchSize(); - - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - boolean hasRandSkip(); - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - int getRandSkip(); - - /** - * optional bool shuffle = 8 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * 
- */ - boolean hasShuffle(); - /** - * optional bool shuffle = 8 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * 
- */ - boolean getShuffle(); - - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - boolean hasNewHeight(); - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - int getNewHeight(); - - /** - * optional uint32 new_width = 10 [default = 0]; - */ - boolean hasNewWidth(); - /** - * optional uint32 new_width = 10 [default = 0]; - */ - int getNewWidth(); - - /** - * optional bool is_color = 11 [default = true]; - * - *
-     * Specify if the images are color or gray
-     * 
- */ - boolean hasIsColor(); - /** - * optional bool is_color = 11 [default = true]; - * - *
-     * Specify if the images are color or gray
-     * 
- */ - boolean getIsColor(); - - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - float getScale(); - - /** - * optional string mean_file = 3; - */ - boolean hasMeanFile(); - /** - * optional string mean_file = 3; - */ - java.lang.String getMeanFile(); - /** - * optional string mean_file = 3; - */ - com.google.protobuf.ByteString - getMeanFileBytes(); - - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - boolean hasCropSize(); - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - int getCropSize(); - - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - boolean hasMirror(); - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - boolean getMirror(); - - /** - * optional string root_folder = 12 [default = ""]; - */ - boolean hasRootFolder(); - /** - * optional string root_folder = 12 [default = ""]; - */ - java.lang.String getRootFolder(); - /** - * optional string root_folder = 12 [default = ""]; - */ - com.google.protobuf.ByteString - getRootFolderBytes(); - } - /** - * Protobuf type {@code caffe.ImageDataParameter} - */ - public static final class ImageDataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ImageDataParameter) - ImageDataParameterOrBuilder { - // Use ImageDataParameter.newBuilder() to construct. - private ImageDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ImageDataParameter() { - source_ = ""; - batchSize_ = 1; - randSkip_ = 0; - shuffle_ = false; - newHeight_ = 0; - newWidth_ = 0; - isColor_ = true; - scale_ = 1F; - meanFile_ = ""; - cropSize_ = 0; - mirror_ = false; - rootFolder_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageDataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - source_ = bs; - break; - } - case 21: { - bitField0_ |= 0x00000080; - scale_ = input.readFloat(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000100; - meanFile_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000002; - batchSize_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000200; - cropSize_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000400; - mirror_ = input.readBool(); - break; - } - case 56: { - bitField0_ |= 0x00000004; - randSkip_ = input.readUInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000008; - shuffle_ = input.readBool(); - break; - } - case 72: { - bitField0_ |= 0x00000010; - newHeight_ = input.readUInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000020; - newWidth_ = input.readUInt32(); - break; - } - case 88: { - bitField0_ |= 0x00000040; - isColor_ = input.readBool(); - break; - } - case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000800; - rootFolder_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ImageDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ImageDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ImageDataParameter.class, caffe.Caffe.ImageDataParameter.Builder.class); - } - - private int bitField0_; - public static final int SOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 4; - private int batchSize_; - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-     * Specify the batch size.
-     * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-     * Specify the batch size.
-     * 
- */ - public int getBatchSize() { - return batchSize_; - } - - public static final int RAND_SKIP_FIELD_NUMBER = 7; - private int randSkip_; - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - public int getRandSkip() { - return randSkip_; - } - - public static final int SHUFFLE_FIELD_NUMBER = 8; - private boolean shuffle_; - /** - * optional bool shuffle = 8 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * 
- */ - public boolean hasShuffle() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool shuffle = 8 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * 
- */ - public boolean getShuffle() { - return shuffle_; - } - - public static final int NEW_HEIGHT_FIELD_NUMBER = 9; - private int newHeight_; - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - public boolean hasNewHeight() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - public int getNewHeight() { - return newHeight_; - } - - public static final int NEW_WIDTH_FIELD_NUMBER = 10; - private int newWidth_; - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public boolean hasNewWidth() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public int getNewWidth() { - return newWidth_; - } - - public static final int IS_COLOR_FIELD_NUMBER = 11; - private boolean isColor_; - /** - * optional bool is_color = 11 [default = true]; - * - *
-     * Specify if the images are color or gray
-     * 
- */ - public boolean hasIsColor() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool is_color = 11 [default = true]; - * - *
-     * Specify if the images are color or gray
-     * 
- */ - public boolean getIsColor() { - return isColor_; - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-     * simple scaling and subtracting the data mean, if provided. Note that the
-     * mean subtraction is always carried out before scaling.
-     * 
- */ - public float getScale() { - return scale_; - } - - public static final int MEAN_FILE_FIELD_NUMBER = 3; - private volatile java.lang.Object meanFile_; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - 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()) { - meanFile_ = s; - } - return s; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROP_SIZE_FIELD_NUMBER = 5; - private int cropSize_; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-     * crop an image.
-     * 
- */ - public int getCropSize() { - return cropSize_; - } - - public static final int MIRROR_FIELD_NUMBER = 6; - private boolean mirror_; - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-     * data.
-     * 
- */ - public boolean getMirror() { - return mirror_; - } - - public static final int ROOT_FOLDER_FIELD_NUMBER = 12; - private volatile java.lang.Object rootFolder_; - /** - * optional string root_folder = 12 [default = ""]; - */ - public boolean hasRootFolder() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public java.lang.String getRootFolder() { - java.lang.Object ref = rootFolder_; - 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()) { - rootFolder_ = s; - } - return s; - } - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public com.google.protobuf.ByteString - getRootFolderBytes() { - java.lang.Object ref = rootFolder_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(4, batchSize_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt32(5, cropSize_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBool(6, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(7, randSkip_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(8, shuffle_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(9, newHeight_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt32(10, newWidth_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(11, isColor_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - com.google.protobuf.GeneratedMessage.writeString(output, 12, rootFolder_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, batchSize_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, cropSize_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, mirror_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, randSkip_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, shuffle_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, newHeight_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, newWidth_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, isColor_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(12, rootFolder_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ImageDataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ImageDataParameter 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.ImageDataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ImageDataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ImageDataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ImageDataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ImageDataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ImageDataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ImageDataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ImageDataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ImageDataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ImageDataParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ImageDataParameter) - caffe.Caffe.ImageDataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ImageDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ImageDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ImageDataParameter.class, caffe.Caffe.ImageDataParameter.Builder.class); - } - - // Construct using caffe.Caffe.ImageDataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - batchSize_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - randSkip_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - shuffle_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - newHeight_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - newWidth_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - isColor_ = true; - bitField0_ = (bitField0_ & ~0x00000040); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000080); - meanFile_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); - cropSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - mirror_ = false; - bitField0_ = (bitField0_ & ~0x00000400); - rootFolder_ = ""; - bitField0_ = (bitField0_ & ~0x00000800); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ImageDataParameter_descriptor; - } - - public caffe.Caffe.ImageDataParameter getDefaultInstanceForType() { - return caffe.Caffe.ImageDataParameter.getDefaultInstance(); - } - - public caffe.Caffe.ImageDataParameter build() { - caffe.Caffe.ImageDataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ImageDataParameter buildPartial() { - caffe.Caffe.ImageDataParameter result = new caffe.Caffe.ImageDataParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.batchSize_ = batchSize_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.randSkip_ = randSkip_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.shuffle_ = shuffle_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.newHeight_ = newHeight_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.newWidth_ = newWidth_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.isColor_ = isColor_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.meanFile_ = meanFile_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.cropSize_ = cropSize_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.mirror_ = mirror_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.rootFolder_ = rootFolder_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ImageDataParameter) { - return mergeFrom((caffe.Caffe.ImageDataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ImageDataParameter other) { - if (other == caffe.Caffe.ImageDataParameter.getDefaultInstance()) return this; - if (other.hasSource()) { - bitField0_ |= 0x00000001; - source_ = other.source_; - onChanged(); - } - if (other.hasBatchSize()) { - setBatchSize(other.getBatchSize()); - } - if (other.hasRandSkip()) { - setRandSkip(other.getRandSkip()); - } - if (other.hasShuffle()) { - setShuffle(other.getShuffle()); - } - if (other.hasNewHeight()) { - setNewHeight(other.getNewHeight()); - } - if (other.hasNewWidth()) { - setNewWidth(other.getNewWidth()); - } - if (other.hasIsColor()) { - setIsColor(other.getIsColor()); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasMeanFile()) { - bitField0_ |= 0x00000100; - meanFile_ = other.meanFile_; - onChanged(); - } - if (other.hasCropSize()) { - setCropSize(other.getCropSize()); - } - if (other.hasMirror()) { - setMirror(other.getMirror()); - } - if (other.hasRootFolder()) { - bitField0_ |= 0x00000800; - rootFolder_ = other.rootFolder_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ImageDataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ImageDataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object source_ = ""; - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000001); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - - private int batchSize_ = 1; - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-       * Specify the batch size.
-       * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-       * Specify the batch size.
-       * 
- */ - public int getBatchSize() { - return batchSize_; - } - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder setBatchSize(int value) { - bitField0_ |= 0x00000002; - batchSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batch_size = 4 [default = 1]; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder clearBatchSize() { - bitField0_ = (bitField0_ & ~0x00000002); - batchSize_ = 1; - onChanged(); - return this; - } - - private int randSkip_ ; - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public int getRandSkip() { - return randSkip_; - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public Builder setRandSkip(int value) { - bitField0_ |= 0x00000004; - randSkip_ = value; - onChanged(); - return this; - } - /** - * optional uint32 rand_skip = 7 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public Builder clearRandSkip() { - bitField0_ = (bitField0_ & ~0x00000004); - randSkip_ = 0; - onChanged(); - return this; - } - - private boolean shuffle_ ; - /** - * optional bool shuffle = 8 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * 
- */ - public boolean hasShuffle() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool shuffle = 8 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * 
- */ - public boolean getShuffle() { - return shuffle_; - } - /** - * optional bool shuffle = 8 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * 
- */ - public Builder setShuffle(boolean value) { - bitField0_ |= 0x00000008; - shuffle_ = value; - onChanged(); - return this; - } - /** - * optional bool shuffle = 8 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * 
- */ - public Builder clearShuffle() { - bitField0_ = (bitField0_ & ~0x00000008); - shuffle_ = false; - onChanged(); - return this; - } - - private int newHeight_ ; - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public boolean hasNewHeight() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public int getNewHeight() { - return newHeight_; - } - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public Builder setNewHeight(int value) { - bitField0_ |= 0x00000010; - newHeight_ = value; - onChanged(); - return this; - } - /** - * optional uint32 new_height = 9 [default = 0]; - * - *
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public Builder clearNewHeight() { - bitField0_ = (bitField0_ & ~0x00000010); - newHeight_ = 0; - onChanged(); - return this; - } - - private int newWidth_ ; - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public boolean hasNewWidth() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public int getNewWidth() { - return newWidth_; - } - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public Builder setNewWidth(int value) { - bitField0_ |= 0x00000020; - newWidth_ = value; - onChanged(); - return this; - } - /** - * optional uint32 new_width = 10 [default = 0]; - */ - public Builder clearNewWidth() { - bitField0_ = (bitField0_ & ~0x00000020); - newWidth_ = 0; - onChanged(); - return this; - } - - private boolean isColor_ = true; - /** - * optional bool is_color = 11 [default = true]; - * - *
-       * Specify if the images are color or gray
-       * 
- */ - public boolean hasIsColor() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool is_color = 11 [default = true]; - * - *
-       * Specify if the images are color or gray
-       * 
- */ - public boolean getIsColor() { - return isColor_; - } - /** - * optional bool is_color = 11 [default = true]; - * - *
-       * Specify if the images are color or gray
-       * 
- */ - public Builder setIsColor(boolean value) { - bitField0_ |= 0x00000040; - isColor_ = value; - onChanged(); - return this; - } - /** - * optional bool is_color = 11 [default = true]; - * - *
-       * Specify if the images are color or gray
-       * 
- */ - public Builder clearIsColor() { - bitField0_ = (bitField0_ & ~0x00000040); - isColor_ = true; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public Builder setScale(float value) { - bitField0_ |= 0x00000080; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
-       * simple scaling and subtracting the data mean, if provided. Note that the
-       * mean subtraction is always carried out before scaling.
-       * 
- */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000080); - scale_ = 1F; - onChanged(); - return this; - } - - private java.lang.Object meanFile_ = ""; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - meanFile_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - meanFile_ = value; - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder clearMeanFile() { - bitField0_ = (bitField0_ & ~0x00000100); - meanFile_ = getDefaultInstance().getMeanFile(); - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - meanFile_ = value; - onChanged(); - return this; - } - - private int cropSize_ ; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public int getCropSize() { - return cropSize_; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public Builder setCropSize(int value) { - bitField0_ |= 0x00000200; - cropSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
-       * crop an image.
-       * 
- */ - public Builder clearCropSize() { - bitField0_ = (bitField0_ & ~0x00000200); - cropSize_ = 0; - onChanged(); - return this; - } - - private boolean mirror_ ; - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public boolean getMirror() { - return mirror_; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public Builder setMirror(boolean value) { - bitField0_ |= 0x00000400; - mirror_ = value; - onChanged(); - return this; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
-       * data.
-       * 
- */ - public Builder clearMirror() { - bitField0_ = (bitField0_ & ~0x00000400); - mirror_ = false; - onChanged(); - return this; - } - - private java.lang.Object rootFolder_ = ""; - /** - * optional string root_folder = 12 [default = ""]; - */ - public boolean hasRootFolder() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public java.lang.String getRootFolder() { - java.lang.Object ref = rootFolder_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - rootFolder_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public com.google.protobuf.ByteString - getRootFolderBytes() { - java.lang.Object ref = rootFolder_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public Builder setRootFolder( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - rootFolder_ = value; - onChanged(); - return this; - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public Builder clearRootFolder() { - bitField0_ = (bitField0_ & ~0x00000800); - rootFolder_ = getDefaultInstance().getRootFolder(); - onChanged(); - return this; - } - /** - * optional string root_folder = 12 [default = ""]; - */ - public Builder setRootFolderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - rootFolder_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ImageDataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ImageDataParameter) - private static final caffe.Caffe.ImageDataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ImageDataParameter(); - } - - public static caffe.Caffe.ImageDataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ImageDataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ImageDataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ImageDataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface InfogainLossParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.InfogainLossParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - } - /** - * Protobuf type {@code caffe.InfogainLossParameter} - */ - public static final class InfogainLossParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.InfogainLossParameter) - InfogainLossParameterOrBuilder { - // Use InfogainLossParameter.newBuilder() to construct. - private InfogainLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private InfogainLossParameter() { - source_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfogainLossParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - source_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_InfogainLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_InfogainLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.InfogainLossParameter.class, caffe.Caffe.InfogainLossParameter.Builder.class); - } - - private int bitField0_; - public static final int SOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 1; - * - *
-     * Specify the infogain matrix source.
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.InfogainLossParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.InfogainLossParameter 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.InfogainLossParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.InfogainLossParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.InfogainLossParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.InfogainLossParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.InfogainLossParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.InfogainLossParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.InfogainLossParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.InfogainLossParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.InfogainLossParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.InfogainLossParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.InfogainLossParameter) - caffe.Caffe.InfogainLossParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_InfogainLossParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_InfogainLossParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.InfogainLossParameter.class, caffe.Caffe.InfogainLossParameter.Builder.class); - } - - // Construct using caffe.Caffe.InfogainLossParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_InfogainLossParameter_descriptor; - } - - public caffe.Caffe.InfogainLossParameter getDefaultInstanceForType() { - return caffe.Caffe.InfogainLossParameter.getDefaultInstance(); - } - - public caffe.Caffe.InfogainLossParameter build() { - caffe.Caffe.InfogainLossParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.InfogainLossParameter buildPartial() { - caffe.Caffe.InfogainLossParameter result = new caffe.Caffe.InfogainLossParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.source_ = source_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.InfogainLossParameter) { - return mergeFrom((caffe.Caffe.InfogainLossParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.InfogainLossParameter other) { - if (other == caffe.Caffe.InfogainLossParameter.getDefaultInstance()) return this; - if (other.hasSource()) { - bitField0_ |= 0x00000001; - source_ = other.source_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.InfogainLossParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.InfogainLossParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object source_ = ""; - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000001); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the infogain matrix source.
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.InfogainLossParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.InfogainLossParameter) - private static final caffe.Caffe.InfogainLossParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.InfogainLossParameter(); - } - - public static caffe.Caffe.InfogainLossParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public InfogainLossParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new InfogainLossParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.InfogainLossParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface InnerProductParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.InnerProductParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - boolean hasNumOutput(); - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - int getNumOutput(); - - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean hasBiasTerm(); - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean getBiasTerm(); - - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - boolean hasWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameter getWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); - - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - boolean hasBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameter getBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); - - /** - * optional int32 axis = 5 [default = 1]; - * - *
-     * The first axis to be lumped into a single inner product computation;
-     * all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 5 [default = 1]; - * - *
-     * The first axis to be lumped into a single inner product computation;
-     * all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - int getAxis(); - } - /** - * Protobuf type {@code caffe.InnerProductParameter} - */ - public static final class InnerProductParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.InnerProductParameter) - InnerProductParameterOrBuilder { - // Use InnerProductParameter.newBuilder() to construct. - private InnerProductParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private InnerProductParameter() { - numOutput_ = 0; - biasTerm_ = true; - axis_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InnerProductParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - numOutput_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - biasTerm_ = input.readBool(); - break; - } - case 26: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = weightFiller_.toBuilder(); - } - weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(weightFiller_); - weightFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 34: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = biasFiller_.toBuilder(); - } - biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(biasFiller_); - biasFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 40: { - bitField0_ |= 0x00000010; - axis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_InnerProductParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_InnerProductParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.InnerProductParameter.class, caffe.Caffe.InnerProductParameter.Builder.class); - } - - private int bitField0_; - public static final int NUM_OUTPUT_FIELD_NUMBER = 1; - private int numOutput_; - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-     * The number of outputs for the layer
-     * 
- */ - public int getNumOutput() { - return numOutput_; - } - - public static final int BIAS_TERM_FIELD_NUMBER = 2; - private boolean biasTerm_; - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - - public static final int WEIGHT_FILLER_FIELD_NUMBER = 3; - private caffe.Caffe.FillerParameter weightFiller_; - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - - public static final int BIAS_FILLER_FIELD_NUMBER = 4; - private caffe.Caffe.FillerParameter biasFiller_; - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - - public static final int AXIS_FIELD_NUMBER = 5; - private int axis_; - /** - * optional int32 axis = 5 [default = 1]; - * - *
-     * The first axis to be lumped into a single inner product computation;
-     * all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 axis = 5 [default = 1]; - * - *
-     * The first axis to be lumped into a single inner product computation;
-     * all preceding axes are retained in the output.
-     * May be negative to index from the end (e.g., -1 for the last axis).
-     * 
- */ - public int getAxis() { - return axis_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, biasTerm_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, getWeightFiller()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, getBiasFiller()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(5, axis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, numOutput_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, biasTerm_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getWeightFiller()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBiasFiller()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, axis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.InnerProductParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.InnerProductParameter 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.InnerProductParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.InnerProductParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.InnerProductParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.InnerProductParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.InnerProductParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.InnerProductParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.InnerProductParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.InnerProductParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.InnerProductParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.InnerProductParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.InnerProductParameter) - caffe.Caffe.InnerProductParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_InnerProductParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_InnerProductParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.InnerProductParameter.class, caffe.Caffe.InnerProductParameter.Builder.class); - } - - // Construct using caffe.Caffe.InnerProductParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getWeightFillerFieldBuilder(); - getBiasFillerFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - numOutput_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - biasTerm_ = true; - bitField0_ = (bitField0_ & ~0x00000002); - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_InnerProductParameter_descriptor; - } - - public caffe.Caffe.InnerProductParameter getDefaultInstanceForType() { - return caffe.Caffe.InnerProductParameter.getDefaultInstance(); - } - - public caffe.Caffe.InnerProductParameter build() { - caffe.Caffe.InnerProductParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.InnerProductParameter buildPartial() { - caffe.Caffe.InnerProductParameter result = new caffe.Caffe.InnerProductParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.numOutput_ = numOutput_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.biasTerm_ = biasTerm_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (weightFillerBuilder_ == null) { - result.weightFiller_ = weightFiller_; - } else { - result.weightFiller_ = weightFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (biasFillerBuilder_ == null) { - result.biasFiller_ = biasFiller_; - } else { - result.biasFiller_ = biasFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.axis_ = axis_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.InnerProductParameter) { - return mergeFrom((caffe.Caffe.InnerProductParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.InnerProductParameter other) { - if (other == caffe.Caffe.InnerProductParameter.getDefaultInstance()) return this; - if (other.hasNumOutput()) { - setNumOutput(other.getNumOutput()); - } - if (other.hasBiasTerm()) { - setBiasTerm(other.getBiasTerm()); - } - if (other.hasWeightFiller()) { - mergeWeightFiller(other.getWeightFiller()); - } - if (other.hasBiasFiller()) { - mergeBiasFiller(other.getBiasFiller()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.InnerProductParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.InnerProductParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int numOutput_ ; - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public int getNumOutput() { - return numOutput_; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder setNumOutput(int value) { - bitField0_ |= 0x00000001; - numOutput_ = value; - onChanged(); - return this; - } - /** - * optional uint32 num_output = 1; - * - *
-       * The number of outputs for the layer
-       * 
- */ - public Builder clearNumOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - numOutput_ = 0; - onChanged(); - return this; - } - - private boolean biasTerm_ = true; - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean hasBiasTerm() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean getBiasTerm() { - return biasTerm_; - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder setBiasTerm(boolean value) { - bitField0_ |= 0x00000002; - biasTerm_ = value; - onChanged(); - return this; - } - /** - * optional bool bias_term = 2 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder clearBiasTerm() { - bitField0_ = (bitField0_ & ~0x00000002); - biasTerm_ = true; - onChanged(); - return this; - } - - private caffe.Caffe.FillerParameter weightFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - if (weightFillerBuilder_ == null) { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } else { - return weightFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - weightFiller_ = value; - onChanged(); - } else { - weightFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (weightFillerBuilder_ == null) { - weightFiller_ = builderForValue.build(); - onChanged(); - } else { - weightFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - weightFiller_ != null && - weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - weightFiller_ = - caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); - } else { - weightFiller_ = value; - } - onChanged(); - } else { - weightFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder clearWeightFiller() { - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - onChanged(); - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getWeightFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - if (weightFillerBuilder_ != null) { - return weightFillerBuilder_.getMessageOrBuilder(); - } else { - return weightFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - } - /** - * optional .caffe.FillerParameter weight_filler = 3; - * - *
-       * The filler for the weight
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getWeightFillerFieldBuilder() { - if (weightFillerBuilder_ == null) { - weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getWeightFiller(), - getParentForChildren(), - isClean()); - weightFiller_ = null; - } - return weightFillerBuilder_; - } - - private caffe.Caffe.FillerParameter biasFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - if (biasFillerBuilder_ == null) { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } else { - return biasFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - biasFiller_ = value; - onChanged(); - } else { - biasFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (biasFillerBuilder_ == null) { - biasFiller_ = builderForValue.build(); - onChanged(); - } else { - biasFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - biasFiller_ != null && - biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - biasFiller_ = - caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); - } else { - biasFiller_ = value; - } - onChanged(); - } else { - biasFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder clearBiasFiller() { - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - onChanged(); - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getBiasFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - if (biasFillerBuilder_ != null) { - return biasFillerBuilder_.getMessageOrBuilder(); - } else { - return biasFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - } - /** - * optional .caffe.FillerParameter bias_filler = 4; - * - *
-       * The filler for the bias
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getBiasFillerFieldBuilder() { - if (biasFillerBuilder_ == null) { - biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getBiasFiller(), - getParentForChildren(), - isClean()); - biasFiller_ = null; - } - return biasFillerBuilder_; - } - - private int axis_ = 1; - /** - * optional int32 axis = 5 [default = 1]; - * - *
-       * The first axis to be lumped into a single inner product computation;
-       * all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 axis = 5 [default = 1]; - * - *
-       * The first axis to be lumped into a single inner product computation;
-       * all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 5 [default = 1]; - * - *
-       * The first axis to be lumped into a single inner product computation;
-       * all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000010; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 5 [default = 1]; - * - *
-       * The first axis to be lumped into a single inner product computation;
-       * all preceding axes are retained in the output.
-       * May be negative to index from the end (e.g., -1 for the last axis).
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000010); - axis_ = 1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.InnerProductParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.InnerProductParameter) - private static final caffe.Caffe.InnerProductParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.InnerProductParameter(); - } - - public static caffe.Caffe.InnerProductParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public InnerProductParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new InnerProductParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.InnerProductParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LogParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.LogParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float base = 1 [default = -1]; - * - *
-     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-     * 
- */ - boolean hasBase(); - /** - * optional float base = 1 [default = -1]; - * - *
-     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-     * 
- */ - float getBase(); - - /** - * optional float scale = 2 [default = 1]; - */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - */ - float getScale(); - - /** - * optional float shift = 3 [default = 0]; - */ - boolean hasShift(); - /** - * optional float shift = 3 [default = 0]; - */ - float getShift(); - } - /** - * Protobuf type {@code caffe.LogParameter} - * - *
-   * Message that stores parameters used by LogLayer
-   * 
- */ - public static final class LogParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.LogParameter) - LogParameterOrBuilder { - // Use LogParameter.newBuilder() to construct. - private LogParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LogParameter() { - base_ = -1F; - scale_ = 1F; - shift_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LogParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - base_ = input.readFloat(); - break; - } - case 21: { - bitField0_ |= 0x00000002; - scale_ = input.readFloat(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - shift_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_LogParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LogParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LogParameter.class, caffe.Caffe.LogParameter.Builder.class); - } - - private int bitField0_; - public static final int BASE_FIELD_NUMBER = 1; - private float base_; - /** - * optional float base = 1 [default = -1]; - * - *
-     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-     * 
- */ - public boolean hasBase() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float base = 1 [default = -1]; - * - *
-     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-     * Or if base is set to the default (-1), base is set to e,
-     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-     * 
- */ - public float getBase() { - return base_; - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - - public static final int SHIFT_FIELD_NUMBER = 3; - private float shift_; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, base_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, shift_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, base_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, shift_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.LogParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LogParameter 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.LogParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LogParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.LogParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LogParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.LogParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.LogParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.LogParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LogParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.LogParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.LogParameter} - * - *
-     * Message that stores parameters used by LogLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.LogParameter) - caffe.Caffe.LogParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_LogParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LogParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LogParameter.class, caffe.Caffe.LogParameter.Builder.class); - } - - // Construct using caffe.Caffe.LogParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - base_ = -1F; - bitField0_ = (bitField0_ & ~0x00000001); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000002); - shift_ = 0F; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_LogParameter_descriptor; - } - - public caffe.Caffe.LogParameter getDefaultInstanceForType() { - return caffe.Caffe.LogParameter.getDefaultInstance(); - } - - public caffe.Caffe.LogParameter build() { - caffe.Caffe.LogParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.LogParameter buildPartial() { - caffe.Caffe.LogParameter result = new caffe.Caffe.LogParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.base_ = base_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.shift_ = shift_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.LogParameter) { - return mergeFrom((caffe.Caffe.LogParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.LogParameter other) { - if (other == caffe.Caffe.LogParameter.getDefaultInstance()) return this; - if (other.hasBase()) { - setBase(other.getBase()); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasShift()) { - setShift(other.getShift()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.LogParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.LogParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float base_ = -1F; - /** - * optional float base = 1 [default = -1]; - * - *
-       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-       * 
- */ - public boolean hasBase() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-       * 
- */ - public float getBase() { - return base_; - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-       * 
- */ - public Builder setBase(float value) { - bitField0_ |= 0x00000001; - base_ = value; - onChanged(); - return this; - } - /** - * optional float base = 1 [default = -1]; - * - *
-       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
-       * Or if base is set to the default (-1), base is set to e,
-       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
-       * 
- */ - public Builder clearBase() { - bitField0_ = (bitField0_ & ~0x00000001); - base_ = -1F; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder setScale(float value) { - bitField0_ |= 0x00000002; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000002); - scale_ = 1F; - onChanged(); - return this; - } - - private float shift_ ; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder setShift(float value) { - bitField0_ |= 0x00000004; - shift_ = value; - onChanged(); - return this; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder clearShift() { - bitField0_ = (bitField0_ & ~0x00000004); - shift_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.LogParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.LogParameter) - private static final caffe.Caffe.LogParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.LogParameter(); - } - - public static caffe.Caffe.LogParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LogParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LogParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.LogParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LRNParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.LRNParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 local_size = 1 [default = 5]; - */ - boolean hasLocalSize(); - /** - * optional uint32 local_size = 1 [default = 5]; - */ - int getLocalSize(); - - /** - * optional float alpha = 2 [default = 1]; - */ - boolean hasAlpha(); - /** - * optional float alpha = 2 [default = 1]; - */ - float getAlpha(); - - /** - * optional float beta = 3 [default = 0.75]; - */ - boolean hasBeta(); - /** - * optional float beta = 3 [default = 0.75]; - */ - float getBeta(); - - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - boolean hasNormRegion(); - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - caffe.Caffe.LRNParameter.NormRegion getNormRegion(); - - /** - * optional float k = 5 [default = 1]; - */ - boolean hasK(); - /** - * optional float k = 5 [default = 1]; - */ - float getK(); - } - /** - * Protobuf type {@code caffe.LRNParameter} - * - *
-   * Message that stores parameters used by LRNLayer
-   * 
- */ - public static final class LRNParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.LRNParameter) - LRNParameterOrBuilder { - // Use LRNParameter.newBuilder() to construct. - private LRNParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LRNParameter() { - localSize_ = 5; - alpha_ = 1F; - beta_ = 0.75F; - normRegion_ = 0; - k_ = 1F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LRNParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - localSize_ = input.readUInt32(); - break; - } - case 21: { - bitField0_ |= 0x00000002; - alpha_ = input.readFloat(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - beta_ = input.readFloat(); - break; - } - case 32: { - int rawValue = input.readEnum(); - caffe.Caffe.LRNParameter.NormRegion value = caffe.Caffe.LRNParameter.NormRegion.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - normRegion_ = rawValue; - } - break; - } - case 45: { - bitField0_ |= 0x00000010; - k_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_LRNParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LRNParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LRNParameter.class, caffe.Caffe.LRNParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.LRNParameter.NormRegion} - */ - public enum NormRegion - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACROSS_CHANNELS = 0; - */ - ACROSS_CHANNELS(0, 0), - /** - * WITHIN_CHANNEL = 1; - */ - WITHIN_CHANNEL(1, 1), - ; - - /** - * ACROSS_CHANNELS = 0; - */ - public static final int ACROSS_CHANNELS_VALUE = 0; - /** - * WITHIN_CHANNEL = 1; - */ - public static final int WITHIN_CHANNEL_VALUE = 1; - - - public final int getNumber() { - return value; - } - - public static NormRegion valueOf(int value) { - switch (value) { - case 0: return ACROSS_CHANNELS; - case 1: return WITHIN_CHANNEL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NormRegion> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public NormRegion findValueByNumber(int number) { - return NormRegion.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.LRNParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final NormRegion[] VALUES = values(); - - public static NormRegion 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 NormRegion(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.LRNParameter.NormRegion) - } - - private int bitField0_; - public static final int LOCAL_SIZE_FIELD_NUMBER = 1; - private int localSize_; - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public boolean hasLocalSize() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public int getLocalSize() { - return localSize_; - } - - public static final int ALPHA_FIELD_NUMBER = 2; - private float alpha_; - /** - * optional float alpha = 2 [default = 1]; - */ - public boolean hasAlpha() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float alpha = 2 [default = 1]; - */ - public float getAlpha() { - return alpha_; - } - - public static final int BETA_FIELD_NUMBER = 3; - private float beta_; - /** - * optional float beta = 3 [default = 0.75]; - */ - public boolean hasBeta() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float beta = 3 [default = 0.75]; - */ - public float getBeta() { - return beta_; - } - - public static final int NORM_REGION_FIELD_NUMBER = 4; - private int normRegion_; - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public boolean hasNormRegion() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public caffe.Caffe.LRNParameter.NormRegion getNormRegion() { - caffe.Caffe.LRNParameter.NormRegion result = caffe.Caffe.LRNParameter.NormRegion.valueOf(normRegion_); - return result == null ? caffe.Caffe.LRNParameter.NormRegion.ACROSS_CHANNELS : result; - } - - public static final int K_FIELD_NUMBER = 5; - private float k_; - /** - * optional float k = 5 [default = 1]; - */ - public boolean hasK() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional float k = 5 [default = 1]; - */ - public float getK() { - return k_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, localSize_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, alpha_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, beta_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, normRegion_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeFloat(5, k_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, localSize_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, alpha_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, beta_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, normRegion_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, k_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.LRNParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LRNParameter 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.LRNParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.LRNParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.LRNParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LRNParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.LRNParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.LRNParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.LRNParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.LRNParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.LRNParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.LRNParameter} - * - *
-     * Message that stores parameters used by LRNLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.LRNParameter) - caffe.Caffe.LRNParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_LRNParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_LRNParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.LRNParameter.class, caffe.Caffe.LRNParameter.Builder.class); - } - - // Construct using caffe.Caffe.LRNParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - localSize_ = 5; - bitField0_ = (bitField0_ & ~0x00000001); - alpha_ = 1F; - bitField0_ = (bitField0_ & ~0x00000002); - beta_ = 0.75F; - bitField0_ = (bitField0_ & ~0x00000004); - normRegion_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - k_ = 1F; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_LRNParameter_descriptor; - } - - public caffe.Caffe.LRNParameter getDefaultInstanceForType() { - return caffe.Caffe.LRNParameter.getDefaultInstance(); - } - - public caffe.Caffe.LRNParameter build() { - caffe.Caffe.LRNParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.LRNParameter buildPartial() { - caffe.Caffe.LRNParameter result = new caffe.Caffe.LRNParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.localSize_ = localSize_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.alpha_ = alpha_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.beta_ = beta_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.normRegion_ = normRegion_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.k_ = k_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.LRNParameter) { - return mergeFrom((caffe.Caffe.LRNParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.LRNParameter other) { - if (other == caffe.Caffe.LRNParameter.getDefaultInstance()) return this; - if (other.hasLocalSize()) { - setLocalSize(other.getLocalSize()); - } - if (other.hasAlpha()) { - setAlpha(other.getAlpha()); - } - if (other.hasBeta()) { - setBeta(other.getBeta()); - } - if (other.hasNormRegion()) { - setNormRegion(other.getNormRegion()); - } - if (other.hasK()) { - setK(other.getK()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.LRNParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.LRNParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int localSize_ = 5; - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public boolean hasLocalSize() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public int getLocalSize() { - return localSize_; - } - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public Builder setLocalSize(int value) { - bitField0_ |= 0x00000001; - localSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 local_size = 1 [default = 5]; - */ - public Builder clearLocalSize() { - bitField0_ = (bitField0_ & ~0x00000001); - localSize_ = 5; - onChanged(); - return this; - } - - private float alpha_ = 1F; - /** - * optional float alpha = 2 [default = 1]; - */ - public boolean hasAlpha() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float alpha = 2 [default = 1]; - */ - public float getAlpha() { - return alpha_; - } - /** - * optional float alpha = 2 [default = 1]; - */ - public Builder setAlpha(float value) { - bitField0_ |= 0x00000002; - alpha_ = value; - onChanged(); - return this; - } - /** - * optional float alpha = 2 [default = 1]; - */ - public Builder clearAlpha() { - bitField0_ = (bitField0_ & ~0x00000002); - alpha_ = 1F; - onChanged(); - return this; - } - - private float beta_ = 0.75F; - /** - * optional float beta = 3 [default = 0.75]; - */ - public boolean hasBeta() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float beta = 3 [default = 0.75]; - */ - public float getBeta() { - return beta_; - } - /** - * optional float beta = 3 [default = 0.75]; - */ - public Builder setBeta(float value) { - bitField0_ |= 0x00000004; - beta_ = value; - onChanged(); - return this; - } - /** - * optional float beta = 3 [default = 0.75]; - */ - public Builder clearBeta() { - bitField0_ = (bitField0_ & ~0x00000004); - beta_ = 0.75F; - onChanged(); - return this; - } - - private int normRegion_ = 0; - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public boolean hasNormRegion() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public caffe.Caffe.LRNParameter.NormRegion getNormRegion() { - caffe.Caffe.LRNParameter.NormRegion result = caffe.Caffe.LRNParameter.NormRegion.valueOf(normRegion_); - return result == null ? caffe.Caffe.LRNParameter.NormRegion.ACROSS_CHANNELS : result; - } - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public Builder setNormRegion(caffe.Caffe.LRNParameter.NormRegion value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - normRegion_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; - */ - public Builder clearNormRegion() { - bitField0_ = (bitField0_ & ~0x00000008); - normRegion_ = 0; - onChanged(); - return this; - } - - private float k_ = 1F; - /** - * optional float k = 5 [default = 1]; - */ - public boolean hasK() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional float k = 5 [default = 1]; - */ - public float getK() { - return k_; - } - /** - * optional float k = 5 [default = 1]; - */ - public Builder setK(float value) { - bitField0_ |= 0x00000010; - k_ = value; - onChanged(); - return this; - } - /** - * optional float k = 5 [default = 1]; - */ - public Builder clearK() { - bitField0_ = (bitField0_ & ~0x00000010); - k_ = 1F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.LRNParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.LRNParameter) - private static final caffe.Caffe.LRNParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.LRNParameter(); - } - - public static caffe.Caffe.LRNParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LRNParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LRNParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.LRNParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface MemoryDataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.MemoryDataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 batch_size = 1; - */ - boolean hasBatchSize(); - /** - * optional uint32 batch_size = 1; - */ - int getBatchSize(); - - /** - * optional uint32 channels = 2; - */ - boolean hasChannels(); - /** - * optional uint32 channels = 2; - */ - int getChannels(); - - /** - * optional uint32 height = 3; - */ - boolean hasHeight(); - /** - * optional uint32 height = 3; - */ - int getHeight(); - - /** - * optional uint32 width = 4; - */ - boolean hasWidth(); - /** - * optional uint32 width = 4; - */ - int getWidth(); - } - /** - * Protobuf type {@code caffe.MemoryDataParameter} - */ - public static final class MemoryDataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.MemoryDataParameter) - MemoryDataParameterOrBuilder { - // Use MemoryDataParameter.newBuilder() to construct. - private MemoryDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MemoryDataParameter() { - batchSize_ = 0; - channels_ = 0; - height_ = 0; - width_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MemoryDataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - batchSize_ = input.readUInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - channels_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - height_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - width_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_MemoryDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_MemoryDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.MemoryDataParameter.class, caffe.Caffe.MemoryDataParameter.Builder.class); - } - - private int bitField0_; - public static final int BATCH_SIZE_FIELD_NUMBER = 1; - private int batchSize_; - /** - * optional uint32 batch_size = 1; - */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 batch_size = 1; - */ - public int getBatchSize() { - return batchSize_; - } - - public static final int CHANNELS_FIELD_NUMBER = 2; - private int channels_; - /** - * optional uint32 channels = 2; - */ - public boolean hasChannels() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 channels = 2; - */ - public int getChannels() { - return channels_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - * optional uint32 height = 3; - */ - public boolean hasHeight() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 height = 3; - */ - public int getHeight() { - return height_; - } - - public static final int WIDTH_FIELD_NUMBER = 4; - private int width_; - /** - * optional uint32 width = 4; - */ - public boolean hasWidth() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 width = 4; - */ - public int getWidth() { - return width_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, batchSize_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, channels_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, height_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(4, width_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, batchSize_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, channels_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, height_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, width_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.MemoryDataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.MemoryDataParameter 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.MemoryDataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.MemoryDataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.MemoryDataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.MemoryDataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.MemoryDataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.MemoryDataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.MemoryDataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.MemoryDataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.MemoryDataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.MemoryDataParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.MemoryDataParameter) - caffe.Caffe.MemoryDataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_MemoryDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_MemoryDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.MemoryDataParameter.class, caffe.Caffe.MemoryDataParameter.Builder.class); - } - - // Construct using caffe.Caffe.MemoryDataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - batchSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - channels_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - height_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - width_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_MemoryDataParameter_descriptor; - } - - public caffe.Caffe.MemoryDataParameter getDefaultInstanceForType() { - return caffe.Caffe.MemoryDataParameter.getDefaultInstance(); - } - - public caffe.Caffe.MemoryDataParameter build() { - caffe.Caffe.MemoryDataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.MemoryDataParameter buildPartial() { - caffe.Caffe.MemoryDataParameter result = new caffe.Caffe.MemoryDataParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.batchSize_ = batchSize_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.channels_ = channels_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.height_ = height_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.width_ = width_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.MemoryDataParameter) { - return mergeFrom((caffe.Caffe.MemoryDataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.MemoryDataParameter other) { - if (other == caffe.Caffe.MemoryDataParameter.getDefaultInstance()) return this; - if (other.hasBatchSize()) { - setBatchSize(other.getBatchSize()); - } - if (other.hasChannels()) { - setChannels(other.getChannels()); - } - if (other.hasHeight()) { - setHeight(other.getHeight()); - } - if (other.hasWidth()) { - setWidth(other.getWidth()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.MemoryDataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.MemoryDataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int batchSize_ ; - /** - * optional uint32 batch_size = 1; - */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 batch_size = 1; - */ - public int getBatchSize() { - return batchSize_; - } - /** - * optional uint32 batch_size = 1; - */ - public Builder setBatchSize(int value) { - bitField0_ |= 0x00000001; - batchSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batch_size = 1; - */ - public Builder clearBatchSize() { - bitField0_ = (bitField0_ & ~0x00000001); - batchSize_ = 0; - onChanged(); - return this; - } - - private int channels_ ; - /** - * optional uint32 channels = 2; - */ - public boolean hasChannels() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 channels = 2; - */ - public int getChannels() { - return channels_; - } - /** - * optional uint32 channels = 2; - */ - public Builder setChannels(int value) { - bitField0_ |= 0x00000002; - channels_ = value; - onChanged(); - return this; - } - /** - * optional uint32 channels = 2; - */ - public Builder clearChannels() { - bitField0_ = (bitField0_ & ~0x00000002); - channels_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - * optional uint32 height = 3; - */ - public boolean hasHeight() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 height = 3; - */ - public int getHeight() { - return height_; - } - /** - * optional uint32 height = 3; - */ - public Builder setHeight(int value) { - bitField0_ |= 0x00000004; - height_ = value; - onChanged(); - return this; - } - /** - * optional uint32 height = 3; - */ - public Builder clearHeight() { - bitField0_ = (bitField0_ & ~0x00000004); - height_ = 0; - onChanged(); - return this; - } - - private int width_ ; - /** - * optional uint32 width = 4; - */ - public boolean hasWidth() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 width = 4; - */ - public int getWidth() { - return width_; - } - /** - * optional uint32 width = 4; - */ - public Builder setWidth(int value) { - bitField0_ |= 0x00000008; - width_ = value; - onChanged(); - return this; - } - /** - * optional uint32 width = 4; - */ - public Builder clearWidth() { - bitField0_ = (bitField0_ & ~0x00000008); - width_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.MemoryDataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.MemoryDataParameter) - private static final caffe.Caffe.MemoryDataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.MemoryDataParameter(); - } - - public static caffe.Caffe.MemoryDataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MemoryDataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MemoryDataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.MemoryDataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface MVNParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.MVNParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-     * This parameter can be set to false to normalize mean only
-     * 
- */ - boolean hasNormalizeVariance(); - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-     * This parameter can be set to false to normalize mean only
-     * 
- */ - boolean getNormalizeVariance(); - - /** - * optional bool across_channels = 2 [default = false]; - * - *
-     * This parameter can be set to true to perform DNN-like MVN
-     * 
- */ - boolean hasAcrossChannels(); - /** - * optional bool across_channels = 2 [default = false]; - * - *
-     * This parameter can be set to true to perform DNN-like MVN
-     * 
- */ - boolean getAcrossChannels(); - - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-     * Epsilon for not dividing by zero while normalizing variance
-     * 
- */ - boolean hasEps(); - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-     * Epsilon for not dividing by zero while normalizing variance
-     * 
- */ - float getEps(); - } - /** - * Protobuf type {@code caffe.MVNParameter} - */ - public static final class MVNParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.MVNParameter) - MVNParameterOrBuilder { - // Use MVNParameter.newBuilder() to construct. - private MVNParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MVNParameter() { - normalizeVariance_ = true; - acrossChannels_ = false; - eps_ = 1e-09F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MVNParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - normalizeVariance_ = input.readBool(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - acrossChannels_ = input.readBool(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - eps_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_MVNParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_MVNParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.MVNParameter.class, caffe.Caffe.MVNParameter.Builder.class); - } - - private int bitField0_; - public static final int NORMALIZE_VARIANCE_FIELD_NUMBER = 1; - private boolean normalizeVariance_; - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-     * This parameter can be set to false to normalize mean only
-     * 
- */ - public boolean hasNormalizeVariance() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-     * This parameter can be set to false to normalize mean only
-     * 
- */ - public boolean getNormalizeVariance() { - return normalizeVariance_; - } - - public static final int ACROSS_CHANNELS_FIELD_NUMBER = 2; - private boolean acrossChannels_; - /** - * optional bool across_channels = 2 [default = false]; - * - *
-     * This parameter can be set to true to perform DNN-like MVN
-     * 
- */ - public boolean hasAcrossChannels() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool across_channels = 2 [default = false]; - * - *
-     * This parameter can be set to true to perform DNN-like MVN
-     * 
- */ - public boolean getAcrossChannels() { - return acrossChannels_; - } - - public static final int EPS_FIELD_NUMBER = 3; - private float eps_; - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-     * Epsilon for not dividing by zero while normalizing variance
-     * 
- */ - public boolean hasEps() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-     * Epsilon for not dividing by zero while normalizing variance
-     * 
- */ - public float getEps() { - return eps_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, normalizeVariance_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, acrossChannels_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, eps_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, normalizeVariance_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, acrossChannels_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, eps_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.MVNParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.MVNParameter 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.MVNParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.MVNParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.MVNParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.MVNParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.MVNParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.MVNParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.MVNParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.MVNParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.MVNParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.MVNParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.MVNParameter) - caffe.Caffe.MVNParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_MVNParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_MVNParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.MVNParameter.class, caffe.Caffe.MVNParameter.Builder.class); - } - - // Construct using caffe.Caffe.MVNParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - normalizeVariance_ = true; - bitField0_ = (bitField0_ & ~0x00000001); - acrossChannels_ = false; - bitField0_ = (bitField0_ & ~0x00000002); - eps_ = 1e-09F; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_MVNParameter_descriptor; - } - - public caffe.Caffe.MVNParameter getDefaultInstanceForType() { - return caffe.Caffe.MVNParameter.getDefaultInstance(); - } - - public caffe.Caffe.MVNParameter build() { - caffe.Caffe.MVNParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.MVNParameter buildPartial() { - caffe.Caffe.MVNParameter result = new caffe.Caffe.MVNParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.normalizeVariance_ = normalizeVariance_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.acrossChannels_ = acrossChannels_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.eps_ = eps_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.MVNParameter) { - return mergeFrom((caffe.Caffe.MVNParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.MVNParameter other) { - if (other == caffe.Caffe.MVNParameter.getDefaultInstance()) return this; - if (other.hasNormalizeVariance()) { - setNormalizeVariance(other.getNormalizeVariance()); - } - if (other.hasAcrossChannels()) { - setAcrossChannels(other.getAcrossChannels()); - } - if (other.hasEps()) { - setEps(other.getEps()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.MVNParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.MVNParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean normalizeVariance_ = true; - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-       * This parameter can be set to false to normalize mean only
-       * 
- */ - public boolean hasNormalizeVariance() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-       * This parameter can be set to false to normalize mean only
-       * 
- */ - public boolean getNormalizeVariance() { - return normalizeVariance_; - } - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-       * This parameter can be set to false to normalize mean only
-       * 
- */ - public Builder setNormalizeVariance(boolean value) { - bitField0_ |= 0x00000001; - normalizeVariance_ = value; - onChanged(); - return this; - } - /** - * optional bool normalize_variance = 1 [default = true]; - * - *
-       * This parameter can be set to false to normalize mean only
-       * 
- */ - public Builder clearNormalizeVariance() { - bitField0_ = (bitField0_ & ~0x00000001); - normalizeVariance_ = true; - onChanged(); - return this; - } - - private boolean acrossChannels_ ; - /** - * optional bool across_channels = 2 [default = false]; - * - *
-       * This parameter can be set to true to perform DNN-like MVN
-       * 
- */ - public boolean hasAcrossChannels() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool across_channels = 2 [default = false]; - * - *
-       * This parameter can be set to true to perform DNN-like MVN
-       * 
- */ - public boolean getAcrossChannels() { - return acrossChannels_; - } - /** - * optional bool across_channels = 2 [default = false]; - * - *
-       * This parameter can be set to true to perform DNN-like MVN
-       * 
- */ - public Builder setAcrossChannels(boolean value) { - bitField0_ |= 0x00000002; - acrossChannels_ = value; - onChanged(); - return this; - } - /** - * optional bool across_channels = 2 [default = false]; - * - *
-       * This parameter can be set to true to perform DNN-like MVN
-       * 
- */ - public Builder clearAcrossChannels() { - bitField0_ = (bitField0_ & ~0x00000002); - acrossChannels_ = false; - onChanged(); - return this; - } - - private float eps_ = 1e-09F; - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-       * Epsilon for not dividing by zero while normalizing variance
-       * 
- */ - public boolean hasEps() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-       * Epsilon for not dividing by zero while normalizing variance
-       * 
- */ - public float getEps() { - return eps_; - } - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-       * Epsilon for not dividing by zero while normalizing variance
-       * 
- */ - public Builder setEps(float value) { - bitField0_ |= 0x00000004; - eps_ = value; - onChanged(); - return this; - } - /** - * optional float eps = 3 [default = 1e-09]; - * - *
-       * Epsilon for not dividing by zero while normalizing variance
-       * 
- */ - public Builder clearEps() { - bitField0_ = (bitField0_ & ~0x00000004); - eps_ = 1e-09F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.MVNParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.MVNParameter) - private static final caffe.Caffe.MVNParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.MVNParameter(); - } - - public static caffe.Caffe.MVNParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MVNParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MVNParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.MVNParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PoolingParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.PoolingParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - boolean hasPool(); - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - caffe.Caffe.PoolingParameter.PoolMethod getPool(); - - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in height and width or as Y, X pairs.
-     * 
- */ - boolean hasPad(); - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in height and width or as Y, X pairs.
-     * 
- */ - int getPad(); - - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * The padding height
-     * 
- */ - boolean hasPadH(); - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * The padding height
-     * 
- */ - int getPadH(); - - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width
-     * 
- */ - boolean hasPadW(); - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width
-     * 
- */ - int getPadW(); - - /** - * optional uint32 kernel_size = 2; - * - *
-     * The kernel size (square)
-     * 
- */ - boolean hasKernelSize(); - /** - * optional uint32 kernel_size = 2; - * - *
-     * The kernel size (square)
-     * 
- */ - int getKernelSize(); - - /** - * optional uint32 kernel_h = 5; - * - *
-     * The kernel height
-     * 
- */ - boolean hasKernelH(); - /** - * optional uint32 kernel_h = 5; - * - *
-     * The kernel height
-     * 
- */ - int getKernelH(); - - /** - * optional uint32 kernel_w = 6; - * - *
-     * The kernel width
-     * 
- */ - boolean hasKernelW(); - /** - * optional uint32 kernel_w = 6; - * - *
-     * The kernel width
-     * 
- */ - int getKernelW(); - - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-     * The stride (equal in Y, X)
-     * 
- */ - boolean hasStride(); - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-     * The stride (equal in Y, X)
-     * 
- */ - int getStride(); - - /** - * optional uint32 stride_h = 7; - * - *
-     * The stride height
-     * 
- */ - boolean hasStrideH(); - /** - * optional uint32 stride_h = 7; - * - *
-     * The stride height
-     * 
- */ - int getStrideH(); - - /** - * optional uint32 stride_w = 8; - * - *
-     * The stride width
-     * 
- */ - boolean hasStrideW(); - /** - * optional uint32 stride_w = 8; - * - *
-     * The stride width
-     * 
- */ - int getStrideW(); - - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - caffe.Caffe.PoolingParameter.Engine getEngine(); - - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-     * If global_pooling then it will pool over the size of the bottom by doing
-     * kernel_h = bottom->height and kernel_w = bottom->width
-     * 
- */ - boolean hasGlobalPooling(); - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-     * If global_pooling then it will pool over the size of the bottom by doing
-     * kernel_h = bottom->height and kernel_w = bottom->width
-     * 
- */ - boolean getGlobalPooling(); - } - /** - * Protobuf type {@code caffe.PoolingParameter} - */ - public static final class PoolingParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.PoolingParameter) - PoolingParameterOrBuilder { - // Use PoolingParameter.newBuilder() to construct. - private PoolingParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PoolingParameter() { - pool_ = 0; - pad_ = 0; - padH_ = 0; - padW_ = 0; - kernelSize_ = 0; - kernelH_ = 0; - kernelW_ = 0; - stride_ = 1; - strideH_ = 0; - strideW_ = 0; - engine_ = 0; - globalPooling_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PoolingParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.PoolingParameter.PoolMethod value = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - pool_ = rawValue; - } - break; - } - case 16: { - bitField0_ |= 0x00000010; - kernelSize_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000080; - stride_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000002; - pad_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000020; - kernelH_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000040; - kernelW_ = input.readUInt32(); - break; - } - case 56: { - bitField0_ |= 0x00000100; - strideH_ = input.readUInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000200; - strideW_ = input.readUInt32(); - break; - } - case 72: { - bitField0_ |= 0x00000004; - padH_ = input.readUInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000008; - padW_ = input.readUInt32(); - break; - } - case 88: { - int rawValue = input.readEnum(); - caffe.Caffe.PoolingParameter.Engine value = caffe.Caffe.PoolingParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - engine_ = rawValue; - } - break; - } - case 96: { - bitField0_ |= 0x00000800; - globalPooling_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_PoolingParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PoolingParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PoolingParameter.class, caffe.Caffe.PoolingParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.PoolingParameter.PoolMethod} - */ - public enum PoolMethod - implements com.google.protobuf.ProtocolMessageEnum { - /** - * MAX = 0; - */ - MAX(0, 0), - /** - * AVE = 1; - */ - AVE(1, 1), - /** - * STOCHASTIC = 2; - */ - STOCHASTIC(2, 2), - ; - - /** - * MAX = 0; - */ - public static final int MAX_VALUE = 0; - /** - * AVE = 1; - */ - public static final int AVE_VALUE = 1; - /** - * STOCHASTIC = 2; - */ - public static final int STOCHASTIC_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static PoolMethod valueOf(int value) { - switch (value) { - case 0: return MAX; - case 1: return AVE; - case 2: return STOCHASTIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PoolMethod> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PoolMethod findValueByNumber(int number) { - return PoolMethod.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.PoolingParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final PoolMethod[] VALUES = values(); - - public static PoolMethod 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 PoolMethod(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.PoolingParameter.PoolMethod) - } - - /** - * Protobuf enum {@code caffe.PoolingParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.PoolingParameter.getDescriptor().getEnumTypes().get(1); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.PoolingParameter.Engine) - } - - private int bitField0_; - public static final int POOL_FIELD_NUMBER = 1; - private int pool_; - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public caffe.Caffe.PoolingParameter.PoolMethod getPool() { - caffe.Caffe.PoolingParameter.PoolMethod result = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.PoolingParameter.PoolMethod.MAX : result; - } - - public static final int PAD_FIELD_NUMBER = 4; - private int pad_; - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in height and width or as Y, X pairs.
-     * 
- */ - public boolean hasPad() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-     * Pad, kernel size, and stride are all given as a single value for equal
-     * dimensions in height and width or as Y, X pairs.
-     * 
- */ - public int getPad() { - return pad_; - } - - public static final int PAD_H_FIELD_NUMBER = 9; - private int padH_; - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * The padding height
-     * 
- */ - public boolean hasPadH() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-     * The padding height
-     * 
- */ - public int getPadH() { - return padH_; - } - - public static final int PAD_W_FIELD_NUMBER = 10; - private int padW_; - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width
-     * 
- */ - public boolean hasPadW() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-     * The padding width
-     * 
- */ - public int getPadW() { - return padW_; - } - - public static final int KERNEL_SIZE_FIELD_NUMBER = 2; - private int kernelSize_; - /** - * optional uint32 kernel_size = 2; - * - *
-     * The kernel size (square)
-     * 
- */ - public boolean hasKernelSize() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 kernel_size = 2; - * - *
-     * The kernel size (square)
-     * 
- */ - public int getKernelSize() { - return kernelSize_; - } - - public static final int KERNEL_H_FIELD_NUMBER = 5; - private int kernelH_; - /** - * optional uint32 kernel_h = 5; - * - *
-     * The kernel height
-     * 
- */ - public boolean hasKernelH() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 kernel_h = 5; - * - *
-     * The kernel height
-     * 
- */ - public int getKernelH() { - return kernelH_; - } - - public static final int KERNEL_W_FIELD_NUMBER = 6; - private int kernelW_; - /** - * optional uint32 kernel_w = 6; - * - *
-     * The kernel width
-     * 
- */ - public boolean hasKernelW() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 kernel_w = 6; - * - *
-     * The kernel width
-     * 
- */ - public int getKernelW() { - return kernelW_; - } - - public static final int STRIDE_FIELD_NUMBER = 3; - private int stride_; - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-     * The stride (equal in Y, X)
-     * 
- */ - public boolean hasStride() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-     * The stride (equal in Y, X)
-     * 
- */ - public int getStride() { - return stride_; - } - - public static final int STRIDE_H_FIELD_NUMBER = 7; - private int strideH_; - /** - * optional uint32 stride_h = 7; - * - *
-     * The stride height
-     * 
- */ - public boolean hasStrideH() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 stride_h = 7; - * - *
-     * The stride height
-     * 
- */ - public int getStrideH() { - return strideH_; - } - - public static final int STRIDE_W_FIELD_NUMBER = 8; - private int strideW_; - /** - * optional uint32 stride_w = 8; - * - *
-     * The stride width
-     * 
- */ - public boolean hasStrideW() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 stride_w = 8; - * - *
-     * The stride width
-     * 
- */ - public int getStrideW() { - return strideW_; - } - - public static final int ENGINE_FIELD_NUMBER = 11; - private int engine_; - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public caffe.Caffe.PoolingParameter.Engine getEngine() { - caffe.Caffe.PoolingParameter.Engine result = caffe.Caffe.PoolingParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.PoolingParameter.Engine.DEFAULT : result; - } - - public static final int GLOBAL_POOLING_FIELD_NUMBER = 12; - private boolean globalPooling_; - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-     * If global_pooling then it will pool over the size of the bottom by doing
-     * kernel_h = bottom->height and kernel_w = bottom->width
-     * 
- */ - public boolean hasGlobalPooling() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-     * If global_pooling then it will pool over the size of the bottom by doing
-     * kernel_h = bottom->height and kernel_w = bottom->width
-     * 
- */ - public boolean getGlobalPooling() { - return globalPooling_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, pool_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(2, kernelSize_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeUInt32(3, stride_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(4, pad_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt32(5, kernelH_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(6, kernelW_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeUInt32(7, strideH_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt32(8, strideW_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(9, padH_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(10, padW_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeEnum(11, engine_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeBool(12, globalPooling_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, pool_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, kernelSize_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, stride_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, pad_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, kernelH_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, kernelW_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, strideH_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, strideW_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, padH_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, padW_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, engine_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(12, globalPooling_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.PoolingParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PoolingParameter 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.PoolingParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PoolingParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.PoolingParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PoolingParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.PoolingParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.PoolingParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.PoolingParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PoolingParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.PoolingParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.PoolingParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.PoolingParameter) - caffe.Caffe.PoolingParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_PoolingParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PoolingParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PoolingParameter.class, caffe.Caffe.PoolingParameter.Builder.class); - } - - // Construct using caffe.Caffe.PoolingParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - pool_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - pad_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - padH_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - padW_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - kernelSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - kernelH_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - kernelW_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - stride_ = 1; - bitField0_ = (bitField0_ & ~0x00000080); - strideH_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - strideW_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000400); - globalPooling_ = false; - bitField0_ = (bitField0_ & ~0x00000800); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_PoolingParameter_descriptor; - } - - public caffe.Caffe.PoolingParameter getDefaultInstanceForType() { - return caffe.Caffe.PoolingParameter.getDefaultInstance(); - } - - public caffe.Caffe.PoolingParameter build() { - caffe.Caffe.PoolingParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.PoolingParameter buildPartial() { - caffe.Caffe.PoolingParameter result = new caffe.Caffe.PoolingParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.pool_ = pool_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.pad_ = pad_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.padH_ = padH_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.padW_ = padW_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.kernelSize_ = kernelSize_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.kernelH_ = kernelH_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.kernelW_ = kernelW_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.stride_ = stride_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.strideH_ = strideH_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.strideW_ = strideW_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.engine_ = engine_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.globalPooling_ = globalPooling_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.PoolingParameter) { - return mergeFrom((caffe.Caffe.PoolingParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.PoolingParameter other) { - if (other == caffe.Caffe.PoolingParameter.getDefaultInstance()) return this; - if (other.hasPool()) { - setPool(other.getPool()); - } - if (other.hasPad()) { - setPad(other.getPad()); - } - if (other.hasPadH()) { - setPadH(other.getPadH()); - } - if (other.hasPadW()) { - setPadW(other.getPadW()); - } - if (other.hasKernelSize()) { - setKernelSize(other.getKernelSize()); - } - if (other.hasKernelH()) { - setKernelH(other.getKernelH()); - } - if (other.hasKernelW()) { - setKernelW(other.getKernelW()); - } - if (other.hasStride()) { - setStride(other.getStride()); - } - if (other.hasStrideH()) { - setStrideH(other.getStrideH()); - } - if (other.hasStrideW()) { - setStrideW(other.getStrideW()); - } - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - if (other.hasGlobalPooling()) { - setGlobalPooling(other.getGlobalPooling()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.PoolingParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.PoolingParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int pool_ = 0; - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public caffe.Caffe.PoolingParameter.PoolMethod getPool() { - caffe.Caffe.PoolingParameter.PoolMethod result = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.PoolingParameter.PoolMethod.MAX : result; - } - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder setPool(caffe.Caffe.PoolingParameter.PoolMethod value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - pool_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder clearPool() { - bitField0_ = (bitField0_ & ~0x00000001); - pool_ = 0; - onChanged(); - return this; - } - - private int pad_ ; - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in height and width or as Y, X pairs.
-       * 
- */ - public boolean hasPad() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in height and width or as Y, X pairs.
-       * 
- */ - public int getPad() { - return pad_; - } - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in height and width or as Y, X pairs.
-       * 
- */ - public Builder setPad(int value) { - bitField0_ |= 0x00000002; - pad_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad = 4 [default = 0]; - * - *
-       * Pad, kernel size, and stride are all given as a single value for equal
-       * dimensions in height and width or as Y, X pairs.
-       * 
- */ - public Builder clearPad() { - bitField0_ = (bitField0_ & ~0x00000002); - pad_ = 0; - onChanged(); - return this; - } - - private int padH_ ; - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * The padding height
-       * 
- */ - public boolean hasPadH() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * The padding height
-       * 
- */ - public int getPadH() { - return padH_; - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * The padding height
-       * 
- */ - public Builder setPadH(int value) { - bitField0_ |= 0x00000004; - padH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad_h = 9 [default = 0]; - * - *
-       * The padding height
-       * 
- */ - public Builder clearPadH() { - bitField0_ = (bitField0_ & ~0x00000004); - padH_ = 0; - onChanged(); - return this; - } - - private int padW_ ; - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width
-       * 
- */ - public boolean hasPadW() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width
-       * 
- */ - public int getPadW() { - return padW_; - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width
-       * 
- */ - public Builder setPadW(int value) { - bitField0_ |= 0x00000008; - padW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad_w = 10 [default = 0]; - * - *
-       * The padding width
-       * 
- */ - public Builder clearPadW() { - bitField0_ = (bitField0_ & ~0x00000008); - padW_ = 0; - onChanged(); - return this; - } - - private int kernelSize_ ; - /** - * optional uint32 kernel_size = 2; - * - *
-       * The kernel size (square)
-       * 
- */ - public boolean hasKernelSize() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 kernel_size = 2; - * - *
-       * The kernel size (square)
-       * 
- */ - public int getKernelSize() { - return kernelSize_; - } - /** - * optional uint32 kernel_size = 2; - * - *
-       * The kernel size (square)
-       * 
- */ - public Builder setKernelSize(int value) { - bitField0_ |= 0x00000010; - kernelSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernel_size = 2; - * - *
-       * The kernel size (square)
-       * 
- */ - public Builder clearKernelSize() { - bitField0_ = (bitField0_ & ~0x00000010); - kernelSize_ = 0; - onChanged(); - return this; - } - - private int kernelH_ ; - /** - * optional uint32 kernel_h = 5; - * - *
-       * The kernel height
-       * 
- */ - public boolean hasKernelH() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional uint32 kernel_h = 5; - * - *
-       * The kernel height
-       * 
- */ - public int getKernelH() { - return kernelH_; - } - /** - * optional uint32 kernel_h = 5; - * - *
-       * The kernel height
-       * 
- */ - public Builder setKernelH(int value) { - bitField0_ |= 0x00000020; - kernelH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernel_h = 5; - * - *
-       * The kernel height
-       * 
- */ - public Builder clearKernelH() { - bitField0_ = (bitField0_ & ~0x00000020); - kernelH_ = 0; - onChanged(); - return this; - } - - private int kernelW_ ; - /** - * optional uint32 kernel_w = 6; - * - *
-       * The kernel width
-       * 
- */ - public boolean hasKernelW() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 kernel_w = 6; - * - *
-       * The kernel width
-       * 
- */ - public int getKernelW() { - return kernelW_; - } - /** - * optional uint32 kernel_w = 6; - * - *
-       * The kernel width
-       * 
- */ - public Builder setKernelW(int value) { - bitField0_ |= 0x00000040; - kernelW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernel_w = 6; - * - *
-       * The kernel width
-       * 
- */ - public Builder clearKernelW() { - bitField0_ = (bitField0_ & ~0x00000040); - kernelW_ = 0; - onChanged(); - return this; - } - - private int stride_ = 1; - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-       * The stride (equal in Y, X)
-       * 
- */ - public boolean hasStride() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-       * The stride (equal in Y, X)
-       * 
- */ - public int getStride() { - return stride_; - } - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-       * The stride (equal in Y, X)
-       * 
- */ - public Builder setStride(int value) { - bitField0_ |= 0x00000080; - stride_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride = 3 [default = 1]; - * - *
-       * The stride (equal in Y, X)
-       * 
- */ - public Builder clearStride() { - bitField0_ = (bitField0_ & ~0x00000080); - stride_ = 1; - onChanged(); - return this; - } - - private int strideH_ ; - /** - * optional uint32 stride_h = 7; - * - *
-       * The stride height
-       * 
- */ - public boolean hasStrideH() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 stride_h = 7; - * - *
-       * The stride height
-       * 
- */ - public int getStrideH() { - return strideH_; - } - /** - * optional uint32 stride_h = 7; - * - *
-       * The stride height
-       * 
- */ - public Builder setStrideH(int value) { - bitField0_ |= 0x00000100; - strideH_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride_h = 7; - * - *
-       * The stride height
-       * 
- */ - public Builder clearStrideH() { - bitField0_ = (bitField0_ & ~0x00000100); - strideH_ = 0; - onChanged(); - return this; - } - - private int strideW_ ; - /** - * optional uint32 stride_w = 8; - * - *
-       * The stride width
-       * 
- */ - public boolean hasStrideW() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 stride_w = 8; - * - *
-       * The stride width
-       * 
- */ - public int getStrideW() { - return strideW_; - } - /** - * optional uint32 stride_w = 8; - * - *
-       * The stride width
-       * 
- */ - public Builder setStrideW(int value) { - bitField0_ |= 0x00000200; - strideW_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride_w = 8; - * - *
-       * The stride width
-       * 
- */ - public Builder clearStrideW() { - bitField0_ = (bitField0_ & ~0x00000200); - strideW_ = 0; - onChanged(); - return this; - } - - private int engine_ = 0; - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public caffe.Caffe.PoolingParameter.Engine getEngine() { - caffe.Caffe.PoolingParameter.Engine result = caffe.Caffe.PoolingParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.PoolingParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.PoolingParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000400); - engine_ = 0; - onChanged(); - return this; - } - - private boolean globalPooling_ ; - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-       * If global_pooling then it will pool over the size of the bottom by doing
-       * kernel_h = bottom->height and kernel_w = bottom->width
-       * 
- */ - public boolean hasGlobalPooling() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-       * If global_pooling then it will pool over the size of the bottom by doing
-       * kernel_h = bottom->height and kernel_w = bottom->width
-       * 
- */ - public boolean getGlobalPooling() { - return globalPooling_; - } - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-       * If global_pooling then it will pool over the size of the bottom by doing
-       * kernel_h = bottom->height and kernel_w = bottom->width
-       * 
- */ - public Builder setGlobalPooling(boolean value) { - bitField0_ |= 0x00000800; - globalPooling_ = value; - onChanged(); - return this; - } - /** - * optional bool global_pooling = 12 [default = false]; - * - *
-       * If global_pooling then it will pool over the size of the bottom by doing
-       * kernel_h = bottom->height and kernel_w = bottom->width
-       * 
- */ - public Builder clearGlobalPooling() { - bitField0_ = (bitField0_ & ~0x00000800); - globalPooling_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.PoolingParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.PoolingParameter) - private static final caffe.Caffe.PoolingParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.PoolingParameter(); - } - - public static caffe.Caffe.PoolingParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PoolingParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PoolingParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.PoolingParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PowerParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.PowerParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float power = 1 [default = 1]; - * - *
-     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-     * 
- */ - boolean hasPower(); - /** - * optional float power = 1 [default = 1]; - * - *
-     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-     * 
- */ - float getPower(); - - /** - * optional float scale = 2 [default = 1]; - */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - */ - float getScale(); - - /** - * optional float shift = 3 [default = 0]; - */ - boolean hasShift(); - /** - * optional float shift = 3 [default = 0]; - */ - float getShift(); - } - /** - * Protobuf type {@code caffe.PowerParameter} - */ - public static final class PowerParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.PowerParameter) - PowerParameterOrBuilder { - // Use PowerParameter.newBuilder() to construct. - private PowerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PowerParameter() { - power_ = 1F; - scale_ = 1F; - shift_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PowerParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - power_ = input.readFloat(); - break; - } - case 21: { - bitField0_ |= 0x00000002; - scale_ = input.readFloat(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - shift_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_PowerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PowerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PowerParameter.class, caffe.Caffe.PowerParameter.Builder.class); - } - - private int bitField0_; - public static final int POWER_FIELD_NUMBER = 1; - private float power_; - /** - * optional float power = 1 [default = 1]; - * - *
-     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-     * 
- */ - public boolean hasPower() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float power = 1 [default = 1]; - * - *
-     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-     * 
- */ - public float getPower() { - return power_; - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - - public static final int SHIFT_FIELD_NUMBER = 3; - private float shift_; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, power_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, shift_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, power_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, shift_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.PowerParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PowerParameter 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.PowerParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PowerParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.PowerParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PowerParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.PowerParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.PowerParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.PowerParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PowerParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.PowerParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.PowerParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.PowerParameter) - caffe.Caffe.PowerParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_PowerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PowerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PowerParameter.class, caffe.Caffe.PowerParameter.Builder.class); - } - - // Construct using caffe.Caffe.PowerParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - power_ = 1F; - bitField0_ = (bitField0_ & ~0x00000001); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000002); - shift_ = 0F; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_PowerParameter_descriptor; - } - - public caffe.Caffe.PowerParameter getDefaultInstanceForType() { - return caffe.Caffe.PowerParameter.getDefaultInstance(); - } - - public caffe.Caffe.PowerParameter build() { - caffe.Caffe.PowerParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.PowerParameter buildPartial() { - caffe.Caffe.PowerParameter result = new caffe.Caffe.PowerParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.power_ = power_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.shift_ = shift_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.PowerParameter) { - return mergeFrom((caffe.Caffe.PowerParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.PowerParameter other) { - if (other == caffe.Caffe.PowerParameter.getDefaultInstance()) return this; - if (other.hasPower()) { - setPower(other.getPower()); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasShift()) { - setShift(other.getShift()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.PowerParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.PowerParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float power_ = 1F; - /** - * optional float power = 1 [default = 1]; - * - *
-       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-       * 
- */ - public boolean hasPower() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float power = 1 [default = 1]; - * - *
-       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-       * 
- */ - public float getPower() { - return power_; - } - /** - * optional float power = 1 [default = 1]; - * - *
-       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-       * 
- */ - public Builder setPower(float value) { - bitField0_ |= 0x00000001; - power_ = value; - onChanged(); - return this; - } - /** - * optional float power = 1 [default = 1]; - * - *
-       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
-       * 
- */ - public Builder clearPower() { - bitField0_ = (bitField0_ & ~0x00000001); - power_ = 1F; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder setScale(float value) { - bitField0_ |= 0x00000002; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000002); - scale_ = 1F; - onChanged(); - return this; - } - - private float shift_ ; - /** - * optional float shift = 3 [default = 0]; - */ - public boolean hasShift() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float shift = 3 [default = 0]; - */ - public float getShift() { - return shift_; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder setShift(float value) { - bitField0_ |= 0x00000004; - shift_ = value; - onChanged(); - return this; - } - /** - * optional float shift = 3 [default = 0]; - */ - public Builder clearShift() { - bitField0_ = (bitField0_ & ~0x00000004); - shift_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.PowerParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.PowerParameter) - private static final caffe.Caffe.PowerParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.PowerParameter(); - } - - public static caffe.Caffe.PowerParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PowerParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PowerParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.PowerParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PythonParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.PythonParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string module = 1; - */ - boolean hasModule(); - /** - * optional string module = 1; - */ - java.lang.String getModule(); - /** - * optional string module = 1; - */ - com.google.protobuf.ByteString - getModuleBytes(); - - /** - * optional string layer = 2; - */ - boolean hasLayer(); - /** - * optional string layer = 2; - */ - java.lang.String getLayer(); - /** - * optional string layer = 2; - */ - com.google.protobuf.ByteString - getLayerBytes(); - - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - boolean hasParamStr(); - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - java.lang.String getParamStr(); - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - com.google.protobuf.ByteString - getParamStrBytes(); - - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-     * Whether this PythonLayer is shared among worker solvers during data parallelism.
-     * If true, each worker solver sequentially run forward from this layer.
-     * This value should be set true if you are using it as a data layer.
-     * 
- */ - boolean hasShareInParallel(); - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-     * Whether this PythonLayer is shared among worker solvers during data parallelism.
-     * If true, each worker solver sequentially run forward from this layer.
-     * This value should be set true if you are using it as a data layer.
-     * 
- */ - boolean getShareInParallel(); - } - /** - * Protobuf type {@code caffe.PythonParameter} - */ - public static final class PythonParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.PythonParameter) - PythonParameterOrBuilder { - // Use PythonParameter.newBuilder() to construct. - private PythonParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PythonParameter() { - module_ = ""; - layer_ = ""; - paramStr_ = ""; - shareInParallel_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PythonParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - module_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - layer_ = bs; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - paramStr_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000008; - shareInParallel_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_PythonParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PythonParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PythonParameter.class, caffe.Caffe.PythonParameter.Builder.class); - } - - private int bitField0_; - public static final int MODULE_FIELD_NUMBER = 1; - private volatile java.lang.Object module_; - /** - * optional string module = 1; - */ - public boolean hasModule() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string module = 1; - */ - public java.lang.String getModule() { - java.lang.Object ref = module_; - 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()) { - module_ = s; - } - return s; - } - } - /** - * optional string module = 1; - */ - public com.google.protobuf.ByteString - getModuleBytes() { - java.lang.Object ref = module_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - module_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAYER_FIELD_NUMBER = 2; - private volatile java.lang.Object layer_; - /** - * optional string layer = 2; - */ - public boolean hasLayer() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string layer = 2; - */ - public java.lang.String getLayer() { - java.lang.Object ref = layer_; - 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()) { - layer_ = s; - } - return s; - } - } - /** - * optional string layer = 2; - */ - public com.google.protobuf.ByteString - getLayerBytes() { - java.lang.Object ref = layer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - layer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAM_STR_FIELD_NUMBER = 3; - private volatile java.lang.Object paramStr_; - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - public boolean hasParamStr() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - public java.lang.String getParamStr() { - java.lang.Object ref = paramStr_; - 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()) { - paramStr_ = s; - } - return s; - } - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-     * This value is set to the attribute `param_str` of the `PythonLayer` object
-     * in Python before calling the `setup()` method. This could be a number,
-     * string, dictionary in Python dict format, JSON, etc. You may parse this
-     * string in `setup` method and use it in `forward` and `backward`.
-     * 
- */ - public com.google.protobuf.ByteString - getParamStrBytes() { - java.lang.Object ref = paramStr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - paramStr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHARE_IN_PARALLEL_FIELD_NUMBER = 4; - private boolean shareInParallel_; - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-     * Whether this PythonLayer is shared among worker solvers during data parallelism.
-     * If true, each worker solver sequentially run forward from this layer.
-     * This value should be set true if you are using it as a data layer.
-     * 
- */ - public boolean hasShareInParallel() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-     * Whether this PythonLayer is shared among worker solvers during data parallelism.
-     * If true, each worker solver sequentially run forward from this layer.
-     * This value should be set true if you are using it as a data layer.
-     * 
- */ - public boolean getShareInParallel() { - return shareInParallel_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, module_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, layer_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, paramStr_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, shareInParallel_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, module_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, layer_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, paramStr_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, shareInParallel_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.PythonParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PythonParameter 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.PythonParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PythonParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.PythonParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PythonParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.PythonParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.PythonParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.PythonParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PythonParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.PythonParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.PythonParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.PythonParameter) - caffe.Caffe.PythonParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_PythonParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PythonParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PythonParameter.class, caffe.Caffe.PythonParameter.Builder.class); - } - - // Construct using caffe.Caffe.PythonParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - module_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - layer_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - paramStr_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - shareInParallel_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_PythonParameter_descriptor; - } - - public caffe.Caffe.PythonParameter getDefaultInstanceForType() { - return caffe.Caffe.PythonParameter.getDefaultInstance(); - } - - public caffe.Caffe.PythonParameter build() { - caffe.Caffe.PythonParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.PythonParameter buildPartial() { - caffe.Caffe.PythonParameter result = new caffe.Caffe.PythonParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.module_ = module_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.layer_ = layer_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.paramStr_ = paramStr_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.shareInParallel_ = shareInParallel_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.PythonParameter) { - return mergeFrom((caffe.Caffe.PythonParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.PythonParameter other) { - if (other == caffe.Caffe.PythonParameter.getDefaultInstance()) return this; - if (other.hasModule()) { - bitField0_ |= 0x00000001; - module_ = other.module_; - onChanged(); - } - if (other.hasLayer()) { - bitField0_ |= 0x00000002; - layer_ = other.layer_; - onChanged(); - } - if (other.hasParamStr()) { - bitField0_ |= 0x00000004; - paramStr_ = other.paramStr_; - onChanged(); - } - if (other.hasShareInParallel()) { - setShareInParallel(other.getShareInParallel()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.PythonParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.PythonParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object module_ = ""; - /** - * optional string module = 1; - */ - public boolean hasModule() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string module = 1; - */ - public java.lang.String getModule() { - java.lang.Object ref = module_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - module_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string module = 1; - */ - public com.google.protobuf.ByteString - getModuleBytes() { - java.lang.Object ref = module_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - module_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string module = 1; - */ - public Builder setModule( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - module_ = value; - onChanged(); - return this; - } - /** - * optional string module = 1; - */ - public Builder clearModule() { - bitField0_ = (bitField0_ & ~0x00000001); - module_ = getDefaultInstance().getModule(); - onChanged(); - return this; - } - /** - * optional string module = 1; - */ - public Builder setModuleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - module_ = value; - onChanged(); - return this; - } - - private java.lang.Object layer_ = ""; - /** - * optional string layer = 2; - */ - public boolean hasLayer() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string layer = 2; - */ - public java.lang.String getLayer() { - java.lang.Object ref = layer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - layer_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string layer = 2; - */ - public com.google.protobuf.ByteString - getLayerBytes() { - java.lang.Object ref = layer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - layer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string layer = 2; - */ - public Builder setLayer( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - layer_ = value; - onChanged(); - return this; - } - /** - * optional string layer = 2; - */ - public Builder clearLayer() { - bitField0_ = (bitField0_ & ~0x00000002); - layer_ = getDefaultInstance().getLayer(); - onChanged(); - return this; - } - /** - * optional string layer = 2; - */ - public Builder setLayerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - layer_ = value; - onChanged(); - return this; - } - - private java.lang.Object paramStr_ = ""; - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public boolean hasParamStr() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public java.lang.String getParamStr() { - java.lang.Object ref = paramStr_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - paramStr_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public com.google.protobuf.ByteString - getParamStrBytes() { - java.lang.Object ref = paramStr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - paramStr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public Builder setParamStr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - paramStr_ = value; - onChanged(); - return this; - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public Builder clearParamStr() { - bitField0_ = (bitField0_ & ~0x00000004); - paramStr_ = getDefaultInstance().getParamStr(); - onChanged(); - return this; - } - /** - * optional string param_str = 3 [default = ""]; - * - *
-       * This value is set to the attribute `param_str` of the `PythonLayer` object
-       * in Python before calling the `setup()` method. This could be a number,
-       * string, dictionary in Python dict format, JSON, etc. You may parse this
-       * string in `setup` method and use it in `forward` and `backward`.
-       * 
- */ - public Builder setParamStrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - paramStr_ = value; - onChanged(); - return this; - } - - private boolean shareInParallel_ ; - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-       * Whether this PythonLayer is shared among worker solvers during data parallelism.
-       * If true, each worker solver sequentially run forward from this layer.
-       * This value should be set true if you are using it as a data layer.
-       * 
- */ - public boolean hasShareInParallel() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-       * Whether this PythonLayer is shared among worker solvers during data parallelism.
-       * If true, each worker solver sequentially run forward from this layer.
-       * This value should be set true if you are using it as a data layer.
-       * 
- */ - public boolean getShareInParallel() { - return shareInParallel_; - } - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-       * Whether this PythonLayer is shared among worker solvers during data parallelism.
-       * If true, each worker solver sequentially run forward from this layer.
-       * This value should be set true if you are using it as a data layer.
-       * 
- */ - public Builder setShareInParallel(boolean value) { - bitField0_ |= 0x00000008; - shareInParallel_ = value; - onChanged(); - return this; - } - /** - * optional bool share_in_parallel = 4 [default = false]; - * - *
-       * Whether this PythonLayer is shared among worker solvers during data parallelism.
-       * If true, each worker solver sequentially run forward from this layer.
-       * This value should be set true if you are using it as a data layer.
-       * 
- */ - public Builder clearShareInParallel() { - bitField0_ = (bitField0_ & ~0x00000008); - shareInParallel_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.PythonParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.PythonParameter) - private static final caffe.Caffe.PythonParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.PythonParameter(); - } - - public static caffe.Caffe.PythonParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PythonParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PythonParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.PythonParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ReductionParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ReductionParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-     * reduction operation
-     * 
- */ - boolean hasOperation(); - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-     * reduction operation
-     * 
- */ - caffe.Caffe.ReductionParameter.ReductionOp getOperation(); - - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * The first axis to reduce to a scalar -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * (Currently, only reduction along ALL "tail" axes is supported; reduction
-     * of axis M through N, where N < num_axes - 1, is unsupported.)
-     * Suppose we have an n-axis bottom Blob with shape:
-     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-     * If axis == m, the output Blob will have shape
-     *     (d0, d1, d2, ..., d(m-1)),
-     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-     * If axis == 0 (the default), the output Blob always has the empty shape
-     * (count 1), performing reduction across the entire input --
-     * often useful for creating new loss functions.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * The first axis to reduce to a scalar -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * (Currently, only reduction along ALL "tail" axes is supported; reduction
-     * of axis M through N, where N < num_axes - 1, is unsupported.)
-     * Suppose we have an n-axis bottom Blob with shape:
-     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-     * If axis == m, the output Blob will have shape
-     *     (d0, d1, d2, ..., d(m-1)),
-     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-     * If axis == 0 (the default), the output Blob always has the empty shape
-     * (count 1), performing reduction across the entire input --
-     * often useful for creating new loss functions.
-     * 
- */ - int getAxis(); - - /** - * optional float coeff = 3 [default = 1]; - * - *
-     * coefficient for output
-     * 
- */ - boolean hasCoeff(); - /** - * optional float coeff = 3 [default = 1]; - * - *
-     * coefficient for output
-     * 
- */ - float getCoeff(); - } - /** - * Protobuf type {@code caffe.ReductionParameter} - * - *
-   * Message that stores parameters used by ReductionLayer
-   * 
- */ - public static final class ReductionParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ReductionParameter) - ReductionParameterOrBuilder { - // Use ReductionParameter.newBuilder() to construct. - private ReductionParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ReductionParameter() { - operation_ = 1; - axis_ = 0; - coeff_ = 1F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReductionParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.ReductionParameter.ReductionOp value = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - operation_ = rawValue; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - axis_ = input.readInt32(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - coeff_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ReductionParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReductionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReductionParameter.class, caffe.Caffe.ReductionParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.ReductionParameter.ReductionOp} - */ - public enum ReductionOp - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SUM = 1; - */ - SUM(0, 1), - /** - * ASUM = 2; - */ - ASUM(1, 2), - /** - * SUMSQ = 3; - */ - SUMSQ(2, 3), - /** - * MEAN = 4; - */ - MEAN(3, 4), - ; - - /** - * SUM = 1; - */ - public static final int SUM_VALUE = 1; - /** - * ASUM = 2; - */ - public static final int ASUM_VALUE = 2; - /** - * SUMSQ = 3; - */ - public static final int SUMSQ_VALUE = 3; - /** - * MEAN = 4; - */ - public static final int MEAN_VALUE = 4; - - - public final int getNumber() { - return value; - } - - public static ReductionOp valueOf(int value) { - switch (value) { - case 1: return SUM; - case 2: return ASUM; - case 3: return SUMSQ; - case 4: return MEAN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ReductionOp> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReductionOp findValueByNumber(int number) { - return ReductionOp.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.ReductionParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final ReductionOp[] VALUES = values(); - - public static ReductionOp 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 ReductionOp(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.ReductionParameter.ReductionOp) - } - - private int bitField0_; - public static final int OPERATION_FIELD_NUMBER = 1; - private int operation_; - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-     * reduction operation
-     * 
- */ - public boolean hasOperation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-     * reduction operation
-     * 
- */ - public caffe.Caffe.ReductionParameter.ReductionOp getOperation() { - caffe.Caffe.ReductionParameter.ReductionOp result = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(operation_); - return result == null ? caffe.Caffe.ReductionParameter.ReductionOp.SUM : result; - } - - public static final int AXIS_FIELD_NUMBER = 2; - private int axis_; - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * The first axis to reduce to a scalar -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * (Currently, only reduction along ALL "tail" axes is supported; reduction
-     * of axis M through N, where N < num_axes - 1, is unsupported.)
-     * Suppose we have an n-axis bottom Blob with shape:
-     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-     * If axis == m, the output Blob will have shape
-     *     (d0, d1, d2, ..., d(m-1)),
-     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-     * If axis == 0 (the default), the output Blob always has the empty shape
-     * (count 1), performing reduction across the entire input --
-     * often useful for creating new loss functions.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * The first axis to reduce to a scalar -- may be negative to index from the
-     * end (e.g., -1 for the last axis).
-     * (Currently, only reduction along ALL "tail" axes is supported; reduction
-     * of axis M through N, where N < num_axes - 1, is unsupported.)
-     * Suppose we have an n-axis bottom Blob with shape:
-     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-     * If axis == m, the output Blob will have shape
-     *     (d0, d1, d2, ..., d(m-1)),
-     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-     * If axis == 0 (the default), the output Blob always has the empty shape
-     * (count 1), performing reduction across the entire input --
-     * often useful for creating new loss functions.
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int COEFF_FIELD_NUMBER = 3; - private float coeff_; - /** - * optional float coeff = 3 [default = 1]; - * - *
-     * coefficient for output
-     * 
- */ - public boolean hasCoeff() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float coeff = 3 [default = 1]; - * - *
-     * coefficient for output
-     * 
- */ - public float getCoeff() { - return coeff_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, operation_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, coeff_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, operation_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, coeff_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ReductionParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReductionParameter 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.ReductionParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReductionParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ReductionParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReductionParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReductionParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ReductionParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReductionParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReductionParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ReductionParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ReductionParameter} - * - *
-     * Message that stores parameters used by ReductionLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ReductionParameter) - caffe.Caffe.ReductionParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ReductionParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReductionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReductionParameter.class, caffe.Caffe.ReductionParameter.Builder.class); - } - - // Construct using caffe.Caffe.ReductionParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - operation_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - coeff_ = 1F; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ReductionParameter_descriptor; - } - - public caffe.Caffe.ReductionParameter getDefaultInstanceForType() { - return caffe.Caffe.ReductionParameter.getDefaultInstance(); - } - - public caffe.Caffe.ReductionParameter build() { - caffe.Caffe.ReductionParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ReductionParameter buildPartial() { - caffe.Caffe.ReductionParameter result = new caffe.Caffe.ReductionParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.operation_ = operation_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.coeff_ = coeff_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ReductionParameter) { - return mergeFrom((caffe.Caffe.ReductionParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ReductionParameter other) { - if (other == caffe.Caffe.ReductionParameter.getDefaultInstance()) return this; - if (other.hasOperation()) { - setOperation(other.getOperation()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasCoeff()) { - setCoeff(other.getCoeff()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ReductionParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ReductionParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int operation_ = 1; - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-       * reduction operation
-       * 
- */ - public boolean hasOperation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-       * reduction operation
-       * 
- */ - public caffe.Caffe.ReductionParameter.ReductionOp getOperation() { - caffe.Caffe.ReductionParameter.ReductionOp result = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(operation_); - return result == null ? caffe.Caffe.ReductionParameter.ReductionOp.SUM : result; - } - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-       * reduction operation
-       * 
- */ - public Builder setOperation(caffe.Caffe.ReductionParameter.ReductionOp value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - operation_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; - * - *
-       * reduction operation
-       * 
- */ - public Builder clearOperation() { - bitField0_ = (bitField0_ & ~0x00000001); - operation_ = 1; - onChanged(); - return this; - } - - private int axis_ ; - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * The first axis to reduce to a scalar -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * (Currently, only reduction along ALL "tail" axes is supported; reduction
-       * of axis M through N, where N < num_axes - 1, is unsupported.)
-       * Suppose we have an n-axis bottom Blob with shape:
-       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-       * If axis == m, the output Blob will have shape
-       *     (d0, d1, d2, ..., d(m-1)),
-       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-       * If axis == 0 (the default), the output Blob always has the empty shape
-       * (count 1), performing reduction across the entire input --
-       * often useful for creating new loss functions.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * The first axis to reduce to a scalar -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * (Currently, only reduction along ALL "tail" axes is supported; reduction
-       * of axis M through N, where N < num_axes - 1, is unsupported.)
-       * Suppose we have an n-axis bottom Blob with shape:
-       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-       * If axis == m, the output Blob will have shape
-       *     (d0, d1, d2, ..., d(m-1)),
-       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-       * If axis == 0 (the default), the output Blob always has the empty shape
-       * (count 1), performing reduction across the entire input --
-       * often useful for creating new loss functions.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * The first axis to reduce to a scalar -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * (Currently, only reduction along ALL "tail" axes is supported; reduction
-       * of axis M through N, where N < num_axes - 1, is unsupported.)
-       * Suppose we have an n-axis bottom Blob with shape:
-       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-       * If axis == m, the output Blob will have shape
-       *     (d0, d1, d2, ..., d(m-1)),
-       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-       * If axis == 0 (the default), the output Blob always has the empty shape
-       * (count 1), performing reduction across the entire input --
-       * often useful for creating new loss functions.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000002; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * The first axis to reduce to a scalar -- may be negative to index from the
-       * end (e.g., -1 for the last axis).
-       * (Currently, only reduction along ALL "tail" axes is supported; reduction
-       * of axis M through N, where N < num_axes - 1, is unsupported.)
-       * Suppose we have an n-axis bottom Blob with shape:
-       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
-       * If axis == m, the output Blob will have shape
-       *     (d0, d1, d2, ..., d(m-1)),
-       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
-       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
-       * If axis == 0 (the default), the output Blob always has the empty shape
-       * (count 1), performing reduction across the entire input --
-       * often useful for creating new loss functions.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000002); - axis_ = 0; - onChanged(); - return this; - } - - private float coeff_ = 1F; - /** - * optional float coeff = 3 [default = 1]; - * - *
-       * coefficient for output
-       * 
- */ - public boolean hasCoeff() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float coeff = 3 [default = 1]; - * - *
-       * coefficient for output
-       * 
- */ - public float getCoeff() { - return coeff_; - } - /** - * optional float coeff = 3 [default = 1]; - * - *
-       * coefficient for output
-       * 
- */ - public Builder setCoeff(float value) { - bitField0_ |= 0x00000004; - coeff_ = value; - onChanged(); - return this; - } - /** - * optional float coeff = 3 [default = 1]; - * - *
-       * coefficient for output
-       * 
- */ - public Builder clearCoeff() { - bitField0_ = (bitField0_ & ~0x00000004); - coeff_ = 1F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ReductionParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ReductionParameter) - private static final caffe.Caffe.ReductionParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ReductionParameter(); - } - - public static caffe.Caffe.ReductionParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ReductionParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ReductionParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ReductionParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ReLUParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ReLUParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-     * Allow non-zero slope for negative inputs to speed up optimization
-     * Described in:
-     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-     * improve neural network acoustic models. In ICML Workshop on Deep Learning
-     * for Audio, Speech, and Language Processing.
-     * 
- */ - boolean hasNegativeSlope(); - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-     * Allow non-zero slope for negative inputs to speed up optimization
-     * Described in:
-     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-     * improve neural network acoustic models. In ICML Workshop on Deep Learning
-     * for Audio, Speech, and Language Processing.
-     * 
- */ - float getNegativeSlope(); - - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - caffe.Caffe.ReLUParameter.Engine getEngine(); - } - /** - * Protobuf type {@code caffe.ReLUParameter} - * - *
-   * Message that stores parameters used by ReLULayer
-   * 
- */ - public static final class ReLUParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ReLUParameter) - ReLUParameterOrBuilder { - // Use ReLUParameter.newBuilder() to construct. - private ReLUParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ReLUParameter() { - negativeSlope_ = 0F; - engine_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReLUParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - negativeSlope_ = input.readFloat(); - break; - } - case 16: { - int rawValue = input.readEnum(); - caffe.Caffe.ReLUParameter.Engine value = caffe.Caffe.ReLUParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - engine_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ReLUParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReLUParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReLUParameter.class, caffe.Caffe.ReLUParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.ReLUParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.ReLUParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.ReLUParameter.Engine) - } - - private int bitField0_; - public static final int NEGATIVE_SLOPE_FIELD_NUMBER = 1; - private float negativeSlope_; - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-     * Allow non-zero slope for negative inputs to speed up optimization
-     * Described in:
-     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-     * improve neural network acoustic models. In ICML Workshop on Deep Learning
-     * for Audio, Speech, and Language Processing.
-     * 
- */ - public boolean hasNegativeSlope() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-     * Allow non-zero slope for negative inputs to speed up optimization
-     * Described in:
-     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-     * improve neural network acoustic models. In ICML Workshop on Deep Learning
-     * for Audio, Speech, and Language Processing.
-     * 
- */ - public float getNegativeSlope() { - return negativeSlope_; - } - - public static final int ENGINE_FIELD_NUMBER = 2; - private int engine_; - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public caffe.Caffe.ReLUParameter.Engine getEngine() { - caffe.Caffe.ReLUParameter.Engine result = caffe.Caffe.ReLUParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.ReLUParameter.Engine.DEFAULT : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, negativeSlope_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, engine_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, negativeSlope_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, engine_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ReLUParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReLUParameter 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.ReLUParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReLUParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ReLUParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReLUParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReLUParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ReLUParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReLUParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReLUParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ReLUParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ReLUParameter} - * - *
-     * Message that stores parameters used by ReLULayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ReLUParameter) - caffe.Caffe.ReLUParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ReLUParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReLUParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReLUParameter.class, caffe.Caffe.ReLUParameter.Builder.class); - } - - // Construct using caffe.Caffe.ReLUParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - negativeSlope_ = 0F; - bitField0_ = (bitField0_ & ~0x00000001); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ReLUParameter_descriptor; - } - - public caffe.Caffe.ReLUParameter getDefaultInstanceForType() { - return caffe.Caffe.ReLUParameter.getDefaultInstance(); - } - - public caffe.Caffe.ReLUParameter build() { - caffe.Caffe.ReLUParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ReLUParameter buildPartial() { - caffe.Caffe.ReLUParameter result = new caffe.Caffe.ReLUParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.negativeSlope_ = negativeSlope_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.engine_ = engine_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ReLUParameter) { - return mergeFrom((caffe.Caffe.ReLUParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ReLUParameter other) { - if (other == caffe.Caffe.ReLUParameter.getDefaultInstance()) return this; - if (other.hasNegativeSlope()) { - setNegativeSlope(other.getNegativeSlope()); - } - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ReLUParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ReLUParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float negativeSlope_ ; - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-       * Allow non-zero slope for negative inputs to speed up optimization
-       * Described in:
-       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-       * improve neural network acoustic models. In ICML Workshop on Deep Learning
-       * for Audio, Speech, and Language Processing.
-       * 
- */ - public boolean hasNegativeSlope() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-       * Allow non-zero slope for negative inputs to speed up optimization
-       * Described in:
-       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-       * improve neural network acoustic models. In ICML Workshop on Deep Learning
-       * for Audio, Speech, and Language Processing.
-       * 
- */ - public float getNegativeSlope() { - return negativeSlope_; - } - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-       * Allow non-zero slope for negative inputs to speed up optimization
-       * Described in:
-       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-       * improve neural network acoustic models. In ICML Workshop on Deep Learning
-       * for Audio, Speech, and Language Processing.
-       * 
- */ - public Builder setNegativeSlope(float value) { - bitField0_ |= 0x00000001; - negativeSlope_ = value; - onChanged(); - return this; - } - /** - * optional float negative_slope = 1 [default = 0]; - * - *
-       * Allow non-zero slope for negative inputs to speed up optimization
-       * Described in:
-       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
-       * improve neural network acoustic models. In ICML Workshop on Deep Learning
-       * for Audio, Speech, and Language Processing.
-       * 
- */ - public Builder clearNegativeSlope() { - bitField0_ = (bitField0_ & ~0x00000001); - negativeSlope_ = 0F; - onChanged(); - return this; - } - - private int engine_ = 0; - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public caffe.Caffe.ReLUParameter.Engine getEngine() { - caffe.Caffe.ReLUParameter.Engine result = caffe.Caffe.ReLUParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.ReLUParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.ReLUParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000002); - engine_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ReLUParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ReLUParameter) - private static final caffe.Caffe.ReLUParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ReLUParameter(); - } - - public static caffe.Caffe.ReLUParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ReLUParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ReLUParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ReLUParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ReshapeParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ReshapeParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - boolean hasShape(); - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - caffe.Caffe.BlobShape getShape(); - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder(); - - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * axis and num_axes control the portion of the bottom blob's shape that are
-     * replaced by (included in) the reshape. By default (axis == 0 and
-     * num_axes == -1), the entire bottom blob shape is included in the reshape,
-     * and hence the shape field must specify the entire output shape.
-     * axis may be non-zero to retain some portion of the beginning of the input
-     * shape (and may be negative to index from the end; e.g., -1 to begin the
-     * reshape after the last axis, including nothing in the reshape,
-     * -2 to include only the last axis, etc.).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are all equivalent,
-     * producing a blob "output" with shape 2 x 2 x 4:
-     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-     * num_axes specifies the extent of the reshape.
-     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-     * input axes in the range [axis, axis+num_axes].
-     * num_axes may also be -1, the default, to include all remaining axes
-     * (starting from axis).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are equivalent,
-     * producing a blob "output" with shape 1 x 2 x 8.
-     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-     * On the other hand, these would produce output blob shape 2 x 1 x 8:
-     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * axis and num_axes control the portion of the bottom blob's shape that are
-     * replaced by (included in) the reshape. By default (axis == 0 and
-     * num_axes == -1), the entire bottom blob shape is included in the reshape,
-     * and hence the shape field must specify the entire output shape.
-     * axis may be non-zero to retain some portion of the beginning of the input
-     * shape (and may be negative to index from the end; e.g., -1 to begin the
-     * reshape after the last axis, including nothing in the reshape,
-     * -2 to include only the last axis, etc.).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are all equivalent,
-     * producing a blob "output" with shape 2 x 2 x 4:
-     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-     * num_axes specifies the extent of the reshape.
-     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-     * input axes in the range [axis, axis+num_axes].
-     * num_axes may also be -1, the default, to include all remaining axes
-     * (starting from axis).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are equivalent,
-     * producing a blob "output" with shape 1 x 2 x 8.
-     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-     * On the other hand, these would produce output blob shape 2 x 1 x 8:
-     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-     * 
- */ - int getAxis(); - - /** - * optional int32 num_axes = 3 [default = -1]; - */ - boolean hasNumAxes(); - /** - * optional int32 num_axes = 3 [default = -1]; - */ - int getNumAxes(); - } - /** - * Protobuf type {@code caffe.ReshapeParameter} - */ - public static final class ReshapeParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ReshapeParameter) - ReshapeParameterOrBuilder { - // Use ReshapeParameter.newBuilder() to construct. - private ReshapeParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ReshapeParameter() { - axis_ = 0; - numAxes_ = -1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReshapeParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - 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 16: { - bitField0_ |= 0x00000002; - axis_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - numAxes_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ReshapeParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReshapeParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReshapeParameter.class, caffe.Caffe.ReshapeParameter.Builder.class); - } - - private int bitField0_; - public static final int SHAPE_FIELD_NUMBER = 1; - private caffe.Caffe.BlobShape shape_; - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - public boolean hasShape() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - public caffe.Caffe.BlobShape getShape() { - return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-     * Specify the output dimensions. If some of the dimensions are set to 0,
-     * the corresponding dimension from the bottom layer is used (unchanged).
-     * Exactly one dimension may be set to -1, in which case its value is
-     * inferred from the count of the bottom blob and the remaining dimensions.
-     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-     *   layer {
-     *     type: "Reshape" bottom: "input" top: "output"
-     *     reshape_param { ... }
-     *   }
-     * If "input" is 2D with shape 2 x 8, then the following reshape_param
-     * specifications are all equivalent, producing a 3D blob "output" with shape
-     * 2 x 2 x 4:
-     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-     * 
- */ - public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { - return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } - - public static final int AXIS_FIELD_NUMBER = 2; - private int axis_; - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * axis and num_axes control the portion of the bottom blob's shape that are
-     * replaced by (included in) the reshape. By default (axis == 0 and
-     * num_axes == -1), the entire bottom blob shape is included in the reshape,
-     * and hence the shape field must specify the entire output shape.
-     * axis may be non-zero to retain some portion of the beginning of the input
-     * shape (and may be negative to index from the end; e.g., -1 to begin the
-     * reshape after the last axis, including nothing in the reshape,
-     * -2 to include only the last axis, etc.).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are all equivalent,
-     * producing a blob "output" with shape 2 x 2 x 4:
-     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-     * num_axes specifies the extent of the reshape.
-     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-     * input axes in the range [axis, axis+num_axes].
-     * num_axes may also be -1, the default, to include all remaining axes
-     * (starting from axis).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are equivalent,
-     * producing a blob "output" with shape 1 x 2 x 8.
-     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-     * On the other hand, these would produce output blob shape 2 x 1 x 8:
-     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-     * axis and num_axes control the portion of the bottom blob's shape that are
-     * replaced by (included in) the reshape. By default (axis == 0 and
-     * num_axes == -1), the entire bottom blob shape is included in the reshape,
-     * and hence the shape field must specify the entire output shape.
-     * axis may be non-zero to retain some portion of the beginning of the input
-     * shape (and may be negative to index from the end; e.g., -1 to begin the
-     * reshape after the last axis, including nothing in the reshape,
-     * -2 to include only the last axis, etc.).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are all equivalent,
-     * producing a blob "output" with shape 2 x 2 x 4:
-     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-     * num_axes specifies the extent of the reshape.
-     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-     * input axes in the range [axis, axis+num_axes].
-     * num_axes may also be -1, the default, to include all remaining axes
-     * (starting from axis).
-     * For example, suppose "input" is a 2D blob with shape 2 x 8.
-     * Then the following ReshapeLayer specifications are equivalent,
-     * producing a blob "output" with shape 1 x 2 x 8.
-     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-     * On the other hand, these would produce output blob shape 2 x 1 x 8:
-     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int NUM_AXES_FIELD_NUMBER = 3; - private int numAxes_; - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public boolean hasNumAxes() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public int getNumAxes() { - return numAxes_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, getShape()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, numAxes_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getShape()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, axis_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, numAxes_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ReshapeParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReshapeParameter 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.ReshapeParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ReshapeParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ReshapeParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReshapeParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReshapeParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ReshapeParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ReshapeParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ReshapeParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ReshapeParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ReshapeParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ReshapeParameter) - caffe.Caffe.ReshapeParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ReshapeParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ReshapeParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ReshapeParameter.class, caffe.Caffe.ReshapeParameter.Builder.class); - } - - // Construct using caffe.Caffe.ReshapeParameter.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(); - } - } - public Builder clear() { - super.clear(); - if (shapeBuilder_ == null) { - shape_ = null; - } else { - shapeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - numAxes_ = -1; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ReshapeParameter_descriptor; - } - - public caffe.Caffe.ReshapeParameter getDefaultInstanceForType() { - return caffe.Caffe.ReshapeParameter.getDefaultInstance(); - } - - public caffe.Caffe.ReshapeParameter build() { - caffe.Caffe.ReshapeParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ReshapeParameter buildPartial() { - caffe.Caffe.ReshapeParameter result = new caffe.Caffe.ReshapeParameter(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 (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.numAxes_ = numAxes_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ReshapeParameter) { - return mergeFrom((caffe.Caffe.ReshapeParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ReshapeParameter other) { - if (other == caffe.Caffe.ReshapeParameter.getDefaultInstance()) return this; - if (other.hasShape()) { - mergeShape(other.getShape()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasNumAxes()) { - setNumAxes(other.getNumAxes()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ReshapeParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ReshapeParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private caffe.Caffe.BlobShape shape_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_; - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public boolean hasShape() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public caffe.Caffe.BlobShape getShape() { - if (shapeBuilder_ == null) { - return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } else { - return shapeBuilder_.getMessage(); - } - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - 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 = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - 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 = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public Builder mergeShape(caffe.Caffe.BlobShape value) { - if (shapeBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - shape_ != null && - 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 = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = null; - onChanged(); - } else { - shapeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public caffe.Caffe.BlobShape.Builder getShapeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getShapeFieldBuilder().getBuilder(); - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { - if (shapeBuilder_ != null) { - return shapeBuilder_.getMessageOrBuilder(); - } else { - return shape_ == null ? - caffe.Caffe.BlobShape.getDefaultInstance() : shape_; - } - } - /** - * optional .caffe.BlobShape shape = 1; - * - *
-       * Specify the output dimensions. If some of the dimensions are set to 0,
-       * the corresponding dimension from the bottom layer is used (unchanged).
-       * Exactly one dimension may be set to -1, in which case its value is
-       * inferred from the count of the bottom blob and the remaining dimensions.
-       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
-       *   layer {
-       *     type: "Reshape" bottom: "input" top: "output"
-       *     reshape_param { ... }
-       *   }
-       * If "input" is 2D with shape 2 x 8, then the following reshape_param
-       * specifications are all equivalent, producing a 3D blob "output" with shape
-       * 2 x 2 x 4:
-       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
-       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
-       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
-       * 
- */ - 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>( - getShape(), - getParentForChildren(), - isClean()); - shape_ = null; - } - return shapeBuilder_; - } - - private int axis_ ; - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * axis and num_axes control the portion of the bottom blob's shape that are
-       * replaced by (included in) the reshape. By default (axis == 0 and
-       * num_axes == -1), the entire bottom blob shape is included in the reshape,
-       * and hence the shape field must specify the entire output shape.
-       * axis may be non-zero to retain some portion of the beginning of the input
-       * shape (and may be negative to index from the end; e.g., -1 to begin the
-       * reshape after the last axis, including nothing in the reshape,
-       * -2 to include only the last axis, etc.).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are all equivalent,
-       * producing a blob "output" with shape 2 x 2 x 4:
-       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-       * num_axes specifies the extent of the reshape.
-       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-       * input axes in the range [axis, axis+num_axes].
-       * num_axes may also be -1, the default, to include all remaining axes
-       * (starting from axis).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are equivalent,
-       * producing a blob "output" with shape 1 x 2 x 8.
-       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-       * On the other hand, these would produce output blob shape 2 x 1 x 8:
-       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * axis and num_axes control the portion of the bottom blob's shape that are
-       * replaced by (included in) the reshape. By default (axis == 0 and
-       * num_axes == -1), the entire bottom blob shape is included in the reshape,
-       * and hence the shape field must specify the entire output shape.
-       * axis may be non-zero to retain some portion of the beginning of the input
-       * shape (and may be negative to index from the end; e.g., -1 to begin the
-       * reshape after the last axis, including nothing in the reshape,
-       * -2 to include only the last axis, etc.).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are all equivalent,
-       * producing a blob "output" with shape 2 x 2 x 4:
-       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-       * num_axes specifies the extent of the reshape.
-       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-       * input axes in the range [axis, axis+num_axes].
-       * num_axes may also be -1, the default, to include all remaining axes
-       * (starting from axis).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are equivalent,
-       * producing a blob "output" with shape 1 x 2 x 8.
-       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-       * On the other hand, these would produce output blob shape 2 x 1 x 8:
-       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * axis and num_axes control the portion of the bottom blob's shape that are
-       * replaced by (included in) the reshape. By default (axis == 0 and
-       * num_axes == -1), the entire bottom blob shape is included in the reshape,
-       * and hence the shape field must specify the entire output shape.
-       * axis may be non-zero to retain some portion of the beginning of the input
-       * shape (and may be negative to index from the end; e.g., -1 to begin the
-       * reshape after the last axis, including nothing in the reshape,
-       * -2 to include only the last axis, etc.).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are all equivalent,
-       * producing a blob "output" with shape 2 x 2 x 4:
-       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-       * num_axes specifies the extent of the reshape.
-       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-       * input axes in the range [axis, axis+num_axes].
-       * num_axes may also be -1, the default, to include all remaining axes
-       * (starting from axis).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are equivalent,
-       * producing a blob "output" with shape 1 x 2 x 8.
-       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-       * On the other hand, these would produce output blob shape 2 x 1 x 8:
-       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000002; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 2 [default = 0]; - * - *
-       * axis and num_axes control the portion of the bottom blob's shape that are
-       * replaced by (included in) the reshape. By default (axis == 0 and
-       * num_axes == -1), the entire bottom blob shape is included in the reshape,
-       * and hence the shape field must specify the entire output shape.
-       * axis may be non-zero to retain some portion of the beginning of the input
-       * shape (and may be negative to index from the end; e.g., -1 to begin the
-       * reshape after the last axis, including nothing in the reshape,
-       * -2 to include only the last axis, etc.).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are all equivalent,
-       * producing a blob "output" with shape 2 x 2 x 4:
-       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
-       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
-       * num_axes specifies the extent of the reshape.
-       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
-       * input axes in the range [axis, axis+num_axes].
-       * num_axes may also be -1, the default, to include all remaining axes
-       * (starting from axis).
-       * For example, suppose "input" is a 2D blob with shape 2 x 8.
-       * Then the following ReshapeLayer specifications are equivalent,
-       * producing a blob "output" with shape 1 x 2 x 8.
-       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
-       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
-       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
-       * On the other hand, these would produce output blob shape 2 x 1 x 8:
-       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
-       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000002); - axis_ = 0; - onChanged(); - return this; - } - - private int numAxes_ = -1; - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public boolean hasNumAxes() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public int getNumAxes() { - return numAxes_; - } - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public Builder setNumAxes(int value) { - bitField0_ |= 0x00000004; - numAxes_ = value; - onChanged(); - return this; - } - /** - * optional int32 num_axes = 3 [default = -1]; - */ - public Builder clearNumAxes() { - bitField0_ = (bitField0_ & ~0x00000004); - numAxes_ = -1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ReshapeParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ReshapeParameter) - private static final caffe.Caffe.ReshapeParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ReshapeParameter(); - } - - public static caffe.Caffe.ReshapeParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ReshapeParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ReshapeParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ReshapeParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SigmoidParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SigmoidParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - caffe.Caffe.SigmoidParameter.Engine getEngine(); - } - /** - * Protobuf type {@code caffe.SigmoidParameter} - */ - public static final class SigmoidParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.SigmoidParameter) - SigmoidParameterOrBuilder { - // Use SigmoidParameter.newBuilder() to construct. - private SigmoidParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SigmoidParameter() { - engine_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SigmoidParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.SigmoidParameter.Engine value = caffe.Caffe.SigmoidParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - engine_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_SigmoidParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SigmoidParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SigmoidParameter.class, caffe.Caffe.SigmoidParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.SigmoidParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.SigmoidParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.SigmoidParameter.Engine) - } - - private int bitField0_; - public static final int ENGINE_FIELD_NUMBER = 1; - private int engine_; - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.SigmoidParameter.Engine getEngine() { - caffe.Caffe.SigmoidParameter.Engine result = caffe.Caffe.SigmoidParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SigmoidParameter.Engine.DEFAULT : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, engine_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, engine_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.SigmoidParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SigmoidParameter 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.SigmoidParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SigmoidParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.SigmoidParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SigmoidParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.SigmoidParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.SigmoidParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.SigmoidParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SigmoidParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SigmoidParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.SigmoidParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.SigmoidParameter) - caffe.Caffe.SigmoidParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_SigmoidParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SigmoidParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SigmoidParameter.class, caffe.Caffe.SigmoidParameter.Builder.class); - } - - // Construct using caffe.Caffe.SigmoidParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_SigmoidParameter_descriptor; - } - - public caffe.Caffe.SigmoidParameter getDefaultInstanceForType() { - return caffe.Caffe.SigmoidParameter.getDefaultInstance(); - } - - public caffe.Caffe.SigmoidParameter build() { - caffe.Caffe.SigmoidParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.SigmoidParameter buildPartial() { - caffe.Caffe.SigmoidParameter result = new caffe.Caffe.SigmoidParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.engine_ = engine_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.SigmoidParameter) { - return mergeFrom((caffe.Caffe.SigmoidParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.SigmoidParameter other) { - if (other == caffe.Caffe.SigmoidParameter.getDefaultInstance()) return this; - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.SigmoidParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.SigmoidParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int engine_ = 0; - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.SigmoidParameter.Engine getEngine() { - caffe.Caffe.SigmoidParameter.Engine result = caffe.Caffe.SigmoidParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SigmoidParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.SigmoidParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000001); - engine_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.SigmoidParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.SigmoidParameter) - private static final caffe.Caffe.SigmoidParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SigmoidParameter(); - } - - public static caffe.Caffe.SigmoidParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public SigmoidParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new SigmoidParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SigmoidParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SliceParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SliceParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 axis = 3 [default = 1]; - * - *
-     * The axis along which to slice -- may be negative to index from the end
-     * (e.g., -1 for the last axis).
-     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 3 [default = 1]; - * - *
-     * The axis along which to slice -- may be negative to index from the end
-     * (e.g., -1 for the last axis).
-     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - int getAxis(); - - /** - * repeated uint32 slice_point = 2; - */ - java.util.List getSlicePointList(); - /** - * repeated uint32 slice_point = 2; - */ - int getSlicePointCount(); - /** - * repeated uint32 slice_point = 2; - */ - int getSlicePoint(int index); - - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - boolean hasSliceDim(); - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - int getSliceDim(); - } - /** - * Protobuf type {@code caffe.SliceParameter} - */ - public static final class SliceParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.SliceParameter) - SliceParameterOrBuilder { - // Use SliceParameter.newBuilder() to construct. - private SliceParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SliceParameter() { - axis_ = 1; - slicePoint_ = java.util.Collections.emptyList(); - sliceDim_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SliceParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - sliceDim_ = input.readUInt32(); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - slicePoint_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - slicePoint_.add(input.readUInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { - slicePoint_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - slicePoint_.add(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - bitField0_ |= 0x00000001; - axis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - slicePoint_ = java.util.Collections.unmodifiableList(slicePoint_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SliceParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SliceParameter.class, caffe.Caffe.SliceParameter.Builder.class); - } - - private int bitField0_; - public static final int AXIS_FIELD_NUMBER = 3; - private int axis_; - /** - * optional int32 axis = 3 [default = 1]; - * - *
-     * The axis along which to slice -- may be negative to index from the end
-     * (e.g., -1 for the last axis).
-     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 3 [default = 1]; - * - *
-     * The axis along which to slice -- may be negative to index from the end
-     * (e.g., -1 for the last axis).
-     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int SLICE_POINT_FIELD_NUMBER = 2; - private java.util.List slicePoint_; - /** - * repeated uint32 slice_point = 2; - */ - public java.util.List - getSlicePointList() { - return slicePoint_; - } - /** - * repeated uint32 slice_point = 2; - */ - public int getSlicePointCount() { - return slicePoint_.size(); - } - /** - * repeated uint32 slice_point = 2; - */ - public int getSlicePoint(int index) { - return slicePoint_.get(index); - } - - public static final int SLICE_DIM_FIELD_NUMBER = 1; - private int sliceDim_; - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - public boolean hasSliceDim() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-     * DEPRECATED: alias for "axis" -- does not support negative indexing.
-     * 
- */ - public int getSliceDim() { - return sliceDim_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(1, sliceDim_); - } - for (int i = 0; i < slicePoint_.size(); i++) { - output.writeUInt32(2, slicePoint_.get(i)); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(3, axis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, sliceDim_); - } - { - int dataSize = 0; - for (int i = 0; i < slicePoint_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(slicePoint_.get(i)); - } - size += dataSize; - size += 1 * getSlicePointList().size(); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, axis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.SliceParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SliceParameter 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.SliceParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SliceParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.SliceParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SliceParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.SliceParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.SliceParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.SliceParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SliceParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SliceParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.SliceParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.SliceParameter) - caffe.Caffe.SliceParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SliceParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SliceParameter.class, caffe.Caffe.SliceParameter.Builder.class); - } - - // Construct using caffe.Caffe.SliceParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - slicePoint_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - sliceDim_ = 1; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; - } - - public caffe.Caffe.SliceParameter getDefaultInstanceForType() { - return caffe.Caffe.SliceParameter.getDefaultInstance(); - } - - public caffe.Caffe.SliceParameter build() { - caffe.Caffe.SliceParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.SliceParameter buildPartial() { - caffe.Caffe.SliceParameter result = new caffe.Caffe.SliceParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.axis_ = axis_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - slicePoint_ = java.util.Collections.unmodifiableList(slicePoint_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.slicePoint_ = slicePoint_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; - } - result.sliceDim_ = sliceDim_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.SliceParameter) { - return mergeFrom((caffe.Caffe.SliceParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.SliceParameter other) { - if (other == caffe.Caffe.SliceParameter.getDefaultInstance()) return this; - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (!other.slicePoint_.isEmpty()) { - if (slicePoint_.isEmpty()) { - slicePoint_ = other.slicePoint_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSlicePointIsMutable(); - slicePoint_.addAll(other.slicePoint_); - } - onChanged(); - } - if (other.hasSliceDim()) { - setSliceDim(other.getSliceDim()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.SliceParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.SliceParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int axis_ = 1; - /** - * optional int32 axis = 3 [default = 1]; - * - *
-       * The axis along which to slice -- may be negative to index from the end
-       * (e.g., -1 for the last axis).
-       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 3 [default = 1]; - * - *
-       * The axis along which to slice -- may be negative to index from the end
-       * (e.g., -1 for the last axis).
-       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 3 [default = 1]; - * - *
-       * The axis along which to slice -- may be negative to index from the end
-       * (e.g., -1 for the last axis).
-       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000001; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 3 [default = 1]; - * - *
-       * The axis along which to slice -- may be negative to index from the end
-       * (e.g., -1 for the last axis).
-       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - onChanged(); - return this; - } - - private java.util.List slicePoint_ = java.util.Collections.emptyList(); - private void ensureSlicePointIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - slicePoint_ = new java.util.ArrayList(slicePoint_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated uint32 slice_point = 2; - */ - public java.util.List - getSlicePointList() { - return java.util.Collections.unmodifiableList(slicePoint_); - } - /** - * repeated uint32 slice_point = 2; - */ - public int getSlicePointCount() { - return slicePoint_.size(); - } - /** - * repeated uint32 slice_point = 2; - */ - public int getSlicePoint(int index) { - return slicePoint_.get(index); - } - /** - * repeated uint32 slice_point = 2; - */ - public Builder setSlicePoint( - int index, int value) { - ensureSlicePointIsMutable(); - slicePoint_.set(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 slice_point = 2; - */ - public Builder addSlicePoint(int value) { - ensureSlicePointIsMutable(); - slicePoint_.add(value); - onChanged(); - return this; - } - /** - * repeated uint32 slice_point = 2; - */ - public Builder addAllSlicePoint( - java.lang.Iterable values) { - ensureSlicePointIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, slicePoint_); - onChanged(); - return this; - } - /** - * repeated uint32 slice_point = 2; - */ - public Builder clearSlicePoint() { - slicePoint_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private int sliceDim_ = 1; - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public boolean hasSliceDim() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public int getSliceDim() { - return sliceDim_; - } - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public Builder setSliceDim(int value) { - bitField0_ |= 0x00000004; - sliceDim_ = value; - onChanged(); - return this; - } - /** - * optional uint32 slice_dim = 1 [default = 1]; - * - *
-       * DEPRECATED: alias for "axis" -- does not support negative indexing.
-       * 
- */ - public Builder clearSliceDim() { - bitField0_ = (bitField0_ & ~0x00000004); - sliceDim_ = 1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.SliceParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.SliceParameter) - private static final caffe.Caffe.SliceParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SliceParameter(); - } - - public static caffe.Caffe.SliceParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public SliceParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new SliceParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SliceParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SoftmaxParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SoftmaxParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - caffe.Caffe.SoftmaxParameter.Engine getEngine(); - - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to perform the softmax -- may be negative to index
-     * from the end (e.g., -1 for the last axis).
-     * Any other axes will be evaluated as independent softmaxes.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to perform the softmax -- may be negative to index
-     * from the end (e.g., -1 for the last axis).
-     * Any other axes will be evaluated as independent softmaxes.
-     * 
- */ - int getAxis(); - } - /** - * Protobuf type {@code caffe.SoftmaxParameter} - * - *
-   * Message that stores parameters used by SoftmaxLayer, SoftmaxWithLossLayer
-   * 
- */ - public static final class SoftmaxParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.SoftmaxParameter) - SoftmaxParameterOrBuilder { - // Use SoftmaxParameter.newBuilder() to construct. - private SoftmaxParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SoftmaxParameter() { - engine_ = 0; - axis_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SoftmaxParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.SoftmaxParameter.Engine value = caffe.Caffe.SoftmaxParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - engine_ = rawValue; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - axis_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_SoftmaxParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SoftmaxParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SoftmaxParameter.class, caffe.Caffe.SoftmaxParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.SoftmaxParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.SoftmaxParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.SoftmaxParameter.Engine) - } - - private int bitField0_; - public static final int ENGINE_FIELD_NUMBER = 1; - private int engine_; - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.SoftmaxParameter.Engine getEngine() { - caffe.Caffe.SoftmaxParameter.Engine result = caffe.Caffe.SoftmaxParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SoftmaxParameter.Engine.DEFAULT : result; - } - - public static final int AXIS_FIELD_NUMBER = 2; - private int axis_; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to perform the softmax -- may be negative to index
-     * from the end (e.g., -1 for the last axis).
-     * Any other axes will be evaluated as independent softmaxes.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-     * The axis along which to perform the softmax -- may be negative to index
-     * from the end (e.g., -1 for the last axis).
-     * Any other axes will be evaluated as independent softmaxes.
-     * 
- */ - public int getAxis() { - return axis_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, engine_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, axis_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, engine_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, axis_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.SoftmaxParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SoftmaxParameter 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.SoftmaxParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SoftmaxParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.SoftmaxParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SoftmaxParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.SoftmaxParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.SoftmaxParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.SoftmaxParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SoftmaxParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SoftmaxParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.SoftmaxParameter} - * - *
-     * Message that stores parameters used by SoftmaxLayer, SoftmaxWithLossLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.SoftmaxParameter) - caffe.Caffe.SoftmaxParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_SoftmaxParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SoftmaxParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SoftmaxParameter.class, caffe.Caffe.SoftmaxParameter.Builder.class); - } - - // Construct using caffe.Caffe.SoftmaxParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_SoftmaxParameter_descriptor; - } - - public caffe.Caffe.SoftmaxParameter getDefaultInstanceForType() { - return caffe.Caffe.SoftmaxParameter.getDefaultInstance(); - } - - public caffe.Caffe.SoftmaxParameter build() { - caffe.Caffe.SoftmaxParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.SoftmaxParameter buildPartial() { - caffe.Caffe.SoftmaxParameter result = new caffe.Caffe.SoftmaxParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.engine_ = engine_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.axis_ = axis_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.SoftmaxParameter) { - return mergeFrom((caffe.Caffe.SoftmaxParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.SoftmaxParameter other) { - if (other == caffe.Caffe.SoftmaxParameter.getDefaultInstance()) return this; - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.SoftmaxParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.SoftmaxParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int engine_ = 0; - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.SoftmaxParameter.Engine getEngine() { - caffe.Caffe.SoftmaxParameter.Engine result = caffe.Caffe.SoftmaxParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SoftmaxParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.SoftmaxParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000001); - engine_ = 0; - onChanged(); - return this; - } - - private int axis_ = 1; - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to perform the softmax -- may be negative to index
-       * from the end (e.g., -1 for the last axis).
-       * Any other axes will be evaluated as independent softmaxes.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to perform the softmax -- may be negative to index
-       * from the end (e.g., -1 for the last axis).
-       * Any other axes will be evaluated as independent softmaxes.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to perform the softmax -- may be negative to index
-       * from the end (e.g., -1 for the last axis).
-       * Any other axes will be evaluated as independent softmaxes.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000002; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 2 [default = 1]; - * - *
-       * The axis along which to perform the softmax -- may be negative to index
-       * from the end (e.g., -1 for the last axis).
-       * Any other axes will be evaluated as independent softmaxes.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000002); - axis_ = 1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.SoftmaxParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.SoftmaxParameter) - private static final caffe.Caffe.SoftmaxParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SoftmaxParameter(); - } - - public static caffe.Caffe.SoftmaxParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public SoftmaxParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new SoftmaxParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SoftmaxParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TanHParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.TanHParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - caffe.Caffe.TanHParameter.Engine getEngine(); - } - /** - * Protobuf type {@code caffe.TanHParameter} - */ - public static final class TanHParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.TanHParameter) - TanHParameterOrBuilder { - // Use TanHParameter.newBuilder() to construct. - private TanHParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TanHParameter() { - engine_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TanHParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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.TanHParameter.Engine value = caffe.Caffe.TanHParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - engine_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_TanHParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TanHParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TanHParameter.class, caffe.Caffe.TanHParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.TanHParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.TanHParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.TanHParameter.Engine) - } - - private int bitField0_; - public static final int ENGINE_FIELD_NUMBER = 1; - private int engine_; - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.TanHParameter.Engine getEngine() { - caffe.Caffe.TanHParameter.Engine result = caffe.Caffe.TanHParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.TanHParameter.Engine.DEFAULT : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, engine_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, engine_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.TanHParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TanHParameter 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.TanHParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TanHParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.TanHParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TanHParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.TanHParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.TanHParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.TanHParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TanHParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.TanHParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.TanHParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.TanHParameter) - caffe.Caffe.TanHParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_TanHParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TanHParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TanHParameter.class, caffe.Caffe.TanHParameter.Builder.class); - } - - // Construct using caffe.Caffe.TanHParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_TanHParameter_descriptor; - } - - public caffe.Caffe.TanHParameter getDefaultInstanceForType() { - return caffe.Caffe.TanHParameter.getDefaultInstance(); - } - - public caffe.Caffe.TanHParameter build() { - caffe.Caffe.TanHParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.TanHParameter buildPartial() { - caffe.Caffe.TanHParameter result = new caffe.Caffe.TanHParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.engine_ = engine_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.TanHParameter) { - return mergeFrom((caffe.Caffe.TanHParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.TanHParameter other) { - if (other == caffe.Caffe.TanHParameter.getDefaultInstance()) return this; - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.TanHParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.TanHParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int engine_ = 0; - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public caffe.Caffe.TanHParameter.Engine getEngine() { - caffe.Caffe.TanHParameter.Engine result = caffe.Caffe.TanHParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.TanHParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.TanHParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000001); - engine_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.TanHParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.TanHParameter) - private static final caffe.Caffe.TanHParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.TanHParameter(); - } - - public static caffe.Caffe.TanHParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TanHParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TanHParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.TanHParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TileParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.TileParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The index of the axis to tile.
-     * 
- */ - boolean hasAxis(); - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The index of the axis to tile.
-     * 
- */ - int getAxis(); - - /** - * optional int32 tiles = 2; - * - *
-     * The number of copies (tiles) of the blob to output.
-     * 
- */ - boolean hasTiles(); - /** - * optional int32 tiles = 2; - * - *
-     * The number of copies (tiles) of the blob to output.
-     * 
- */ - int getTiles(); - } - /** - * Protobuf type {@code caffe.TileParameter} - * - *
-   * Message that stores parameters used by TileLayer
-   * 
- */ - public static final class TileParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.TileParameter) - TileParameterOrBuilder { - // Use TileParameter.newBuilder() to construct. - private TileParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TileParameter() { - axis_ = 1; - tiles_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TileParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - axis_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - tiles_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_TileParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TileParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TileParameter.class, caffe.Caffe.TileParameter.Builder.class); - } - - private int bitField0_; - public static final int AXIS_FIELD_NUMBER = 1; - private int axis_; - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The index of the axis to tile.
-     * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-     * The index of the axis to tile.
-     * 
- */ - public int getAxis() { - return axis_; - } - - public static final int TILES_FIELD_NUMBER = 2; - private int tiles_; - /** - * optional int32 tiles = 2; - * - *
-     * The number of copies (tiles) of the blob to output.
-     * 
- */ - public boolean hasTiles() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 tiles = 2; - * - *
-     * The number of copies (tiles) of the blob to output.
-     * 
- */ - public int getTiles() { - return tiles_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, axis_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, tiles_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, axis_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, tiles_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.TileParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TileParameter 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.TileParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.TileParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.TileParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TileParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.TileParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.TileParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.TileParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.TileParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.TileParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.TileParameter} - * - *
-     * Message that stores parameters used by TileLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.TileParameter) - caffe.Caffe.TileParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_TileParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_TileParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.TileParameter.class, caffe.Caffe.TileParameter.Builder.class); - } - - // Construct using caffe.Caffe.TileParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - axis_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - tiles_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_TileParameter_descriptor; - } - - public caffe.Caffe.TileParameter getDefaultInstanceForType() { - return caffe.Caffe.TileParameter.getDefaultInstance(); - } - - public caffe.Caffe.TileParameter build() { - caffe.Caffe.TileParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.TileParameter buildPartial() { - caffe.Caffe.TileParameter result = new caffe.Caffe.TileParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.axis_ = axis_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.tiles_ = tiles_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.TileParameter) { - return mergeFrom((caffe.Caffe.TileParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.TileParameter other) { - if (other == caffe.Caffe.TileParameter.getDefaultInstance()) return this; - if (other.hasAxis()) { - setAxis(other.getAxis()); - } - if (other.hasTiles()) { - setTiles(other.getTiles()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.TileParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.TileParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int axis_ = 1; - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The index of the axis to tile.
-       * 
- */ - public boolean hasAxis() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The index of the axis to tile.
-       * 
- */ - public int getAxis() { - return axis_; - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The index of the axis to tile.
-       * 
- */ - public Builder setAxis(int value) { - bitField0_ |= 0x00000001; - axis_ = value; - onChanged(); - return this; - } - /** - * optional int32 axis = 1 [default = 1]; - * - *
-       * The index of the axis to tile.
-       * 
- */ - public Builder clearAxis() { - bitField0_ = (bitField0_ & ~0x00000001); - axis_ = 1; - onChanged(); - return this; - } - - private int tiles_ ; - /** - * optional int32 tiles = 2; - * - *
-       * The number of copies (tiles) of the blob to output.
-       * 
- */ - public boolean hasTiles() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 tiles = 2; - * - *
-       * The number of copies (tiles) of the blob to output.
-       * 
- */ - public int getTiles() { - return tiles_; - } - /** - * optional int32 tiles = 2; - * - *
-       * The number of copies (tiles) of the blob to output.
-       * 
- */ - public Builder setTiles(int value) { - bitField0_ |= 0x00000002; - tiles_ = value; - onChanged(); - return this; - } - /** - * optional int32 tiles = 2; - * - *
-       * The number of copies (tiles) of the blob to output.
-       * 
- */ - public Builder clearTiles() { - bitField0_ = (bitField0_ & ~0x00000002); - tiles_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.TileParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.TileParameter) - private static final caffe.Caffe.TileParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.TileParameter(); - } - - public static caffe.Caffe.TileParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TileParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TileParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.TileParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ThresholdParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.ThresholdParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float threshold = 1 [default = 0]; - * - *
-     * Strictly positive values
-     * 
- */ - boolean hasThreshold(); - /** - * optional float threshold = 1 [default = 0]; - * - *
-     * Strictly positive values
-     * 
- */ - float getThreshold(); - } - /** - * Protobuf type {@code caffe.ThresholdParameter} - * - *
-   * Message that stores parameters used by ThresholdLayer
-   * 
- */ - public static final class ThresholdParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.ThresholdParameter) - ThresholdParameterOrBuilder { - // Use ThresholdParameter.newBuilder() to construct. - private ThresholdParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ThresholdParameter() { - threshold_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ThresholdParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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 13: { - bitField0_ |= 0x00000001; - threshold_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_ThresholdParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ThresholdParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ThresholdParameter.class, caffe.Caffe.ThresholdParameter.Builder.class); - } - - private int bitField0_; - public static final int THRESHOLD_FIELD_NUMBER = 1; - private float threshold_; - /** - * optional float threshold = 1 [default = 0]; - * - *
-     * Strictly positive values
-     * 
- */ - public boolean hasThreshold() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float threshold = 1 [default = 0]; - * - *
-     * Strictly positive values
-     * 
- */ - public float getThreshold() { - return threshold_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFloat(1, threshold_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, threshold_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.ThresholdParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ThresholdParameter 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.ThresholdParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.ThresholdParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.ThresholdParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ThresholdParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.ThresholdParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.ThresholdParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.ThresholdParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.ThresholdParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.ThresholdParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.ThresholdParameter} - * - *
-     * Message that stores parameters used by ThresholdLayer
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.ThresholdParameter) - caffe.Caffe.ThresholdParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_ThresholdParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_ThresholdParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.ThresholdParameter.class, caffe.Caffe.ThresholdParameter.Builder.class); - } - - // Construct using caffe.Caffe.ThresholdParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - threshold_ = 0F; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_ThresholdParameter_descriptor; - } - - public caffe.Caffe.ThresholdParameter getDefaultInstanceForType() { - return caffe.Caffe.ThresholdParameter.getDefaultInstance(); - } - - public caffe.Caffe.ThresholdParameter build() { - caffe.Caffe.ThresholdParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.ThresholdParameter buildPartial() { - caffe.Caffe.ThresholdParameter result = new caffe.Caffe.ThresholdParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.threshold_ = threshold_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.ThresholdParameter) { - return mergeFrom((caffe.Caffe.ThresholdParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.ThresholdParameter other) { - if (other == caffe.Caffe.ThresholdParameter.getDefaultInstance()) return this; - if (other.hasThreshold()) { - setThreshold(other.getThreshold()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.ThresholdParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.ThresholdParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private float threshold_ ; - /** - * optional float threshold = 1 [default = 0]; - * - *
-       * Strictly positive values
-       * 
- */ - public boolean hasThreshold() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional float threshold = 1 [default = 0]; - * - *
-       * Strictly positive values
-       * 
- */ - public float getThreshold() { - return threshold_; - } - /** - * optional float threshold = 1 [default = 0]; - * - *
-       * Strictly positive values
-       * 
- */ - public Builder setThreshold(float value) { - bitField0_ |= 0x00000001; - threshold_ = value; - onChanged(); - return this; - } - /** - * optional float threshold = 1 [default = 0]; - * - *
-       * Strictly positive values
-       * 
- */ - public Builder clearThreshold() { - bitField0_ = (bitField0_ & ~0x00000001); - threshold_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.ThresholdParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.ThresholdParameter) - private static final caffe.Caffe.ThresholdParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.ThresholdParameter(); - } - - public static caffe.Caffe.ThresholdParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ThresholdParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ThresholdParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.ThresholdParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WindowDataParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.WindowDataParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - * optional float scale = 2 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - boolean hasScale(); - /** - * optional float scale = 2 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - float getScale(); - - /** - * optional string mean_file = 3; - */ - boolean hasMeanFile(); - /** - * optional string mean_file = 3; - */ - java.lang.String getMeanFile(); - /** - * optional string mean_file = 3; - */ - com.google.protobuf.ByteString - getMeanFileBytes(); - - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - boolean hasBatchSize(); - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - int getBatchSize(); - - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - boolean hasCropSize(); - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - int getCropSize(); - - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - boolean hasMirror(); - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - boolean getMirror(); - - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-     * Foreground (object) overlap threshold
-     * 
- */ - boolean hasFgThreshold(); - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-     * Foreground (object) overlap threshold
-     * 
- */ - float getFgThreshold(); - - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-     * Background (non-object) overlap threshold
-     * 
- */ - boolean hasBgThreshold(); - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-     * Background (non-object) overlap threshold
-     * 
- */ - float getBgThreshold(); - - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - boolean hasFgFraction(); - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - float getFgFraction(); - - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - boolean hasContextPad(); - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - int getContextPad(); - - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - boolean hasCropMode(); - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - java.lang.String getCropMode(); - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - com.google.protobuf.ByteString - getCropModeBytes(); - - /** - * optional bool cache_images = 12 [default = false]; - * - *
-     * cache_images: will load all images in memory for faster access
-     * 
- */ - boolean hasCacheImages(); - /** - * optional bool cache_images = 12 [default = false]; - * - *
-     * cache_images: will load all images in memory for faster access
-     * 
- */ - boolean getCacheImages(); - - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - boolean hasRootFolder(); - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - java.lang.String getRootFolder(); - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - com.google.protobuf.ByteString - getRootFolderBytes(); - } - /** - * Protobuf type {@code caffe.WindowDataParameter} - */ - public static final class WindowDataParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.WindowDataParameter) - WindowDataParameterOrBuilder { - // Use WindowDataParameter.newBuilder() to construct. - private WindowDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WindowDataParameter() { - source_ = ""; - scale_ = 1F; - meanFile_ = ""; - batchSize_ = 0; - cropSize_ = 0; - mirror_ = false; - fgThreshold_ = 0.5F; - bgThreshold_ = 0.5F; - fgFraction_ = 0.25F; - contextPad_ = 0; - cropMode_ = "warp"; - cacheImages_ = false; - rootFolder_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WindowDataParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - source_ = bs; - break; - } - case 21: { - bitField0_ |= 0x00000002; - scale_ = input.readFloat(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - meanFile_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000008; - batchSize_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - cropSize_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - mirror_ = input.readBool(); - break; - } - case 61: { - bitField0_ |= 0x00000040; - fgThreshold_ = input.readFloat(); - break; - } - case 69: { - bitField0_ |= 0x00000080; - bgThreshold_ = input.readFloat(); - break; - } - case 77: { - bitField0_ |= 0x00000100; - fgFraction_ = input.readFloat(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - contextPad_ = input.readUInt32(); - break; - } - case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000400; - cropMode_ = bs; - break; - } - case 96: { - bitField0_ |= 0x00000800; - cacheImages_ = input.readBool(); - break; - } - case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00001000; - rootFolder_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_WindowDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_WindowDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.WindowDataParameter.class, caffe.Caffe.WindowDataParameter.Builder.class); - } - - private int bitField0_; - public static final int SOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 1; - * - *
-     * Specify the data source.
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCALE_FIELD_NUMBER = 2; - private float scale_; - /** - * optional float scale = 2 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public float getScale() { - return scale_; - } - - public static final int MEAN_FILE_FIELD_NUMBER = 3; - private volatile java.lang.Object meanFile_; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - 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()) { - meanFile_ = s; - } - return s; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 4; - private int batchSize_; - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 batch_size = 4; - * - *
-     * Specify the batch size.
-     * 
- */ - public int getBatchSize() { - return batchSize_; - } - - public static final int CROP_SIZE_FIELD_NUMBER = 5; - private int cropSize_; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-     * Specify if we would like to randomly crop an image.
-     * 
- */ - public int getCropSize() { - return cropSize_; - } - - public static final int MIRROR_FIELD_NUMBER = 6; - private boolean mirror_; - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-     * Specify if we want to randomly mirror data.
-     * 
- */ - public boolean getMirror() { - return mirror_; - } - - public static final int FG_THRESHOLD_FIELD_NUMBER = 7; - private float fgThreshold_; - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-     * Foreground (object) overlap threshold
-     * 
- */ - public boolean hasFgThreshold() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-     * Foreground (object) overlap threshold
-     * 
- */ - public float getFgThreshold() { - return fgThreshold_; - } - - public static final int BG_THRESHOLD_FIELD_NUMBER = 8; - private float bgThreshold_; - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-     * Background (non-object) overlap threshold
-     * 
- */ - public boolean hasBgThreshold() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-     * Background (non-object) overlap threshold
-     * 
- */ - public float getBgThreshold() { - return bgThreshold_; - } - - public static final int FG_FRACTION_FIELD_NUMBER = 9; - private float fgFraction_; - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - public boolean hasFgFraction() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - public float getFgFraction() { - return fgFraction_; - } - - public static final int CONTEXT_PAD_FIELD_NUMBER = 10; - private int contextPad_; - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - public boolean hasContextPad() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - public int getContextPad() { - return contextPad_; - } - - public static final int CROP_MODE_FIELD_NUMBER = 11; - private volatile java.lang.Object cropMode_; - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public boolean hasCropMode() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public java.lang.String getCropMode() { - java.lang.Object ref = cropMode_; - 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()) { - cropMode_ = s; - } - return s; - } - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public com.google.protobuf.ByteString - getCropModeBytes() { - java.lang.Object ref = cropMode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cropMode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CACHE_IMAGES_FIELD_NUMBER = 12; - private boolean cacheImages_; - /** - * optional bool cache_images = 12 [default = false]; - * - *
-     * cache_images: will load all images in memory for faster access
-     * 
- */ - public boolean hasCacheImages() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional bool cache_images = 12 [default = false]; - * - *
-     * cache_images: will load all images in memory for faster access
-     * 
- */ - public boolean getCacheImages() { - return cacheImages_; - } - - public static final int ROOT_FOLDER_FIELD_NUMBER = 13; - private volatile java.lang.Object rootFolder_; - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - public boolean hasRootFolder() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - public java.lang.String getRootFolder() { - java.lang.Object ref = rootFolder_; - 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()) { - rootFolder_ = s; - } - return s; - } - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-     * append root_folder to locate images
-     * 
- */ - public com.google.protobuf.ByteString - getRootFolderBytes() { - java.lang.Object ref = rootFolder_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(4, batchSize_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(5, cropSize_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(6, mirror_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeFloat(7, fgThreshold_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeFloat(8, bgThreshold_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeFloat(9, fgFraction_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt32(10, contextPad_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, cropMode_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeBool(12, cacheImages_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - com.google.protobuf.GeneratedMessage.writeString(output, 13, rootFolder_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, scale_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, batchSize_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, cropSize_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, mirror_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, fgThreshold_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, bgThreshold_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(9, fgFraction_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, contextPad_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(11, cropMode_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(12, cacheImages_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(13, rootFolder_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.WindowDataParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.WindowDataParameter 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.WindowDataParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.WindowDataParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.WindowDataParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.WindowDataParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.WindowDataParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.WindowDataParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.WindowDataParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.WindowDataParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.WindowDataParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.WindowDataParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.WindowDataParameter) - caffe.Caffe.WindowDataParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_WindowDataParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_WindowDataParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.WindowDataParameter.class, caffe.Caffe.WindowDataParameter.Builder.class); - } - - // Construct using caffe.Caffe.WindowDataParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00000002); - meanFile_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - batchSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - cropSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - mirror_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - fgThreshold_ = 0.5F; - bitField0_ = (bitField0_ & ~0x00000040); - bgThreshold_ = 0.5F; - bitField0_ = (bitField0_ & ~0x00000080); - fgFraction_ = 0.25F; - bitField0_ = (bitField0_ & ~0x00000100); - contextPad_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - cropMode_ = "warp"; - bitField0_ = (bitField0_ & ~0x00000400); - cacheImages_ = false; - bitField0_ = (bitField0_ & ~0x00000800); - rootFolder_ = ""; - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_WindowDataParameter_descriptor; - } - - public caffe.Caffe.WindowDataParameter getDefaultInstanceForType() { - return caffe.Caffe.WindowDataParameter.getDefaultInstance(); - } - - public caffe.Caffe.WindowDataParameter build() { - caffe.Caffe.WindowDataParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.WindowDataParameter buildPartial() { - caffe.Caffe.WindowDataParameter result = new caffe.Caffe.WindowDataParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.meanFile_ = meanFile_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.batchSize_ = batchSize_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.cropSize_ = cropSize_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.mirror_ = mirror_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.fgThreshold_ = fgThreshold_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.bgThreshold_ = bgThreshold_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.fgFraction_ = fgFraction_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.contextPad_ = contextPad_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.cropMode_ = cropMode_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.cacheImages_ = cacheImages_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00001000; - } - result.rootFolder_ = rootFolder_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.WindowDataParameter) { - return mergeFrom((caffe.Caffe.WindowDataParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.WindowDataParameter other) { - if (other == caffe.Caffe.WindowDataParameter.getDefaultInstance()) return this; - if (other.hasSource()) { - bitField0_ |= 0x00000001; - source_ = other.source_; - onChanged(); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasMeanFile()) { - bitField0_ |= 0x00000004; - meanFile_ = other.meanFile_; - onChanged(); - } - if (other.hasBatchSize()) { - setBatchSize(other.getBatchSize()); - } - if (other.hasCropSize()) { - setCropSize(other.getCropSize()); - } - if (other.hasMirror()) { - setMirror(other.getMirror()); - } - if (other.hasFgThreshold()) { - setFgThreshold(other.getFgThreshold()); - } - if (other.hasBgThreshold()) { - setBgThreshold(other.getBgThreshold()); - } - if (other.hasFgFraction()) { - setFgFraction(other.getFgFraction()); - } - if (other.hasContextPad()) { - setContextPad(other.getContextPad()); - } - if (other.hasCropMode()) { - bitField0_ |= 0x00000400; - cropMode_ = other.cropMode_; - onChanged(); - } - if (other.hasCacheImages()) { - setCacheImages(other.getCacheImages()); - } - if (other.hasRootFolder()) { - bitField0_ |= 0x00001000; - rootFolder_ = other.rootFolder_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.WindowDataParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.WindowDataParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object source_ = ""; - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000001); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 1; - * - *
-       * Specify the data source.
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - source_ = value; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 2 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder setScale(float value) { - bitField0_ |= 0x00000002; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 2 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00000002); - scale_ = 1F; - onChanged(); - return this; - } - - private java.lang.Object meanFile_ = ""; - /** - * optional string mean_file = 3; - */ - public boolean hasMeanFile() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string mean_file = 3; - */ - public java.lang.String getMeanFile() { - java.lang.Object ref = meanFile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - meanFile_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string mean_file = 3; - */ - public com.google.protobuf.ByteString - getMeanFileBytes() { - java.lang.Object ref = meanFile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - meanFile_ = value; - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder clearMeanFile() { - bitField0_ = (bitField0_ & ~0x00000004); - meanFile_ = getDefaultInstance().getMeanFile(); - onChanged(); - return this; - } - /** - * optional string mean_file = 3; - */ - public Builder setMeanFileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - meanFile_ = value; - onChanged(); - return this; - } - - private int batchSize_ ; - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public boolean hasBatchSize() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public int getBatchSize() { - return batchSize_; - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder setBatchSize(int value) { - bitField0_ |= 0x00000008; - batchSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batch_size = 4; - * - *
-       * Specify the batch size.
-       * 
- */ - public Builder clearBatchSize() { - bitField0_ = (bitField0_ & ~0x00000008); - batchSize_ = 0; - onChanged(); - return this; - } - - private int cropSize_ ; - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public boolean hasCropSize() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public int getCropSize() { - return cropSize_; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public Builder setCropSize(int value) { - bitField0_ |= 0x00000010; - cropSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 crop_size = 5 [default = 0]; - * - *
-       * Specify if we would like to randomly crop an image.
-       * 
- */ - public Builder clearCropSize() { - bitField0_ = (bitField0_ & ~0x00000010); - cropSize_ = 0; - onChanged(); - return this; - } - - private boolean mirror_ ; - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public boolean getMirror() { - return mirror_; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public Builder setMirror(boolean value) { - bitField0_ |= 0x00000020; - mirror_ = value; - onChanged(); - return this; - } - /** - * optional bool mirror = 6 [default = false]; - * - *
-       * Specify if we want to randomly mirror data.
-       * 
- */ - public Builder clearMirror() { - bitField0_ = (bitField0_ & ~0x00000020); - mirror_ = false; - onChanged(); - return this; - } - - private float fgThreshold_ = 0.5F; - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-       * Foreground (object) overlap threshold
-       * 
- */ - public boolean hasFgThreshold() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-       * Foreground (object) overlap threshold
-       * 
- */ - public float getFgThreshold() { - return fgThreshold_; - } - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-       * Foreground (object) overlap threshold
-       * 
- */ - public Builder setFgThreshold(float value) { - bitField0_ |= 0x00000040; - fgThreshold_ = value; - onChanged(); - return this; - } - /** - * optional float fg_threshold = 7 [default = 0.5]; - * - *
-       * Foreground (object) overlap threshold
-       * 
- */ - public Builder clearFgThreshold() { - bitField0_ = (bitField0_ & ~0x00000040); - fgThreshold_ = 0.5F; - onChanged(); - return this; - } - - private float bgThreshold_ = 0.5F; - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-       * Background (non-object) overlap threshold
-       * 
- */ - public boolean hasBgThreshold() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-       * Background (non-object) overlap threshold
-       * 
- */ - public float getBgThreshold() { - return bgThreshold_; - } - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-       * Background (non-object) overlap threshold
-       * 
- */ - public Builder setBgThreshold(float value) { - bitField0_ |= 0x00000080; - bgThreshold_ = value; - onChanged(); - return this; - } - /** - * optional float bg_threshold = 8 [default = 0.5]; - * - *
-       * Background (non-object) overlap threshold
-       * 
- */ - public Builder clearBgThreshold() { - bitField0_ = (bitField0_ & ~0x00000080); - bgThreshold_ = 0.5F; - onChanged(); - return this; - } - - private float fgFraction_ = 0.25F; - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public boolean hasFgFraction() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public float getFgFraction() { - return fgFraction_; - } - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public Builder setFgFraction(float value) { - bitField0_ |= 0x00000100; - fgFraction_ = value; - onChanged(); - return this; - } - /** - * optional float fg_fraction = 9 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public Builder clearFgFraction() { - bitField0_ = (bitField0_ & ~0x00000100); - fgFraction_ = 0.25F; - onChanged(); - return this; - } - - private int contextPad_ ; - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public boolean hasContextPad() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public int getContextPad() { - return contextPad_; - } - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public Builder setContextPad(int value) { - bitField0_ |= 0x00000200; - contextPad_ = value; - onChanged(); - return this; - } - /** - * optional uint32 context_pad = 10 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public Builder clearContextPad() { - bitField0_ = (bitField0_ & ~0x00000200); - contextPad_ = 0; - onChanged(); - return this; - } - - private java.lang.Object cropMode_ = "warp"; - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public boolean hasCropMode() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public java.lang.String getCropMode() { - java.lang.Object ref = cropMode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - cropMode_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public com.google.protobuf.ByteString - getCropModeBytes() { - java.lang.Object ref = cropMode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cropMode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder setCropMode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - cropMode_ = value; - onChanged(); - return this; - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder clearCropMode() { - bitField0_ = (bitField0_ & ~0x00000400); - cropMode_ = getDefaultInstance().getCropMode(); - onChanged(); - return this; - } - /** - * optional string crop_mode = 11 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder setCropModeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - cropMode_ = value; - onChanged(); - return this; - } - - private boolean cacheImages_ ; - /** - * optional bool cache_images = 12 [default = false]; - * - *
-       * cache_images: will load all images in memory for faster access
-       * 
- */ - public boolean hasCacheImages() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional bool cache_images = 12 [default = false]; - * - *
-       * cache_images: will load all images in memory for faster access
-       * 
- */ - public boolean getCacheImages() { - return cacheImages_; - } - /** - * optional bool cache_images = 12 [default = false]; - * - *
-       * cache_images: will load all images in memory for faster access
-       * 
- */ - public Builder setCacheImages(boolean value) { - bitField0_ |= 0x00000800; - cacheImages_ = value; - onChanged(); - return this; - } - /** - * optional bool cache_images = 12 [default = false]; - * - *
-       * cache_images: will load all images in memory for faster access
-       * 
- */ - public Builder clearCacheImages() { - bitField0_ = (bitField0_ & ~0x00000800); - cacheImages_ = false; - onChanged(); - return this; - } - - private java.lang.Object rootFolder_ = ""; - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public boolean hasRootFolder() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public java.lang.String getRootFolder() { - java.lang.Object ref = rootFolder_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - rootFolder_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public com.google.protobuf.ByteString - getRootFolderBytes() { - java.lang.Object ref = rootFolder_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public Builder setRootFolder( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - rootFolder_ = value; - onChanged(); - return this; - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public Builder clearRootFolder() { - bitField0_ = (bitField0_ & ~0x00001000); - rootFolder_ = getDefaultInstance().getRootFolder(); - onChanged(); - return this; - } - /** - * optional string root_folder = 13 [default = ""]; - * - *
-       * append root_folder to locate images
-       * 
- */ - public Builder setRootFolderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - rootFolder_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.WindowDataParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.WindowDataParameter) - private static final caffe.Caffe.WindowDataParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.WindowDataParameter(); - } - - public static caffe.Caffe.WindowDataParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public WindowDataParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new WindowDataParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.WindowDataParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SPPParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.SPPParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 pyramid_height = 1; - */ - boolean hasPyramidHeight(); - /** - * optional uint32 pyramid_height = 1; - */ - int getPyramidHeight(); - - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - boolean hasPool(); - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - caffe.Caffe.SPPParameter.PoolMethod getPool(); - - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - boolean hasEngine(); - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - caffe.Caffe.SPPParameter.Engine getEngine(); - } - /** - * Protobuf type {@code caffe.SPPParameter} - */ - public static final class SPPParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.SPPParameter) - SPPParameterOrBuilder { - // Use SPPParameter.newBuilder() to construct. - private SPPParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SPPParameter() { - pyramidHeight_ = 0; - pool_ = 0; - engine_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SPPParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - pyramidHeight_ = input.readUInt32(); - break; - } - case 16: { - int rawValue = input.readEnum(); - caffe.Caffe.SPPParameter.PoolMethod value = caffe.Caffe.SPPParameter.PoolMethod.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - pool_ = rawValue; - } - break; - } - case 48: { - int rawValue = input.readEnum(); - caffe.Caffe.SPPParameter.Engine value = caffe.Caffe.SPPParameter.Engine.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(6, rawValue); - } else { - bitField0_ |= 0x00000004; - engine_ = rawValue; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_SPPParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SPPParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SPPParameter.class, caffe.Caffe.SPPParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.SPPParameter.PoolMethod} - */ - public enum PoolMethod - implements com.google.protobuf.ProtocolMessageEnum { - /** - * MAX = 0; - */ - MAX(0, 0), - /** - * AVE = 1; - */ - AVE(1, 1), - /** - * STOCHASTIC = 2; - */ - STOCHASTIC(2, 2), - ; - - /** - * MAX = 0; - */ - public static final int MAX_VALUE = 0; - /** - * AVE = 1; - */ - public static final int AVE_VALUE = 1; - /** - * STOCHASTIC = 2; - */ - public static final int STOCHASTIC_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static PoolMethod valueOf(int value) { - switch (value) { - case 0: return MAX; - case 1: return AVE; - case 2: return STOCHASTIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PoolMethod> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PoolMethod findValueByNumber(int number) { - return PoolMethod.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.SPPParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final PoolMethod[] VALUES = values(); - - public static PoolMethod 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 PoolMethod(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.SPPParameter.PoolMethod) - } - - /** - * Protobuf enum {@code caffe.SPPParameter.Engine} - */ - public enum Engine - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEFAULT = 0; - */ - DEFAULT(0, 0), - /** - * CAFFE = 1; - */ - CAFFE(1, 1), - /** - * CUDNN = 2; - */ - CUDNN(2, 2), - ; - - /** - * DEFAULT = 0; - */ - public static final int DEFAULT_VALUE = 0; - /** - * CAFFE = 1; - */ - public static final int CAFFE_VALUE = 1; - /** - * CUDNN = 2; - */ - public static final int CUDNN_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static Engine valueOf(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return CAFFE; - case 2: return CUDNN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Engine> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Engine findValueByNumber(int number) { - return Engine.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.SPPParameter.getDescriptor().getEnumTypes().get(1); - } - - private static final Engine[] VALUES = values(); - - public static Engine 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 Engine(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.SPPParameter.Engine) - } - - private int bitField0_; - public static final int PYRAMID_HEIGHT_FIELD_NUMBER = 1; - private int pyramidHeight_; - /** - * optional uint32 pyramid_height = 1; - */ - public boolean hasPyramidHeight() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 pyramid_height = 1; - */ - public int getPyramidHeight() { - return pyramidHeight_; - } - - public static final int POOL_FIELD_NUMBER = 2; - private int pool_; - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public caffe.Caffe.SPPParameter.PoolMethod getPool() { - caffe.Caffe.SPPParameter.PoolMethod result = caffe.Caffe.SPPParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.SPPParameter.PoolMethod.MAX : result; - } - - public static final int ENGINE_FIELD_NUMBER = 6; - private int engine_; - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public caffe.Caffe.SPPParameter.Engine getEngine() { - caffe.Caffe.SPPParameter.Engine result = caffe.Caffe.SPPParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SPPParameter.Engine.DEFAULT : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, pyramidHeight_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, pool_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(6, engine_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, pyramidHeight_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, pool_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, engine_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.SPPParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SPPParameter 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.SPPParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.SPPParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.SPPParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SPPParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.SPPParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.SPPParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.SPPParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.SPPParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.SPPParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.SPPParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.SPPParameter) - caffe.Caffe.SPPParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_SPPParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_SPPParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.SPPParameter.class, caffe.Caffe.SPPParameter.Builder.class); - } - - // Construct using caffe.Caffe.SPPParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - pyramidHeight_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - pool_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - engine_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_SPPParameter_descriptor; - } - - public caffe.Caffe.SPPParameter getDefaultInstanceForType() { - return caffe.Caffe.SPPParameter.getDefaultInstance(); - } - - public caffe.Caffe.SPPParameter build() { - caffe.Caffe.SPPParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.SPPParameter buildPartial() { - caffe.Caffe.SPPParameter result = new caffe.Caffe.SPPParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.pyramidHeight_ = pyramidHeight_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.pool_ = pool_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.engine_ = engine_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.SPPParameter) { - return mergeFrom((caffe.Caffe.SPPParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.SPPParameter other) { - if (other == caffe.Caffe.SPPParameter.getDefaultInstance()) return this; - if (other.hasPyramidHeight()) { - setPyramidHeight(other.getPyramidHeight()); - } - if (other.hasPool()) { - setPool(other.getPool()); - } - if (other.hasEngine()) { - setEngine(other.getEngine()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.SPPParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.SPPParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int pyramidHeight_ ; - /** - * optional uint32 pyramid_height = 1; - */ - public boolean hasPyramidHeight() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional uint32 pyramid_height = 1; - */ - public int getPyramidHeight() { - return pyramidHeight_; - } - /** - * optional uint32 pyramid_height = 1; - */ - public Builder setPyramidHeight(int value) { - bitField0_ |= 0x00000001; - pyramidHeight_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pyramid_height = 1; - */ - public Builder clearPyramidHeight() { - bitField0_ = (bitField0_ & ~0x00000001); - pyramidHeight_ = 0; - onChanged(); - return this; - } - - private int pool_ = 0; - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public caffe.Caffe.SPPParameter.PoolMethod getPool() { - caffe.Caffe.SPPParameter.PoolMethod result = caffe.Caffe.SPPParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.SPPParameter.PoolMethod.MAX : result; - } - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder setPool(caffe.Caffe.SPPParameter.PoolMethod value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - pool_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder clearPool() { - bitField0_ = (bitField0_ & ~0x00000002); - pool_ = 0; - onChanged(); - return this; - } - - private int engine_ = 0; - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public boolean hasEngine() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public caffe.Caffe.SPPParameter.Engine getEngine() { - caffe.Caffe.SPPParameter.Engine result = caffe.Caffe.SPPParameter.Engine.valueOf(engine_); - return result == null ? caffe.Caffe.SPPParameter.Engine.DEFAULT : result; - } - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public Builder setEngine(caffe.Caffe.SPPParameter.Engine value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - engine_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; - */ - public Builder clearEngine() { - bitField0_ = (bitField0_ & ~0x00000004); - engine_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.SPPParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.SPPParameter) - private static final caffe.Caffe.SPPParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.SPPParameter(); - } - - public static caffe.Caffe.SPPParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public SPPParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new SPPParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.SPPParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface V1LayerParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.V1LayerParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string bottom = 2; - */ - com.google.protobuf.ProtocolStringList - getBottomList(); - /** - * repeated string bottom = 2; - */ - int getBottomCount(); - /** - * repeated string bottom = 2; - */ - java.lang.String getBottom(int index); - /** - * repeated string bottom = 2; - */ - com.google.protobuf.ByteString - getBottomBytes(int index); - - /** - * repeated string top = 3; - */ - com.google.protobuf.ProtocolStringList - getTopList(); - /** - * repeated string top = 3; - */ - int getTopCount(); - /** - * repeated string top = 3; - */ - java.lang.String getTop(int index); - /** - * repeated string top = 3; - */ - com.google.protobuf.ByteString - getTopBytes(int index); - - /** - * optional string name = 4; - */ - boolean hasName(); - /** - * optional string name = 4; - */ - java.lang.String getName(); - /** - * optional string name = 4; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .caffe.NetStateRule include = 32; - */ - java.util.List - getIncludeList(); - /** - * repeated .caffe.NetStateRule include = 32; - */ - caffe.Caffe.NetStateRule getInclude(int index); - /** - * repeated .caffe.NetStateRule include = 32; - */ - int getIncludeCount(); - /** - * repeated .caffe.NetStateRule include = 32; - */ - java.util.List - getIncludeOrBuilderList(); - /** - * repeated .caffe.NetStateRule include = 32; - */ - caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( - int index); - - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - java.util.List - getExcludeList(); - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - caffe.Caffe.NetStateRule getExclude(int index); - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - int getExcludeCount(); - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - java.util.List - getExcludeOrBuilderList(); - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( - int index); - - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - boolean hasType(); - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - caffe.Caffe.V1LayerParameter.LayerType getType(); - - /** - * repeated .caffe.BlobProto blobs = 6; - */ - java.util.List - getBlobsList(); - /** - * repeated .caffe.BlobProto blobs = 6; - */ - caffe.Caffe.BlobProto getBlobs(int index); - /** - * repeated .caffe.BlobProto blobs = 6; - */ - int getBlobsCount(); - /** - * repeated .caffe.BlobProto blobs = 6; - */ - java.util.List - getBlobsOrBuilderList(); - /** - * repeated .caffe.BlobProto blobs = 6; - */ - caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index); - - /** - * repeated string param = 1001; - */ - com.google.protobuf.ProtocolStringList - getParamList(); - /** - * repeated string param = 1001; - */ - int getParamCount(); - /** - * repeated string param = 1001; - */ - java.lang.String getParam(int index); - /** - * repeated string param = 1001; - */ - com.google.protobuf.ByteString - getParamBytes(int index); - - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - java.util.List getBlobShareModeList(); - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - int getBlobShareModeCount(); - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index); - - /** - * repeated float blobs_lr = 7; - */ - java.util.List getBlobsLrList(); - /** - * repeated float blobs_lr = 7; - */ - int getBlobsLrCount(); - /** - * repeated float blobs_lr = 7; - */ - float getBlobsLr(int index); - - /** - * repeated float weight_decay = 8; - */ - java.util.List getWeightDecayList(); - /** - * repeated float weight_decay = 8; - */ - int getWeightDecayCount(); - /** - * repeated float weight_decay = 8; - */ - float getWeightDecay(int index); - - /** - * repeated float loss_weight = 35; - */ - java.util.List getLossWeightList(); - /** - * repeated float loss_weight = 35; - */ - int getLossWeightCount(); - /** - * repeated float loss_weight = 35; - */ - float getLossWeight(int index); - - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - boolean hasAccuracyParam(); - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - caffe.Caffe.AccuracyParameter getAccuracyParam(); - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder(); - - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - boolean hasArgmaxParam(); - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - caffe.Caffe.ArgMaxParameter getArgmaxParam(); - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder(); - - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - boolean hasConcatParam(); - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - caffe.Caffe.ConcatParameter getConcatParam(); - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder(); - - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - boolean hasContrastiveLossParam(); - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam(); - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder(); - - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - boolean hasConvolutionParam(); - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - caffe.Caffe.ConvolutionParameter getConvolutionParam(); - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder(); - - /** - * optional .caffe.DataParameter data_param = 11; - */ - boolean hasDataParam(); - /** - * optional .caffe.DataParameter data_param = 11; - */ - caffe.Caffe.DataParameter getDataParam(); - /** - * optional .caffe.DataParameter data_param = 11; - */ - caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder(); - - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - boolean hasDropoutParam(); - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - caffe.Caffe.DropoutParameter getDropoutParam(); - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder(); - - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - boolean hasDummyDataParam(); - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - caffe.Caffe.DummyDataParameter getDummyDataParam(); - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder(); - - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - boolean hasEltwiseParam(); - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - caffe.Caffe.EltwiseParameter getEltwiseParam(); - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder(); - - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - boolean hasExpParam(); - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - caffe.Caffe.ExpParameter getExpParam(); - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder(); - - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - boolean hasHdf5DataParam(); - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - caffe.Caffe.HDF5DataParameter getHdf5DataParam(); - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder(); - - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - boolean hasHdf5OutputParam(); - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - caffe.Caffe.HDF5OutputParameter getHdf5OutputParam(); - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder(); - - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - boolean hasHingeLossParam(); - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - caffe.Caffe.HingeLossParameter getHingeLossParam(); - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder(); - - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - boolean hasImageDataParam(); - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - caffe.Caffe.ImageDataParameter getImageDataParam(); - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder(); - - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - boolean hasInfogainLossParam(); - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - caffe.Caffe.InfogainLossParameter getInfogainLossParam(); - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder(); - - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - boolean hasInnerProductParam(); - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - caffe.Caffe.InnerProductParameter getInnerProductParam(); - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder(); - - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - boolean hasLrnParam(); - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - caffe.Caffe.LRNParameter getLrnParam(); - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder(); - - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - boolean hasMemoryDataParam(); - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - caffe.Caffe.MemoryDataParameter getMemoryDataParam(); - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder(); - - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - boolean hasMvnParam(); - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - caffe.Caffe.MVNParameter getMvnParam(); - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder(); - - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - boolean hasPoolingParam(); - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - caffe.Caffe.PoolingParameter getPoolingParam(); - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder(); - - /** - * optional .caffe.PowerParameter power_param = 21; - */ - boolean hasPowerParam(); - /** - * optional .caffe.PowerParameter power_param = 21; - */ - caffe.Caffe.PowerParameter getPowerParam(); - /** - * optional .caffe.PowerParameter power_param = 21; - */ - caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder(); - - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - boolean hasReluParam(); - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - caffe.Caffe.ReLUParameter getReluParam(); - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder(); - - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - boolean hasSigmoidParam(); - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - caffe.Caffe.SigmoidParameter getSigmoidParam(); - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder(); - - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - boolean hasSoftmaxParam(); - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - caffe.Caffe.SoftmaxParameter getSoftmaxParam(); - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder(); - - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - boolean hasSliceParam(); - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - caffe.Caffe.SliceParameter getSliceParam(); - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder(); - - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - boolean hasTanhParam(); - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - caffe.Caffe.TanHParameter getTanhParam(); - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder(); - - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - boolean hasThresholdParam(); - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - caffe.Caffe.ThresholdParameter getThresholdParam(); - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder(); - - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - boolean hasWindowDataParam(); - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - caffe.Caffe.WindowDataParameter getWindowDataParam(); - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder(); - - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - boolean hasTransformParam(); - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - caffe.Caffe.TransformationParameter getTransformParam(); - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder(); - - /** - * optional .caffe.LossParameter loss_param = 42; - */ - boolean hasLossParam(); - /** - * optional .caffe.LossParameter loss_param = 42; - */ - caffe.Caffe.LossParameter getLossParam(); - /** - * optional .caffe.LossParameter loss_param = 42; - */ - caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder(); - - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - boolean hasLayer(); - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - caffe.Caffe.V0LayerParameter getLayer(); - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder(); - } - /** - * Protobuf type {@code caffe.V1LayerParameter} - * - *
-   * DEPRECATED: use LayerParameter.
-   * 
- */ - public static final class V1LayerParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.V1LayerParameter) - V1LayerParameterOrBuilder { - // Use V1LayerParameter.newBuilder() to construct. - private V1LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private V1LayerParameter() { - bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; - top_ = com.google.protobuf.LazyStringArrayList.EMPTY; - name_ = ""; - include_ = java.util.Collections.emptyList(); - exclude_ = java.util.Collections.emptyList(); - type_ = 0; - blobs_ = java.util.Collections.emptyList(); - param_ = com.google.protobuf.LazyStringArrayList.EMPTY; - blobShareMode_ = java.util.Collections.emptyList(); - blobsLr_ = java.util.Collections.emptyList(); - weightDecay_ = java.util.Collections.emptyList(); - lossWeight_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private V1LayerParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - caffe.Caffe.V0LayerParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000001) == 0x00000001)) { - subBuilder = layer_.toBuilder(); - } - layer_ = input.readMessage(caffe.Caffe.V0LayerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(layer_); - layer_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000001; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - bottom_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bottom_.add(bs); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - top_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - top_.add(bs); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - break; - } - case 40: { - int rawValue = input.readEnum(); - caffe.Caffe.V1LayerParameter.LayerType value = caffe.Caffe.V1LayerParameter.LayerType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(5, rawValue); - } else { - bitField0_ |= 0x00000002; - type_ = rawValue; - } - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - blobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - blobs_.add(input.readMessage(caffe.Caffe.BlobProto.parser(), extensionRegistry)); - break; - } - case 61: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - blobsLr_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - blobsLr_.add(input.readFloat()); - break; - } - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { - blobsLr_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - while (input.getBytesUntilLimit() > 0) { - blobsLr_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 69: { - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - weightDecay_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - weightDecay_.add(input.readFloat()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { - weightDecay_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - while (input.getBytesUntilLimit() > 0) { - weightDecay_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 74: { - caffe.Caffe.ConcatParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = concatParam_.toBuilder(); - } - concatParam_ = input.readMessage(caffe.Caffe.ConcatParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(concatParam_); - concatParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 82: { - caffe.Caffe.ConvolutionParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - subBuilder = convolutionParam_.toBuilder(); - } - convolutionParam_ = input.readMessage(caffe.Caffe.ConvolutionParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(convolutionParam_); - convolutionParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 90: { - caffe.Caffe.DataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) == 0x00000080)) { - subBuilder = dataParam_.toBuilder(); - } - dataParam_ = input.readMessage(caffe.Caffe.DataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataParam_); - dataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case 98: { - caffe.Caffe.DropoutParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - subBuilder = dropoutParam_.toBuilder(); - } - dropoutParam_ = input.readMessage(caffe.Caffe.DropoutParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dropoutParam_); - dropoutParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 106: { - caffe.Caffe.HDF5DataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) == 0x00001000)) { - subBuilder = hdf5DataParam_.toBuilder(); - } - hdf5DataParam_ = input.readMessage(caffe.Caffe.HDF5DataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdf5DataParam_); - hdf5DataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case 114: { - caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) == 0x00002000)) { - subBuilder = hdf5OutputParam_.toBuilder(); - } - hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdf5OutputParam_); - hdf5OutputParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - break; - } - case 122: { - caffe.Caffe.ImageDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00008000) == 0x00008000)) { - subBuilder = imageDataParam_.toBuilder(); - } - imageDataParam_ = input.readMessage(caffe.Caffe.ImageDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageDataParam_); - imageDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00008000; - break; - } - case 130: { - caffe.Caffe.InfogainLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00010000) == 0x00010000)) { - subBuilder = infogainLossParam_.toBuilder(); - } - infogainLossParam_ = input.readMessage(caffe.Caffe.InfogainLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infogainLossParam_); - infogainLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00010000; - break; - } - case 138: { - caffe.Caffe.InnerProductParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00020000) == 0x00020000)) { - subBuilder = innerProductParam_.toBuilder(); - } - innerProductParam_ = input.readMessage(caffe.Caffe.InnerProductParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(innerProductParam_); - innerProductParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00020000; - break; - } - case 146: { - caffe.Caffe.LRNParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00040000) == 0x00040000)) { - subBuilder = lrnParam_.toBuilder(); - } - lrnParam_ = input.readMessage(caffe.Caffe.LRNParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lrnParam_); - lrnParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00040000; - break; - } - case 154: { - caffe.Caffe.PoolingParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00200000) == 0x00200000)) { - subBuilder = poolingParam_.toBuilder(); - } - poolingParam_ = input.readMessage(caffe.Caffe.PoolingParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(poolingParam_); - poolingParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00200000; - break; - } - case 162: { - caffe.Caffe.WindowDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x20000000) == 0x20000000)) { - subBuilder = windowDataParam_.toBuilder(); - } - windowDataParam_ = input.readMessage(caffe.Caffe.WindowDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(windowDataParam_); - windowDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x20000000; - break; - } - case 170: { - caffe.Caffe.PowerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00400000) == 0x00400000)) { - subBuilder = powerParam_.toBuilder(); - } - powerParam_ = input.readMessage(caffe.Caffe.PowerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(powerParam_); - powerParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case 178: { - caffe.Caffe.MemoryDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00080000) == 0x00080000)) { - subBuilder = memoryDataParam_.toBuilder(); - } - memoryDataParam_ = input.readMessage(caffe.Caffe.MemoryDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(memoryDataParam_); - memoryDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00080000; - break; - } - case 186: { - caffe.Caffe.ArgMaxParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = argmaxParam_.toBuilder(); - } - argmaxParam_ = input.readMessage(caffe.Caffe.ArgMaxParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(argmaxParam_); - argmaxParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 194: { - caffe.Caffe.EltwiseParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - subBuilder = eltwiseParam_.toBuilder(); - } - eltwiseParam_ = input.readMessage(caffe.Caffe.EltwiseParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eltwiseParam_); - eltwiseParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 202: { - caffe.Caffe.ThresholdParameter.Builder subBuilder = null; - if (((bitField0_ & 0x10000000) == 0x10000000)) { - subBuilder = thresholdParam_.toBuilder(); - } - thresholdParam_ = input.readMessage(caffe.Caffe.ThresholdParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(thresholdParam_); - thresholdParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x10000000; - break; - } - case 210: { - caffe.Caffe.DummyDataParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - subBuilder = dummyDataParam_.toBuilder(); - } - dummyDataParam_ = input.readMessage(caffe.Caffe.DummyDataParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dummyDataParam_); - dummyDataParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case 218: { - caffe.Caffe.AccuracyParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = accuracyParam_.toBuilder(); - } - accuracyParam_ = input.readMessage(caffe.Caffe.AccuracyParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accuracyParam_); - accuracyParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 234: { - caffe.Caffe.HingeLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00004000) == 0x00004000)) { - subBuilder = hingeLossParam_.toBuilder(); - } - hingeLossParam_ = input.readMessage(caffe.Caffe.HingeLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hingeLossParam_); - hingeLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00004000; - break; - } - case 242: { - caffe.Caffe.ReLUParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00800000) == 0x00800000)) { - subBuilder = reluParam_.toBuilder(); - } - reluParam_ = input.readMessage(caffe.Caffe.ReLUParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reluParam_); - reluParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00800000; - break; - } - case 250: { - caffe.Caffe.SliceParameter.Builder subBuilder = null; - if (((bitField0_ & 0x04000000) == 0x04000000)) { - subBuilder = sliceParam_.toBuilder(); - } - sliceParam_ = input.readMessage(caffe.Caffe.SliceParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceParam_); - sliceParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x04000000; - break; - } - case 258: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - include_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - include_.add(input.readMessage(caffe.Caffe.NetStateRule.parser(), extensionRegistry)); - break; - } - case 266: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - exclude_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - exclude_.add(input.readMessage(caffe.Caffe.NetStateRule.parser(), extensionRegistry)); - break; - } - case 274: { - caffe.Caffe.MVNParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00100000) == 0x00100000)) { - subBuilder = mvnParam_.toBuilder(); - } - mvnParam_ = input.readMessage(caffe.Caffe.MVNParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mvnParam_); - mvnParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00100000; - break; - } - case 285: { - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - lossWeight_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - lossWeight_.add(input.readFloat()); - break; - } - case 282: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800) && input.getBytesUntilLimit() > 0) { - lossWeight_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - while (input.getBytesUntilLimit() > 0) { - lossWeight_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 290: { - caffe.Caffe.TransformationParameter.Builder subBuilder = null; - if (((bitField0_ & 0x40000000) == 0x40000000)) { - subBuilder = transformParam_.toBuilder(); - } - transformParam_ = input.readMessage(caffe.Caffe.TransformationParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transformParam_); - transformParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x40000000; - break; - } - case 298: { - caffe.Caffe.TanHParameter.Builder subBuilder = null; - if (((bitField0_ & 0x08000000) == 0x08000000)) { - subBuilder = tanhParam_.toBuilder(); - } - tanhParam_ = input.readMessage(caffe.Caffe.TanHParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tanhParam_); - tanhParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x08000000; - break; - } - case 306: { - caffe.Caffe.SigmoidParameter.Builder subBuilder = null; - if (((bitField0_ & 0x01000000) == 0x01000000)) { - subBuilder = sigmoidParam_.toBuilder(); - } - sigmoidParam_ = input.readMessage(caffe.Caffe.SigmoidParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sigmoidParam_); - sigmoidParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x01000000; - break; - } - case 314: { - caffe.Caffe.SoftmaxParameter.Builder subBuilder = null; - if (((bitField0_ & 0x02000000) == 0x02000000)) { - subBuilder = softmaxParam_.toBuilder(); - } - softmaxParam_ = input.readMessage(caffe.Caffe.SoftmaxParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(softmaxParam_); - softmaxParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x02000000; - break; - } - case 322: { - caffe.Caffe.ContrastiveLossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = contrastiveLossParam_.toBuilder(); - } - contrastiveLossParam_ = input.readMessage(caffe.Caffe.ContrastiveLossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contrastiveLossParam_); - contrastiveLossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 330: { - caffe.Caffe.ExpParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000800) == 0x00000800)) { - subBuilder = expParam_.toBuilder(); - } - expParam_ = input.readMessage(caffe.Caffe.ExpParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expParam_); - expParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case 338: { - caffe.Caffe.LossParameter.Builder subBuilder = null; - if (((bitField0_ & 0x80000000) == 0x80000000)) { - subBuilder = lossParam_.toBuilder(); - } - lossParam_ = input.readMessage(caffe.Caffe.LossParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lossParam_); - lossParam_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x80000000; - break; - } - case 8010: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - param_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - param_.add(bs); - break; - } - case 8016: { - int rawValue = input.readEnum(); - caffe.Caffe.V1LayerParameter.DimCheckMode value = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1002, rawValue); - } else { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - blobShareMode_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - blobShareMode_.add(rawValue); - } - break; - } - case 8018: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - caffe.Caffe.V1LayerParameter.DimCheckMode value = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1002, rawValue); - } else { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - blobShareMode_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - blobShareMode_.add(rawValue); - } - } - input.popLimit(oldLimit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - bottom_ = bottom_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - top_ = top_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - blobs_ = java.util.Collections.unmodifiableList(blobs_); - } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); - } - if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - include_ = java.util.Collections.unmodifiableList(include_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - exclude_ = java.util.Collections.unmodifiableList(exclude_); - } - if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_); - } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - param_ = param_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - blobShareMode_ = java.util.Collections.unmodifiableList(blobShareMode_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_V1LayerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.V1LayerParameter.class, caffe.Caffe.V1LayerParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.V1LayerParameter.LayerType} - */ - public enum LayerType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NONE = 0; - */ - NONE(0, 0), - /** - * ABSVAL = 35; - */ - ABSVAL(1, 35), - /** - * ACCURACY = 1; - */ - ACCURACY(2, 1), - /** - * ARGMAX = 30; - */ - ARGMAX(3, 30), - /** - * BNLL = 2; - */ - BNLL(4, 2), - /** - * CONCAT = 3; - */ - CONCAT(5, 3), - /** - * CONTRASTIVE_LOSS = 37; - */ - CONTRASTIVE_LOSS(6, 37), - /** - * CONVOLUTION = 4; - */ - CONVOLUTION(7, 4), - /** - * DATA = 5; - */ - DATA(8, 5), - /** - * DECONVOLUTION = 39; - */ - DECONVOLUTION(9, 39), - /** - * DROPOUT = 6; - */ - DROPOUT(10, 6), - /** - * DUMMY_DATA = 32; - */ - DUMMY_DATA(11, 32), - /** - * EUCLIDEAN_LOSS = 7; - */ - EUCLIDEAN_LOSS(12, 7), - /** - * ELTWISE = 25; - */ - ELTWISE(13, 25), - /** - * EXP = 38; - */ - EXP(14, 38), - /** - * FLATTEN = 8; - */ - FLATTEN(15, 8), - /** - * HDF5_DATA = 9; - */ - HDF5_DATA(16, 9), - /** - * HDF5_OUTPUT = 10; - */ - HDF5_OUTPUT(17, 10), - /** - * HINGE_LOSS = 28; - */ - HINGE_LOSS(18, 28), - /** - * IM2COL = 11; - */ - IM2COL(19, 11), - /** - * IMAGE_DATA = 12; - */ - IMAGE_DATA(20, 12), - /** - * INFOGAIN_LOSS = 13; - */ - INFOGAIN_LOSS(21, 13), - /** - * INNER_PRODUCT = 14; - */ - INNER_PRODUCT(22, 14), - /** - * LRN = 15; - */ - LRN(23, 15), - /** - * MEMORY_DATA = 29; - */ - MEMORY_DATA(24, 29), - /** - * MULTINOMIAL_LOGISTIC_LOSS = 16; - */ - MULTINOMIAL_LOGISTIC_LOSS(25, 16), - /** - * MVN = 34; - */ - MVN(26, 34), - /** - * POOLING = 17; - */ - POOLING(27, 17), - /** - * POWER = 26; - */ - POWER(28, 26), - /** - * RELU = 18; - */ - RELU(29, 18), - /** - * SIGMOID = 19; - */ - SIGMOID(30, 19), - /** - * SIGMOID_CROSS_ENTROPY_LOSS = 27; - */ - SIGMOID_CROSS_ENTROPY_LOSS(31, 27), - /** - * SILENCE = 36; - */ - SILENCE(32, 36), - /** - * SOFTMAX = 20; - */ - SOFTMAX(33, 20), - /** - * SOFTMAX_LOSS = 21; - */ - SOFTMAX_LOSS(34, 21), - /** - * SPLIT = 22; - */ - SPLIT(35, 22), - /** - * SLICE = 33; - */ - SLICE(36, 33), - /** - * TANH = 23; - */ - TANH(37, 23), - /** - * WINDOW_DATA = 24; - */ - WINDOW_DATA(38, 24), - /** - * THRESHOLD = 31; - */ - THRESHOLD(39, 31), - ; - - /** - * NONE = 0; - */ - public static final int NONE_VALUE = 0; - /** - * ABSVAL = 35; - */ - public static final int ABSVAL_VALUE = 35; - /** - * ACCURACY = 1; - */ - public static final int ACCURACY_VALUE = 1; - /** - * ARGMAX = 30; - */ - public static final int ARGMAX_VALUE = 30; - /** - * BNLL = 2; - */ - public static final int BNLL_VALUE = 2; - /** - * CONCAT = 3; - */ - public static final int CONCAT_VALUE = 3; - /** - * CONTRASTIVE_LOSS = 37; - */ - public static final int CONTRASTIVE_LOSS_VALUE = 37; - /** - * CONVOLUTION = 4; - */ - public static final int CONVOLUTION_VALUE = 4; - /** - * DATA = 5; - */ - public static final int DATA_VALUE = 5; - /** - * DECONVOLUTION = 39; - */ - public static final int DECONVOLUTION_VALUE = 39; - /** - * DROPOUT = 6; - */ - public static final int DROPOUT_VALUE = 6; - /** - * DUMMY_DATA = 32; - */ - public static final int DUMMY_DATA_VALUE = 32; - /** - * EUCLIDEAN_LOSS = 7; - */ - public static final int EUCLIDEAN_LOSS_VALUE = 7; - /** - * ELTWISE = 25; - */ - public static final int ELTWISE_VALUE = 25; - /** - * EXP = 38; - */ - public static final int EXP_VALUE = 38; - /** - * FLATTEN = 8; - */ - public static final int FLATTEN_VALUE = 8; - /** - * HDF5_DATA = 9; - */ - public static final int HDF5_DATA_VALUE = 9; - /** - * HDF5_OUTPUT = 10; - */ - public static final int HDF5_OUTPUT_VALUE = 10; - /** - * HINGE_LOSS = 28; - */ - public static final int HINGE_LOSS_VALUE = 28; - /** - * IM2COL = 11; - */ - public static final int IM2COL_VALUE = 11; - /** - * IMAGE_DATA = 12; - */ - public static final int IMAGE_DATA_VALUE = 12; - /** - * INFOGAIN_LOSS = 13; - */ - public static final int INFOGAIN_LOSS_VALUE = 13; - /** - * INNER_PRODUCT = 14; - */ - public static final int INNER_PRODUCT_VALUE = 14; - /** - * LRN = 15; - */ - public static final int LRN_VALUE = 15; - /** - * MEMORY_DATA = 29; - */ - public static final int MEMORY_DATA_VALUE = 29; - /** - * MULTINOMIAL_LOGISTIC_LOSS = 16; - */ - public static final int MULTINOMIAL_LOGISTIC_LOSS_VALUE = 16; - /** - * MVN = 34; - */ - public static final int MVN_VALUE = 34; - /** - * POOLING = 17; - */ - public static final int POOLING_VALUE = 17; - /** - * POWER = 26; - */ - public static final int POWER_VALUE = 26; - /** - * RELU = 18; - */ - public static final int RELU_VALUE = 18; - /** - * SIGMOID = 19; - */ - public static final int SIGMOID_VALUE = 19; - /** - * SIGMOID_CROSS_ENTROPY_LOSS = 27; - */ - public static final int SIGMOID_CROSS_ENTROPY_LOSS_VALUE = 27; - /** - * SILENCE = 36; - */ - public static final int SILENCE_VALUE = 36; - /** - * SOFTMAX = 20; - */ - public static final int SOFTMAX_VALUE = 20; - /** - * SOFTMAX_LOSS = 21; - */ - public static final int SOFTMAX_LOSS_VALUE = 21; - /** - * SPLIT = 22; - */ - public static final int SPLIT_VALUE = 22; - /** - * SLICE = 33; - */ - public static final int SLICE_VALUE = 33; - /** - * TANH = 23; - */ - public static final int TANH_VALUE = 23; - /** - * WINDOW_DATA = 24; - */ - public static final int WINDOW_DATA_VALUE = 24; - /** - * THRESHOLD = 31; - */ - public static final int THRESHOLD_VALUE = 31; - - - public final int getNumber() { - return value; - } - - public static LayerType valueOf(int value) { - switch (value) { - case 0: return NONE; - case 35: return ABSVAL; - case 1: return ACCURACY; - case 30: return ARGMAX; - case 2: return BNLL; - case 3: return CONCAT; - case 37: return CONTRASTIVE_LOSS; - case 4: return CONVOLUTION; - case 5: return DATA; - case 39: return DECONVOLUTION; - case 6: return DROPOUT; - case 32: return DUMMY_DATA; - case 7: return EUCLIDEAN_LOSS; - case 25: return ELTWISE; - case 38: return EXP; - case 8: return FLATTEN; - case 9: return HDF5_DATA; - case 10: return HDF5_OUTPUT; - case 28: return HINGE_LOSS; - case 11: return IM2COL; - case 12: return IMAGE_DATA; - case 13: return INFOGAIN_LOSS; - case 14: return INNER_PRODUCT; - case 15: return LRN; - case 29: return MEMORY_DATA; - case 16: return MULTINOMIAL_LOGISTIC_LOSS; - case 34: return MVN; - case 17: return POOLING; - case 26: return POWER; - case 18: return RELU; - case 19: return SIGMOID; - case 27: return SIGMOID_CROSS_ENTROPY_LOSS; - case 36: return SILENCE; - case 20: return SOFTMAX; - case 21: return SOFTMAX_LOSS; - case 22: return SPLIT; - case 33: return SLICE; - case 23: return TANH; - case 24: return WINDOW_DATA; - case 31: return THRESHOLD; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - LayerType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LayerType findValueByNumber(int number) { - return LayerType.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.V1LayerParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final LayerType[] VALUES = values(); - - public static LayerType 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 LayerType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.V1LayerParameter.LayerType) - } - - /** - * Protobuf enum {@code caffe.V1LayerParameter.DimCheckMode} - */ - public enum DimCheckMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRICT = 0; - */ - STRICT(0, 0), - /** - * PERMISSIVE = 1; - */ - PERMISSIVE(1, 1), - ; - - /** - * STRICT = 0; - */ - public static final int STRICT_VALUE = 0; - /** - * PERMISSIVE = 1; - */ - 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 final com.google.protobuf.Internal.EnumLiteMap< - DimCheckMode> 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.V1LayerParameter.getDescriptor().getEnumTypes().get(1); - } - - 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.V1LayerParameter.DimCheckMode) - } - - private int bitField0_; - private int bitField1_; - public static final int BOTTOM_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList bottom_; - /** - * repeated string bottom = 2; - */ - public com.google.protobuf.ProtocolStringList - getBottomList() { - return bottom_; - } - /** - * repeated string bottom = 2; - */ - public int getBottomCount() { - return bottom_.size(); - } - /** - * repeated string bottom = 2; - */ - public java.lang.String getBottom(int index) { - return bottom_.get(index); - } - /** - * repeated string bottom = 2; - */ - public com.google.protobuf.ByteString - getBottomBytes(int index) { - return bottom_.getByteString(index); - } - - public static final int TOP_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList top_; - /** - * repeated string top = 3; - */ - public com.google.protobuf.ProtocolStringList - getTopList() { - return top_; - } - /** - * repeated string top = 3; - */ - public int getTopCount() { - return top_.size(); - } - /** - * repeated string top = 3; - */ - public java.lang.String getTop(int index) { - return top_.get(index); - } - /** - * repeated string top = 3; - */ - public com.google.protobuf.ByteString - getTopBytes(int index) { - return top_.getByteString(index); - } - - public static final int NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object name_; - /** - * optional string name = 4; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 4; - */ - 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 = 4; - */ - 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; - } - } - - public static final int INCLUDE_FIELD_NUMBER = 32; - private java.util.List include_; - /** - * repeated .caffe.NetStateRule include = 32; - */ - public java.util.List getIncludeList() { - return include_; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public java.util.List - getIncludeOrBuilderList() { - return include_; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public int getIncludeCount() { - return include_.size(); - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRule getInclude(int index) { - return include_.get(index); - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( - int index) { - return include_.get(index); - } - - public static final int EXCLUDE_FIELD_NUMBER = 33; - private java.util.List exclude_; - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public java.util.List getExcludeList() { - return exclude_; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public java.util.List - getExcludeOrBuilderList() { - return exclude_; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public int getExcludeCount() { - return exclude_.size(); - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRule getExclude(int index) { - return exclude_.get(index); - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( - int index) { - return exclude_.get(index); - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_; - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public caffe.Caffe.V1LayerParameter.LayerType getType() { - caffe.Caffe.V1LayerParameter.LayerType result = caffe.Caffe.V1LayerParameter.LayerType.valueOf(type_); - return result == null ? caffe.Caffe.V1LayerParameter.LayerType.NONE : result; - } - - public static final int BLOBS_FIELD_NUMBER = 6; - private java.util.List blobs_; - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public java.util.List getBlobsList() { - return blobs_; - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public java.util.List - getBlobsOrBuilderList() { - return blobs_; - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public int getBlobsCount() { - return blobs_.size(); - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProto getBlobs(int index) { - return blobs_.get(index); - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index) { - return blobs_.get(index); - } - - public static final int PARAM_FIELD_NUMBER = 1001; - private com.google.protobuf.LazyStringList param_; - /** - * repeated string param = 1001; - */ - public com.google.protobuf.ProtocolStringList - getParamList() { - return param_; - } - /** - * repeated string param = 1001; - */ - public int getParamCount() { - return param_.size(); - } - /** - * repeated string param = 1001; - */ - public java.lang.String getParam(int index) { - return param_.get(index); - } - /** - * repeated string param = 1001; - */ - public com.google.protobuf.ByteString - getParamBytes(int index) { - return param_.getByteString(index); - } - - public static final int BLOB_SHARE_MODE_FIELD_NUMBER = 1002; - private java.util.List blobShareMode_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode> blobShareMode_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>() { - public caffe.Caffe.V1LayerParameter.DimCheckMode convert(java.lang.Integer from) { - caffe.Caffe.V1LayerParameter.DimCheckMode result = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(from); - return result == null ? caffe.Caffe.V1LayerParameter.DimCheckMode.STRICT : result; - } - }; - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public java.util.List getBlobShareModeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>(blobShareMode_, blobShareMode_converter_); - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public int getBlobShareModeCount() { - return blobShareMode_.size(); - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index) { - return blobShareMode_converter_.convert(blobShareMode_.get(index)); - } - - public static final int BLOBS_LR_FIELD_NUMBER = 7; - private java.util.List blobsLr_; - /** - * repeated float blobs_lr = 7; - */ - public java.util.List - getBlobsLrList() { - return blobsLr_; - } - /** - * repeated float blobs_lr = 7; - */ - public int getBlobsLrCount() { - return blobsLr_.size(); - } - /** - * repeated float blobs_lr = 7; - */ - public float getBlobsLr(int index) { - return blobsLr_.get(index); - } - - public static final int WEIGHT_DECAY_FIELD_NUMBER = 8; - private java.util.List weightDecay_; - /** - * repeated float weight_decay = 8; - */ - public java.util.List - getWeightDecayList() { - return weightDecay_; - } - /** - * repeated float weight_decay = 8; - */ - public int getWeightDecayCount() { - return weightDecay_.size(); - } - /** - * repeated float weight_decay = 8; - */ - public float getWeightDecay(int index) { - return weightDecay_.get(index); - } - - public static final int LOSS_WEIGHT_FIELD_NUMBER = 35; - private java.util.List lossWeight_; - /** - * repeated float loss_weight = 35; - */ - public java.util.List - getLossWeightList() { - return lossWeight_; - } - /** - * repeated float loss_weight = 35; - */ - public int getLossWeightCount() { - return lossWeight_.size(); - } - /** - * repeated float loss_weight = 35; - */ - public float getLossWeight(int index) { - return lossWeight_.get(index); - } - - public static final int ACCURACY_PARAM_FIELD_NUMBER = 27; - private caffe.Caffe.AccuracyParameter accuracyParam_; - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public boolean hasAccuracyParam() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public caffe.Caffe.AccuracyParameter getAccuracyParam() { - return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder() { - return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } - - public static final int ARGMAX_PARAM_FIELD_NUMBER = 23; - private caffe.Caffe.ArgMaxParameter argmaxParam_; - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public boolean hasArgmaxParam() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public caffe.Caffe.ArgMaxParameter getArgmaxParam() { - return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { - return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - - public static final int CONCAT_PARAM_FIELD_NUMBER = 9; - private caffe.Caffe.ConcatParameter concatParam_; - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public boolean hasConcatParam() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public caffe.Caffe.ConcatParameter getConcatParam() { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - - public static final int CONTRASTIVE_LOSS_PARAM_FIELD_NUMBER = 40; - private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_; - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public boolean hasContrastiveLossParam() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - - public static final int CONVOLUTION_PARAM_FIELD_NUMBER = 10; - private caffe.Caffe.ConvolutionParameter convolutionParam_; - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public boolean hasConvolutionParam() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public caffe.Caffe.ConvolutionParameter getConvolutionParam() { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - - public static final int DATA_PARAM_FIELD_NUMBER = 11; - private caffe.Caffe.DataParameter dataParam_; - /** - * optional .caffe.DataParameter data_param = 11; - */ - public boolean hasDataParam() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public caffe.Caffe.DataParameter getDataParam() { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - - public static final int DROPOUT_PARAM_FIELD_NUMBER = 12; - private caffe.Caffe.DropoutParameter dropoutParam_; - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public boolean hasDropoutParam() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public caffe.Caffe.DropoutParameter getDropoutParam() { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - - public static final int DUMMY_DATA_PARAM_FIELD_NUMBER = 26; - private caffe.Caffe.DummyDataParameter dummyDataParam_; - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public boolean hasDummyDataParam() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public caffe.Caffe.DummyDataParameter getDummyDataParam() { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - - public static final int ELTWISE_PARAM_FIELD_NUMBER = 24; - private caffe.Caffe.EltwiseParameter eltwiseParam_; - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public boolean hasEltwiseParam() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public caffe.Caffe.EltwiseParameter getEltwiseParam() { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - - public static final int EXP_PARAM_FIELD_NUMBER = 41; - private caffe.Caffe.ExpParameter expParam_; - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public boolean hasExpParam() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public caffe.Caffe.ExpParameter getExpParam() { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - - public static final int HDF5_DATA_PARAM_FIELD_NUMBER = 13; - private caffe.Caffe.HDF5DataParameter hdf5DataParam_; - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public boolean hasHdf5DataParam() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - - public static final int HDF5_OUTPUT_PARAM_FIELD_NUMBER = 14; - private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_; - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public boolean hasHdf5OutputParam() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - - public static final int HINGE_LOSS_PARAM_FIELD_NUMBER = 29; - private caffe.Caffe.HingeLossParameter hingeLossParam_; - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public boolean hasHingeLossParam() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public caffe.Caffe.HingeLossParameter getHingeLossParam() { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - - public static final int IMAGE_DATA_PARAM_FIELD_NUMBER = 15; - private caffe.Caffe.ImageDataParameter imageDataParam_; - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public boolean hasImageDataParam() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public caffe.Caffe.ImageDataParameter getImageDataParam() { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - - public static final int INFOGAIN_LOSS_PARAM_FIELD_NUMBER = 16; - private caffe.Caffe.InfogainLossParameter infogainLossParam_; - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public boolean hasInfogainLossParam() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - - public static final int INNER_PRODUCT_PARAM_FIELD_NUMBER = 17; - private caffe.Caffe.InnerProductParameter innerProductParam_; - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public boolean hasInnerProductParam() { - return ((bitField0_ & 0x00020000) == 0x00020000); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public caffe.Caffe.InnerProductParameter getInnerProductParam() { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - - public static final int LRN_PARAM_FIELD_NUMBER = 18; - private caffe.Caffe.LRNParameter lrnParam_; - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public boolean hasLrnParam() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public caffe.Caffe.LRNParameter getLrnParam() { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - - public static final int MEMORY_DATA_PARAM_FIELD_NUMBER = 22; - private caffe.Caffe.MemoryDataParameter memoryDataParam_; - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public boolean hasMemoryDataParam() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - - public static final int MVN_PARAM_FIELD_NUMBER = 34; - private caffe.Caffe.MVNParameter mvnParam_; - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public boolean hasMvnParam() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public caffe.Caffe.MVNParameter getMvnParam() { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - - public static final int POOLING_PARAM_FIELD_NUMBER = 19; - private caffe.Caffe.PoolingParameter poolingParam_; - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public boolean hasPoolingParam() { - return ((bitField0_ & 0x00200000) == 0x00200000); - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public caffe.Caffe.PoolingParameter getPoolingParam() { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - - public static final int POWER_PARAM_FIELD_NUMBER = 21; - private caffe.Caffe.PowerParameter powerParam_; - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public boolean hasPowerParam() { - return ((bitField0_ & 0x00400000) == 0x00400000); - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public caffe.Caffe.PowerParameter getPowerParam() { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - - public static final int RELU_PARAM_FIELD_NUMBER = 30; - private caffe.Caffe.ReLUParameter reluParam_; - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public boolean hasReluParam() { - return ((bitField0_ & 0x00800000) == 0x00800000); - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public caffe.Caffe.ReLUParameter getReluParam() { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - - public static final int SIGMOID_PARAM_FIELD_NUMBER = 38; - private caffe.Caffe.SigmoidParameter sigmoidParam_; - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public boolean hasSigmoidParam() { - return ((bitField0_ & 0x01000000) == 0x01000000); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public caffe.Caffe.SigmoidParameter getSigmoidParam() { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - - public static final int SOFTMAX_PARAM_FIELD_NUMBER = 39; - private caffe.Caffe.SoftmaxParameter softmaxParam_; - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public boolean hasSoftmaxParam() { - return ((bitField0_ & 0x02000000) == 0x02000000); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - - public static final int SLICE_PARAM_FIELD_NUMBER = 31; - private caffe.Caffe.SliceParameter sliceParam_; - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public boolean hasSliceParam() { - return ((bitField0_ & 0x04000000) == 0x04000000); - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public caffe.Caffe.SliceParameter getSliceParam() { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - - public static final int TANH_PARAM_FIELD_NUMBER = 37; - private caffe.Caffe.TanHParameter tanhParam_; - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public boolean hasTanhParam() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public caffe.Caffe.TanHParameter getTanhParam() { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - - public static final int THRESHOLD_PARAM_FIELD_NUMBER = 25; - private caffe.Caffe.ThresholdParameter thresholdParam_; - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public boolean hasThresholdParam() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public caffe.Caffe.ThresholdParameter getThresholdParam() { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - - public static final int WINDOW_DATA_PARAM_FIELD_NUMBER = 20; - private caffe.Caffe.WindowDataParameter windowDataParam_; - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public boolean hasWindowDataParam() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public caffe.Caffe.WindowDataParameter getWindowDataParam() { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - - public static final int TRANSFORM_PARAM_FIELD_NUMBER = 36; - private caffe.Caffe.TransformationParameter transformParam_; - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public boolean hasTransformParam() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public caffe.Caffe.TransformationParameter getTransformParam() { - return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { - return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - - public static final int LOSS_PARAM_FIELD_NUMBER = 42; - private caffe.Caffe.LossParameter lossParam_; - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public boolean hasLossParam() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public caffe.Caffe.LossParameter getLossParam() { - return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { - return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - - public static final int LAYER_FIELD_NUMBER = 1; - private caffe.Caffe.V0LayerParameter layer_; - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public boolean hasLayer() { - return ((bitField1_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public caffe.Caffe.V0LayerParameter getLayer() { - return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder() { - return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField1_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, getLayer()); - } - for (int i = 0; i < bottom_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, bottom_.getRaw(i)); - } - for (int i = 0; i < top_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, top_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(5, type_); - } - for (int i = 0; i < blobs_.size(); i++) { - output.writeMessage(6, blobs_.get(i)); - } - for (int i = 0; i < blobsLr_.size(); i++) { - output.writeFloat(7, blobsLr_.get(i)); - } - for (int i = 0; i < weightDecay_.size(); i++) { - output.writeFloat(8, weightDecay_.get(i)); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(9, getConcatParam()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeMessage(10, getConvolutionParam()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(11, getDataParam()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeMessage(12, getDropoutParam()); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeMessage(13, getHdf5DataParam()); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeMessage(14, getHdf5OutputParam()); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - output.writeMessage(15, getImageDataParam()); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - output.writeMessage(16, getInfogainLossParam()); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - output.writeMessage(17, getInnerProductParam()); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - output.writeMessage(18, getLrnParam()); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - output.writeMessage(19, getPoolingParam()); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - output.writeMessage(20, getWindowDataParam()); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - output.writeMessage(21, getPowerParam()); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - output.writeMessage(22, getMemoryDataParam()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(23, getArgmaxParam()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeMessage(24, getEltwiseParam()); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - output.writeMessage(25, getThresholdParam()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeMessage(26, getDummyDataParam()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(27, getAccuracyParam()); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - output.writeMessage(29, getHingeLossParam()); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - output.writeMessage(30, getReluParam()); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - output.writeMessage(31, getSliceParam()); - } - for (int i = 0; i < include_.size(); i++) { - output.writeMessage(32, include_.get(i)); - } - for (int i = 0; i < exclude_.size(); i++) { - output.writeMessage(33, exclude_.get(i)); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - output.writeMessage(34, getMvnParam()); - } - for (int i = 0; i < lossWeight_.size(); i++) { - output.writeFloat(35, lossWeight_.get(i)); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - output.writeMessage(36, getTransformParam()); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - output.writeMessage(37, getTanhParam()); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - output.writeMessage(38, getSigmoidParam()); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - output.writeMessage(39, getSoftmaxParam()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeMessage(40, getContrastiveLossParam()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeMessage(41, getExpParam()); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - output.writeMessage(42, getLossParam()); - } - for (int i = 0; i < param_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1001, param_.getRaw(i)); - } - for (int i = 0; i < blobShareMode_.size(); i++) { - output.writeEnum(1002, blobShareMode_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField1_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLayer()); - } - { - int dataSize = 0; - for (int i = 0; i < bottom_.size(); i++) { - dataSize += computeStringSizeNoTag(bottom_.getRaw(i)); - } - size += dataSize; - size += 1 * getBottomList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < top_.size(); i++) { - dataSize += computeStringSizeNoTag(top_.getRaw(i)); - } - size += dataSize; - size += 1 * getTopList().size(); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, type_); - } - for (int i = 0; i < blobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, blobs_.get(i)); - } - { - int dataSize = 0; - dataSize = 4 * getBlobsLrList().size(); - size += dataSize; - size += 1 * getBlobsLrList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getWeightDecayList().size(); - size += dataSize; - size += 1 * getWeightDecayList().size(); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getConcatParam()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getConvolutionParam()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getDataParam()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getDropoutParam()); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getHdf5DataParam()); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getHdf5OutputParam()); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, getImageDataParam()); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, getInfogainLossParam()); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, getInnerProductParam()); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getLrnParam()); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, getPoolingParam()); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, getWindowDataParam()); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getPowerParam()); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, getMemoryDataParam()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(23, getArgmaxParam()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(24, getEltwiseParam()); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(25, getThresholdParam()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(26, getDummyDataParam()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(27, getAccuracyParam()); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(29, getHingeLossParam()); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(30, getReluParam()); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(31, getSliceParam()); - } - for (int i = 0; i < include_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(32, include_.get(i)); - } - for (int i = 0; i < exclude_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(33, exclude_.get(i)); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(34, getMvnParam()); - } - { - int dataSize = 0; - dataSize = 4 * getLossWeightList().size(); - size += dataSize; - size += 2 * getLossWeightList().size(); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(36, getTransformParam()); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(37, getTanhParam()); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(38, getSigmoidParam()); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(39, getSoftmaxParam()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(40, getContrastiveLossParam()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(41, getExpParam()); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(42, getLossParam()); - } - { - int dataSize = 0; - for (int i = 0; i < param_.size(); i++) { - dataSize += computeStringSizeNoTag(param_.getRaw(i)); - } - size += dataSize; - size += 2 * getParamList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < blobShareMode_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(blobShareMode_.get(i)); - } - size += dataSize; - size += 2 * blobShareMode_.size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.V1LayerParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.V1LayerParameter 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.V1LayerParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.V1LayerParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.V1LayerParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.V1LayerParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.V1LayerParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.V1LayerParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.V1LayerParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.V1LayerParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.V1LayerParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.V1LayerParameter} - * - *
-     * DEPRECATED: use LayerParameter.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.V1LayerParameter) - caffe.Caffe.V1LayerParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_V1LayerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.V1LayerParameter.class, caffe.Caffe.V1LayerParameter.Builder.class); - } - - // Construct using caffe.Caffe.V1LayerParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getIncludeFieldBuilder(); - getExcludeFieldBuilder(); - getBlobsFieldBuilder(); - getAccuracyParamFieldBuilder(); - getArgmaxParamFieldBuilder(); - getConcatParamFieldBuilder(); - getContrastiveLossParamFieldBuilder(); - getConvolutionParamFieldBuilder(); - getDataParamFieldBuilder(); - getDropoutParamFieldBuilder(); - getDummyDataParamFieldBuilder(); - getEltwiseParamFieldBuilder(); - getExpParamFieldBuilder(); - getHdf5DataParamFieldBuilder(); - getHdf5OutputParamFieldBuilder(); - getHingeLossParamFieldBuilder(); - getImageDataParamFieldBuilder(); - getInfogainLossParamFieldBuilder(); - getInnerProductParamFieldBuilder(); - getLrnParamFieldBuilder(); - getMemoryDataParamFieldBuilder(); - getMvnParamFieldBuilder(); - getPoolingParamFieldBuilder(); - getPowerParamFieldBuilder(); - getReluParamFieldBuilder(); - getSigmoidParamFieldBuilder(); - getSoftmaxParamFieldBuilder(); - getSliceParamFieldBuilder(); - getTanhParamFieldBuilder(); - getThresholdParamFieldBuilder(); - getWindowDataParamFieldBuilder(); - getTransformParamFieldBuilder(); - getLossParamFieldBuilder(); - getLayerFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - top_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - if (includeBuilder_ == null) { - include_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - includeBuilder_.clear(); - } - if (excludeBuilder_ == null) { - exclude_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - excludeBuilder_.clear(); - } - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - blobsBuilder_.clear(); - } - param_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000080); - blobShareMode_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - blobsLr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - weightDecay_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - lossWeight_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - if (accuracyParamBuilder_ == null) { - accuracyParam_ = null; - } else { - accuracyParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - if (argmaxParamBuilder_ == null) { - argmaxParam_ = null; - } else { - argmaxParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - if (concatParamBuilder_ == null) { - concatParam_ = null; - } else { - concatParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00004000); - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = null; - } else { - contrastiveLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00008000); - if (convolutionParamBuilder_ == null) { - convolutionParam_ = null; - } else { - convolutionParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00010000); - if (dataParamBuilder_ == null) { - dataParam_ = null; - } else { - dataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00020000); - if (dropoutParamBuilder_ == null) { - dropoutParam_ = null; - } else { - dropoutParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00040000); - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = null; - } else { - dummyDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00080000); - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = null; - } else { - eltwiseParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00100000); - if (expParamBuilder_ == null) { - expParam_ = null; - } else { - expParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00200000); - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = null; - } else { - hdf5DataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00400000); - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00800000); - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = null; - } else { - hingeLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x01000000); - if (imageDataParamBuilder_ == null) { - imageDataParam_ = null; - } else { - imageDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x02000000); - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = null; - } else { - infogainLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x04000000); - if (innerProductParamBuilder_ == null) { - innerProductParam_ = null; - } else { - innerProductParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x08000000); - if (lrnParamBuilder_ == null) { - lrnParam_ = null; - } else { - lrnParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x10000000); - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = null; - } else { - memoryDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x20000000); - if (mvnParamBuilder_ == null) { - mvnParam_ = null; - } else { - mvnParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x40000000); - if (poolingParamBuilder_ == null) { - poolingParam_ = null; - } else { - poolingParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x80000000); - if (powerParamBuilder_ == null) { - powerParam_ = null; - } else { - powerParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000001); - if (reluParamBuilder_ == null) { - reluParam_ = null; - } else { - reluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000002); - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = null; - } else { - sigmoidParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000004); - if (softmaxParamBuilder_ == null) { - softmaxParam_ = null; - } else { - softmaxParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000008); - if (sliceParamBuilder_ == null) { - sliceParam_ = null; - } else { - sliceParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000010); - if (tanhParamBuilder_ == null) { - tanhParam_ = null; - } else { - tanhParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - if (thresholdParamBuilder_ == null) { - thresholdParam_ = null; - } else { - thresholdParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000040); - if (windowDataParamBuilder_ == null) { - windowDataParam_ = null; - } else { - windowDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000080); - if (transformParamBuilder_ == null) { - transformParam_ = null; - } else { - transformParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000100); - if (lossParamBuilder_ == null) { - lossParam_ = null; - } else { - lossParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000200); - if (layerBuilder_ == null) { - layer_ = null; - } else { - layerBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000400); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; - } - - public caffe.Caffe.V1LayerParameter getDefaultInstanceForType() { - return caffe.Caffe.V1LayerParameter.getDefaultInstance(); - } - - public caffe.Caffe.V1LayerParameter build() { - caffe.Caffe.V1LayerParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.V1LayerParameter buildPartial() { - caffe.Caffe.V1LayerParameter result = new caffe.Caffe.V1LayerParameter(this); - int from_bitField0_ = bitField0_; - int from_bitField1_ = bitField1_; - int to_bitField0_ = 0; - int to_bitField1_ = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - bottom_ = bottom_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bottom_ = bottom_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - top_ = top_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.top_ = top_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (includeBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - include_ = java.util.Collections.unmodifiableList(include_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.include_ = include_; - } else { - result.include_ = includeBuilder_.build(); - } - if (excludeBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - exclude_ = java.util.Collections.unmodifiableList(exclude_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.exclude_ = exclude_; - } else { - result.exclude_ = excludeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000002; - } - result.type_ = type_; - if (blobsBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - blobs_ = java.util.Collections.unmodifiableList(blobs_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.blobs_ = blobs_; - } else { - result.blobs_ = blobsBuilder_.build(); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - param_ = param_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.param_ = param_; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - blobShareMode_ = java.util.Collections.unmodifiableList(blobShareMode_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.blobShareMode_ = blobShareMode_; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.blobsLr_ = blobsLr_; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.weightDecay_ = weightDecay_; - if (((bitField0_ & 0x00000800) == 0x00000800)) { - lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_); - bitField0_ = (bitField0_ & ~0x00000800); - } - result.lossWeight_ = lossWeight_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00000004; - } - if (accuracyParamBuilder_ == null) { - result.accuracyParam_ = accuracyParam_; - } else { - result.accuracyParam_ = accuracyParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00002000) == 0x00002000)) { - to_bitField0_ |= 0x00000008; - } - if (argmaxParamBuilder_ == null) { - result.argmaxParam_ = argmaxParam_; - } else { - result.argmaxParam_ = argmaxParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00004000) == 0x00004000)) { - to_bitField0_ |= 0x00000010; - } - if (concatParamBuilder_ == null) { - result.concatParam_ = concatParam_; - } else { - result.concatParam_ = concatParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00008000) == 0x00008000)) { - to_bitField0_ |= 0x00000020; - } - if (contrastiveLossParamBuilder_ == null) { - result.contrastiveLossParam_ = contrastiveLossParam_; - } else { - result.contrastiveLossParam_ = contrastiveLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00010000) == 0x00010000)) { - to_bitField0_ |= 0x00000040; - } - if (convolutionParamBuilder_ == null) { - result.convolutionParam_ = convolutionParam_; - } else { - result.convolutionParam_ = convolutionParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00020000) == 0x00020000)) { - to_bitField0_ |= 0x00000080; - } - if (dataParamBuilder_ == null) { - result.dataParam_ = dataParam_; - } else { - result.dataParam_ = dataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00040000) == 0x00040000)) { - to_bitField0_ |= 0x00000100; - } - if (dropoutParamBuilder_ == null) { - result.dropoutParam_ = dropoutParam_; - } else { - result.dropoutParam_ = dropoutParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00080000) == 0x00080000)) { - to_bitField0_ |= 0x00000200; - } - if (dummyDataParamBuilder_ == null) { - result.dummyDataParam_ = dummyDataParam_; - } else { - result.dummyDataParam_ = dummyDataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00100000) == 0x00100000)) { - to_bitField0_ |= 0x00000400; - } - if (eltwiseParamBuilder_ == null) { - result.eltwiseParam_ = eltwiseParam_; - } else { - result.eltwiseParam_ = eltwiseParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00200000) == 0x00200000)) { - to_bitField0_ |= 0x00000800; - } - if (expParamBuilder_ == null) { - result.expParam_ = expParam_; - } else { - result.expParam_ = expParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00400000) == 0x00400000)) { - to_bitField0_ |= 0x00001000; - } - if (hdf5DataParamBuilder_ == null) { - result.hdf5DataParam_ = hdf5DataParam_; - } else { - result.hdf5DataParam_ = hdf5DataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x00800000) == 0x00800000)) { - to_bitField0_ |= 0x00002000; - } - if (hdf5OutputParamBuilder_ == null) { - result.hdf5OutputParam_ = hdf5OutputParam_; - } else { - result.hdf5OutputParam_ = hdf5OutputParamBuilder_.build(); - } - if (((from_bitField0_ & 0x01000000) == 0x01000000)) { - to_bitField0_ |= 0x00004000; - } - if (hingeLossParamBuilder_ == null) { - result.hingeLossParam_ = hingeLossParam_; - } else { - result.hingeLossParam_ = hingeLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x02000000) == 0x02000000)) { - to_bitField0_ |= 0x00008000; - } - if (imageDataParamBuilder_ == null) { - result.imageDataParam_ = imageDataParam_; - } else { - result.imageDataParam_ = imageDataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x04000000) == 0x04000000)) { - to_bitField0_ |= 0x00010000; - } - if (infogainLossParamBuilder_ == null) { - result.infogainLossParam_ = infogainLossParam_; - } else { - result.infogainLossParam_ = infogainLossParamBuilder_.build(); - } - if (((from_bitField0_ & 0x08000000) == 0x08000000)) { - to_bitField0_ |= 0x00020000; - } - if (innerProductParamBuilder_ == null) { - result.innerProductParam_ = innerProductParam_; - } else { - result.innerProductParam_ = innerProductParamBuilder_.build(); - } - if (((from_bitField0_ & 0x10000000) == 0x10000000)) { - to_bitField0_ |= 0x00040000; - } - if (lrnParamBuilder_ == null) { - result.lrnParam_ = lrnParam_; - } else { - result.lrnParam_ = lrnParamBuilder_.build(); - } - if (((from_bitField0_ & 0x20000000) == 0x20000000)) { - to_bitField0_ |= 0x00080000; - } - if (memoryDataParamBuilder_ == null) { - result.memoryDataParam_ = memoryDataParam_; - } else { - result.memoryDataParam_ = memoryDataParamBuilder_.build(); - } - if (((from_bitField0_ & 0x40000000) == 0x40000000)) { - to_bitField0_ |= 0x00100000; - } - if (mvnParamBuilder_ == null) { - result.mvnParam_ = mvnParam_; - } else { - result.mvnParam_ = mvnParamBuilder_.build(); - } - if (((from_bitField0_ & 0x80000000) == 0x80000000)) { - to_bitField0_ |= 0x00200000; - } - if (poolingParamBuilder_ == null) { - result.poolingParam_ = poolingParam_; - } else { - result.poolingParam_ = poolingParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00400000; - } - if (powerParamBuilder_ == null) { - result.powerParam_ = powerParam_; - } else { - result.powerParam_ = powerParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00800000; - } - if (reluParamBuilder_ == null) { - result.reluParam_ = reluParam_; - } else { - result.reluParam_ = reluParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x01000000; - } - if (sigmoidParamBuilder_ == null) { - result.sigmoidParam_ = sigmoidParam_; - } else { - result.sigmoidParam_ = sigmoidParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x02000000; - } - if (softmaxParamBuilder_ == null) { - result.softmaxParam_ = softmaxParam_; - } else { - result.softmaxParam_ = softmaxParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x04000000; - } - if (sliceParamBuilder_ == null) { - result.sliceParam_ = sliceParam_; - } else { - result.sliceParam_ = sliceParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x08000000; - } - if (tanhParamBuilder_ == null) { - result.tanhParam_ = tanhParam_; - } else { - result.tanhParam_ = tanhParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x10000000; - } - if (thresholdParamBuilder_ == null) { - result.thresholdParam_ = thresholdParam_; - } else { - result.thresholdParam_ = thresholdParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x20000000; - } - if (windowDataParamBuilder_ == null) { - result.windowDataParam_ = windowDataParam_; - } else { - result.windowDataParam_ = windowDataParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x40000000; - } - if (transformParamBuilder_ == null) { - result.transformParam_ = transformParam_; - } else { - result.transformParam_ = transformParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x80000000; - } - if (lossParamBuilder_ == null) { - result.lossParam_ = lossParam_; - } else { - result.lossParam_ = lossParamBuilder_.build(); - } - if (((from_bitField1_ & 0x00000400) == 0x00000400)) { - to_bitField1_ |= 0x00000001; - } - if (layerBuilder_ == null) { - result.layer_ = layer_; - } else { - result.layer_ = layerBuilder_.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.V1LayerParameter) { - return mergeFrom((caffe.Caffe.V1LayerParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.V1LayerParameter other) { - if (other == caffe.Caffe.V1LayerParameter.getDefaultInstance()) return this; - if (!other.bottom_.isEmpty()) { - if (bottom_.isEmpty()) { - bottom_ = other.bottom_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBottomIsMutable(); - bottom_.addAll(other.bottom_); - } - onChanged(); - } - if (!other.top_.isEmpty()) { - if (top_.isEmpty()) { - top_ = other.top_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTopIsMutable(); - top_.addAll(other.top_); - } - onChanged(); - } - if (other.hasName()) { - bitField0_ |= 0x00000004; - name_ = other.name_; - onChanged(); - } - if (includeBuilder_ == null) { - if (!other.include_.isEmpty()) { - if (include_.isEmpty()) { - include_ = other.include_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureIncludeIsMutable(); - include_.addAll(other.include_); - } - onChanged(); - } - } else { - if (!other.include_.isEmpty()) { - if (includeBuilder_.isEmpty()) { - includeBuilder_.dispose(); - includeBuilder_ = null; - include_ = other.include_; - bitField0_ = (bitField0_ & ~0x00000008); - 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_ & ~0x00000010); - } else { - ensureExcludeIsMutable(); - exclude_.addAll(other.exclude_); - } - onChanged(); - } - } else { - if (!other.exclude_.isEmpty()) { - if (excludeBuilder_.isEmpty()) { - excludeBuilder_.dispose(); - excludeBuilder_ = null; - exclude_ = other.exclude_; - bitField0_ = (bitField0_ & ~0x00000010); - excludeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getExcludeFieldBuilder() : null; - } else { - excludeBuilder_.addAllMessages(other.exclude_); - } - } - } - if (other.hasType()) { - setType(other.getType()); - } - if (blobsBuilder_ == null) { - if (!other.blobs_.isEmpty()) { - if (blobs_.isEmpty()) { - blobs_ = other.blobs_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureBlobsIsMutable(); - blobs_.addAll(other.blobs_); - } - onChanged(); - } - } else { - if (!other.blobs_.isEmpty()) { - if (blobsBuilder_.isEmpty()) { - blobsBuilder_.dispose(); - blobsBuilder_ = null; - blobs_ = other.blobs_; - bitField0_ = (bitField0_ & ~0x00000040); - blobsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlobsFieldBuilder() : null; - } else { - blobsBuilder_.addAllMessages(other.blobs_); - } - } - } - if (!other.param_.isEmpty()) { - if (param_.isEmpty()) { - param_ = other.param_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureParamIsMutable(); - param_.addAll(other.param_); - } - onChanged(); - } - if (!other.blobShareMode_.isEmpty()) { - if (blobShareMode_.isEmpty()) { - blobShareMode_ = other.blobShareMode_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureBlobShareModeIsMutable(); - blobShareMode_.addAll(other.blobShareMode_); - } - onChanged(); - } - if (!other.blobsLr_.isEmpty()) { - if (blobsLr_.isEmpty()) { - blobsLr_ = other.blobsLr_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureBlobsLrIsMutable(); - blobsLr_.addAll(other.blobsLr_); - } - onChanged(); - } - if (!other.weightDecay_.isEmpty()) { - if (weightDecay_.isEmpty()) { - weightDecay_ = other.weightDecay_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureWeightDecayIsMutable(); - weightDecay_.addAll(other.weightDecay_); - } - onChanged(); - } - if (!other.lossWeight_.isEmpty()) { - if (lossWeight_.isEmpty()) { - lossWeight_ = other.lossWeight_; - bitField0_ = (bitField0_ & ~0x00000800); - } else { - ensureLossWeightIsMutable(); - lossWeight_.addAll(other.lossWeight_); - } - onChanged(); - } - if (other.hasAccuracyParam()) { - mergeAccuracyParam(other.getAccuracyParam()); - } - if (other.hasArgmaxParam()) { - mergeArgmaxParam(other.getArgmaxParam()); - } - if (other.hasConcatParam()) { - mergeConcatParam(other.getConcatParam()); - } - if (other.hasContrastiveLossParam()) { - mergeContrastiveLossParam(other.getContrastiveLossParam()); - } - if (other.hasConvolutionParam()) { - mergeConvolutionParam(other.getConvolutionParam()); - } - 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.hasExpParam()) { - mergeExpParam(other.getExpParam()); - } - 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.hasLrnParam()) { - mergeLrnParam(other.getLrnParam()); - } - if (other.hasMemoryDataParam()) { - mergeMemoryDataParam(other.getMemoryDataParam()); - } - if (other.hasMvnParam()) { - mergeMvnParam(other.getMvnParam()); - } - if (other.hasPoolingParam()) { - mergePoolingParam(other.getPoolingParam()); - } - if (other.hasPowerParam()) { - mergePowerParam(other.getPowerParam()); - } - if (other.hasReluParam()) { - mergeReluParam(other.getReluParam()); - } - if (other.hasSigmoidParam()) { - mergeSigmoidParam(other.getSigmoidParam()); - } - if (other.hasSoftmaxParam()) { - mergeSoftmaxParam(other.getSoftmaxParam()); - } - if (other.hasSliceParam()) { - mergeSliceParam(other.getSliceParam()); - } - if (other.hasTanhParam()) { - mergeTanhParam(other.getTanhParam()); - } - if (other.hasThresholdParam()) { - mergeThresholdParam(other.getThresholdParam()); - } - if (other.hasWindowDataParam()) { - mergeWindowDataParam(other.getWindowDataParam()); - } - if (other.hasTransformParam()) { - mergeTransformParam(other.getTransformParam()); - } - if (other.hasLossParam()) { - mergeLossParam(other.getLossParam()); - } - if (other.hasLayer()) { - mergeLayer(other.getLayer()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.V1LayerParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.V1LayerParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - private int bitField1_; - - private com.google.protobuf.LazyStringList bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureBottomIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - bottom_ = new com.google.protobuf.LazyStringArrayList(bottom_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string bottom = 2; - */ - public com.google.protobuf.ProtocolStringList - getBottomList() { - return bottom_.getUnmodifiableView(); - } - /** - * repeated string bottom = 2; - */ - public int getBottomCount() { - return bottom_.size(); - } - /** - * repeated string bottom = 2; - */ - public java.lang.String getBottom(int index) { - return bottom_.get(index); - } - /** - * repeated string bottom = 2; - */ - public com.google.protobuf.ByteString - getBottomBytes(int index) { - return bottom_.getByteString(index); - } - /** - * repeated string bottom = 2; - */ - 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 = 2; - */ - public Builder addBottom( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBottomIsMutable(); - bottom_.add(value); - onChanged(); - return this; - } - /** - * repeated string bottom = 2; - */ - public Builder addAllBottom( - java.lang.Iterable values) { - ensureBottomIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bottom_); - onChanged(); - return this; - } - /** - * repeated string bottom = 2; - */ - public Builder clearBottom() { - bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string bottom = 2; - */ - public Builder addBottomBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBottomIsMutable(); - bottom_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList top_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTopIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - top_ = new com.google.protobuf.LazyStringArrayList(top_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string top = 3; - */ - public com.google.protobuf.ProtocolStringList - getTopList() { - return top_.getUnmodifiableView(); - } - /** - * repeated string top = 3; - */ - public int getTopCount() { - return top_.size(); - } - /** - * repeated string top = 3; - */ - public java.lang.String getTop(int index) { - return top_.get(index); - } - /** - * repeated string top = 3; - */ - public com.google.protobuf.ByteString - getTopBytes(int index) { - return top_.getByteString(index); - } - /** - * repeated string top = 3; - */ - 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 = 3; - */ - public Builder addTop( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopIsMutable(); - top_.add(value); - onChanged(); - return this; - } - /** - * repeated string top = 3; - */ - public Builder addAllTop( - java.lang.Iterable values) { - ensureTopIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, top_); - onChanged(); - return this; - } - /** - * repeated string top = 3; - */ - public Builder clearTop() { - top_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string top = 3; - */ - public Builder addTopBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopIsMutable(); - top_.add(value); - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 4; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string name = 4; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 4; - */ - 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 = 4; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 4; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000004); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 4; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } - - private java.util.List include_ = - java.util.Collections.emptyList(); - private void ensureIncludeIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - include_ = new java.util.ArrayList(include_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> includeBuilder_; - - /** - * repeated .caffe.NetStateRule include = 32; - */ - public java.util.List getIncludeList() { - if (includeBuilder_ == null) { - return java.util.Collections.unmodifiableList(include_); - } else { - return includeBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public int getIncludeCount() { - if (includeBuilder_ == null) { - return include_.size(); - } else { - return includeBuilder_.getCount(); - } - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRule getInclude(int index) { - if (includeBuilder_ == null) { - return include_.get(index); - } else { - return includeBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder setInclude( - int index, caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.set(index, value); - onChanged(); - } else { - includeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder setInclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.set(index, builderForValue.build()); - onChanged(); - } else { - includeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder addInclude(caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.add(value); - onChanged(); - } else { - includeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder addInclude( - int index, caffe.Caffe.NetStateRule value) { - if (includeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeIsMutable(); - include_.add(index, value); - onChanged(); - } else { - includeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder addInclude( - caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.add(builderForValue.build()); - onChanged(); - } else { - includeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder addInclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.add(index, builderForValue.build()); - onChanged(); - } else { - includeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder addAllInclude( - java.lang.Iterable values) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, include_); - onChanged(); - } else { - includeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder clearInclude() { - if (includeBuilder_ == null) { - include_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - includeBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public Builder removeInclude(int index) { - if (includeBuilder_ == null) { - ensureIncludeIsMutable(); - include_.remove(index); - onChanged(); - } else { - includeBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRule.Builder getIncludeBuilder( - int index) { - return getIncludeFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( - int index) { - if (includeBuilder_ == null) { - return include_.get(index); } else { - return includeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public java.util.List - getIncludeOrBuilderList() { - if (includeBuilder_ != null) { - return includeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(include_); - } - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRule.Builder addIncludeBuilder() { - return getIncludeFieldBuilder().addBuilder( - caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public caffe.Caffe.NetStateRule.Builder addIncludeBuilder( - int index) { - return getIncludeFieldBuilder().addBuilder( - index, caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule include = 32; - */ - public java.util.List - getIncludeBuilderList() { - return getIncludeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> - getIncludeFieldBuilder() { - if (includeBuilder_ == null) { - includeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( - include_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - include_ = null; - } - return includeBuilder_; - } - - private java.util.List exclude_ = - java.util.Collections.emptyList(); - private void ensureExcludeIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - exclude_ = new java.util.ArrayList(exclude_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> excludeBuilder_; - - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public java.util.List getExcludeList() { - if (excludeBuilder_ == null) { - return java.util.Collections.unmodifiableList(exclude_); - } else { - return excludeBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public int getExcludeCount() { - if (excludeBuilder_ == null) { - return exclude_.size(); - } else { - return excludeBuilder_.getCount(); - } - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRule getExclude(int index) { - if (excludeBuilder_ == null) { - return exclude_.get(index); - } else { - return excludeBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder setExclude( - int index, caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.set(index, value); - onChanged(); - } else { - excludeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder setExclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.set(index, builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder addExclude(caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.add(value); - onChanged(); - } else { - excludeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder addExclude( - int index, caffe.Caffe.NetStateRule value) { - if (excludeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeIsMutable(); - exclude_.add(index, value); - onChanged(); - } else { - excludeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder addExclude( - caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.add(builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder addExclude( - int index, caffe.Caffe.NetStateRule.Builder builderForValue) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.add(index, builderForValue.build()); - onChanged(); - } else { - excludeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder addAllExclude( - java.lang.Iterable values) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, exclude_); - onChanged(); - } else { - excludeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder clearExclude() { - if (excludeBuilder_ == null) { - exclude_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - excludeBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public Builder removeExclude(int index) { - if (excludeBuilder_ == null) { - ensureExcludeIsMutable(); - exclude_.remove(index); - onChanged(); - } else { - excludeBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRule.Builder getExcludeBuilder( - int index) { - return getExcludeFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( - int index) { - if (excludeBuilder_ == null) { - return exclude_.get(index); } else { - return excludeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public java.util.List - getExcludeOrBuilderList() { - if (excludeBuilder_ != null) { - return excludeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(exclude_); - } - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRule.Builder addExcludeBuilder() { - return getExcludeFieldBuilder().addBuilder( - caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public caffe.Caffe.NetStateRule.Builder addExcludeBuilder( - int index) { - return getExcludeFieldBuilder().addBuilder( - index, caffe.Caffe.NetStateRule.getDefaultInstance()); - } - /** - * repeated .caffe.NetStateRule exclude = 33; - */ - public java.util.List - getExcludeBuilderList() { - return getExcludeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> - getExcludeFieldBuilder() { - if (excludeBuilder_ == null) { - excludeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( - exclude_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - exclude_ = null; - } - return excludeBuilder_; - } - - private int type_ = 0; - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public caffe.Caffe.V1LayerParameter.LayerType getType() { - caffe.Caffe.V1LayerParameter.LayerType result = caffe.Caffe.V1LayerParameter.LayerType.valueOf(type_); - return result == null ? caffe.Caffe.V1LayerParameter.LayerType.NONE : result; - } - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public Builder setType(caffe.Caffe.V1LayerParameter.LayerType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.V1LayerParameter.LayerType type = 5; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000020); - type_ = 0; - onChanged(); - return this; - } - - private java.util.List blobs_ = - java.util.Collections.emptyList(); - private void ensureBlobsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - blobs_ = new java.util.ArrayList(blobs_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; - - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public java.util.List getBlobsList() { - if (blobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(blobs_); - } else { - return blobsBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public int getBlobsCount() { - if (blobsBuilder_ == null) { - return blobs_.size(); - } else { - return blobsBuilder_.getCount(); - } - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProto getBlobs(int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); - } else { - return blobsBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - 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 = 6; - */ - 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 = 6; - */ - 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 = 6; - */ - 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 = 6; - */ - 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 = 6; - */ - 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 = 6; - */ - public Builder addAllBlobs( - java.lang.Iterable values) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blobs_); - onChanged(); - } else { - blobsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public Builder clearBlobs() { - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - blobsBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public Builder removeBlobs(int index) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - blobs_.remove(index); - onChanged(); - } else { - blobsBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProto.Builder getBlobsBuilder( - int index) { - return getBlobsFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); } else { - return blobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public java.util.List - getBlobsOrBuilderList() { - if (blobsBuilder_ != null) { - return blobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blobs_); - } - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { - return getBlobsFieldBuilder().addBuilder( - caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder( - int index) { - return getBlobsFieldBuilder().addBuilder( - index, caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 6; - */ - 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_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - blobs_ = null; - } - return blobsBuilder_; - } - - private com.google.protobuf.LazyStringList param_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureParamIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - param_ = new com.google.protobuf.LazyStringArrayList(param_); - bitField0_ |= 0x00000080; - } - } - /** - * repeated string param = 1001; - */ - public com.google.protobuf.ProtocolStringList - getParamList() { - return param_.getUnmodifiableView(); - } - /** - * repeated string param = 1001; - */ - public int getParamCount() { - return param_.size(); - } - /** - * repeated string param = 1001; - */ - public java.lang.String getParam(int index) { - return param_.get(index); - } - /** - * repeated string param = 1001; - */ - public com.google.protobuf.ByteString - getParamBytes(int index) { - return param_.getByteString(index); - } - /** - * repeated string param = 1001; - */ - public Builder setParam( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string param = 1001; - */ - public Builder addParam( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.add(value); - onChanged(); - return this; - } - /** - * repeated string param = 1001; - */ - public Builder addAllParam( - java.lang.Iterable values) { - ensureParamIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, param_); - onChanged(); - return this; - } - /** - * repeated string param = 1001; - */ - public Builder clearParam() { - param_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - * repeated string param = 1001; - */ - public Builder addParamBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParamIsMutable(); - param_.add(value); - onChanged(); - return this; - } - - private java.util.List blobShareMode_ = - java.util.Collections.emptyList(); - private void ensureBlobShareModeIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - blobShareMode_ = new java.util.ArrayList(blobShareMode_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public java.util.List getBlobShareModeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>(blobShareMode_, blobShareMode_converter_); - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public int getBlobShareModeCount() { - return blobShareMode_.size(); - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index) { - return blobShareMode_converter_.convert(blobShareMode_.get(index)); - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public Builder setBlobShareMode( - int index, caffe.Caffe.V1LayerParameter.DimCheckMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlobShareModeIsMutable(); - blobShareMode_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public Builder addBlobShareMode(caffe.Caffe.V1LayerParameter.DimCheckMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlobShareModeIsMutable(); - blobShareMode_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public Builder addAllBlobShareMode( - java.lang.Iterable values) { - ensureBlobShareModeIsMutable(); - for (caffe.Caffe.V1LayerParameter.DimCheckMode value : values) { - blobShareMode_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; - */ - public Builder clearBlobShareMode() { - blobShareMode_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - private java.util.List blobsLr_ = java.util.Collections.emptyList(); - private void ensureBlobsLrIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { - blobsLr_ = new java.util.ArrayList(blobsLr_); - bitField0_ |= 0x00000200; - } - } - /** - * repeated float blobs_lr = 7; - */ - public java.util.List - getBlobsLrList() { - return java.util.Collections.unmodifiableList(blobsLr_); - } - /** - * repeated float blobs_lr = 7; - */ - public int getBlobsLrCount() { - return blobsLr_.size(); - } - /** - * repeated float blobs_lr = 7; - */ - public float getBlobsLr(int index) { - return blobsLr_.get(index); - } - /** - * repeated float blobs_lr = 7; - */ - public Builder setBlobsLr( - int index, float value) { - ensureBlobsLrIsMutable(); - blobsLr_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 7; - */ - public Builder addBlobsLr(float value) { - ensureBlobsLrIsMutable(); - blobsLr_.add(value); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 7; - */ - public Builder addAllBlobsLr( - java.lang.Iterable values) { - ensureBlobsLrIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blobsLr_); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 7; - */ - public Builder clearBlobsLr() { - blobsLr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - - private java.util.List weightDecay_ = java.util.Collections.emptyList(); - private void ensureWeightDecayIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { - weightDecay_ = new java.util.ArrayList(weightDecay_); - bitField0_ |= 0x00000400; - } - } - /** - * repeated float weight_decay = 8; - */ - public java.util.List - getWeightDecayList() { - return java.util.Collections.unmodifiableList(weightDecay_); - } - /** - * repeated float weight_decay = 8; - */ - public int getWeightDecayCount() { - return weightDecay_.size(); - } - /** - * repeated float weight_decay = 8; - */ - public float getWeightDecay(int index) { - return weightDecay_.get(index); - } - /** - * repeated float weight_decay = 8; - */ - public Builder setWeightDecay( - int index, float value) { - ensureWeightDecayIsMutable(); - weightDecay_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 8; - */ - public Builder addWeightDecay(float value) { - ensureWeightDecayIsMutable(); - weightDecay_.add(value); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 8; - */ - public Builder addAllWeightDecay( - java.lang.Iterable values) { - ensureWeightDecayIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, weightDecay_); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 8; - */ - public Builder clearWeightDecay() { - weightDecay_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - - private java.util.List lossWeight_ = java.util.Collections.emptyList(); - private void ensureLossWeightIsMutable() { - if (!((bitField0_ & 0x00000800) == 0x00000800)) { - lossWeight_ = new java.util.ArrayList(lossWeight_); - bitField0_ |= 0x00000800; - } - } - /** - * repeated float loss_weight = 35; - */ - public java.util.List - getLossWeightList() { - return java.util.Collections.unmodifiableList(lossWeight_); - } - /** - * repeated float loss_weight = 35; - */ - public int getLossWeightCount() { - return lossWeight_.size(); - } - /** - * repeated float loss_weight = 35; - */ - public float getLossWeight(int index) { - return lossWeight_.get(index); - } - /** - * repeated float loss_weight = 35; - */ - public Builder setLossWeight( - int index, float value) { - ensureLossWeightIsMutable(); - lossWeight_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float loss_weight = 35; - */ - public Builder addLossWeight(float value) { - ensureLossWeightIsMutable(); - lossWeight_.add(value); - onChanged(); - return this; - } - /** - * repeated float loss_weight = 35; - */ - public Builder addAllLossWeight( - java.lang.Iterable values) { - ensureLossWeightIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lossWeight_); - onChanged(); - return this; - } - /** - * repeated float loss_weight = 35; - */ - public Builder clearLossWeight() { - lossWeight_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - return this; - } - - private caffe.Caffe.AccuracyParameter accuracyParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> accuracyParamBuilder_; - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public boolean hasAccuracyParam() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public caffe.Caffe.AccuracyParameter getAccuracyParam() { - if (accuracyParamBuilder_ == null) { - return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } else { - return accuracyParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public Builder setAccuracyParam(caffe.Caffe.AccuracyParameter value) { - if (accuracyParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accuracyParam_ = value; - onChanged(); - } else { - accuracyParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public Builder setAccuracyParam( - caffe.Caffe.AccuracyParameter.Builder builderForValue) { - if (accuracyParamBuilder_ == null) { - accuracyParam_ = builderForValue.build(); - onChanged(); - } else { - accuracyParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public Builder mergeAccuracyParam(caffe.Caffe.AccuracyParameter value) { - if (accuracyParamBuilder_ == null) { - if (((bitField0_ & 0x00001000) == 0x00001000) && - accuracyParam_ != null && - accuracyParam_ != caffe.Caffe.AccuracyParameter.getDefaultInstance()) { - accuracyParam_ = - caffe.Caffe.AccuracyParameter.newBuilder(accuracyParam_).mergeFrom(value).buildPartial(); - } else { - accuracyParam_ = value; - } - onChanged(); - } else { - accuracyParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public Builder clearAccuracyParam() { - if (accuracyParamBuilder_ == null) { - accuracyParam_ = null; - onChanged(); - } else { - accuracyParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public caffe.Caffe.AccuracyParameter.Builder getAccuracyParamBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getAccuracyParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - public caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder() { - if (accuracyParamBuilder_ != null) { - return accuracyParamBuilder_.getMessageOrBuilder(); - } else { - return accuracyParam_ == null ? - caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; - } - } - /** - * optional .caffe.AccuracyParameter accuracy_param = 27; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> - getAccuracyParamFieldBuilder() { - if (accuracyParamBuilder_ == null) { - accuracyParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder>( - getAccuracyParam(), - getParentForChildren(), - isClean()); - accuracyParam_ = null; - } - return accuracyParamBuilder_; - } - - private caffe.Caffe.ArgMaxParameter argmaxParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> argmaxParamBuilder_; - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public boolean hasArgmaxParam() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public caffe.Caffe.ArgMaxParameter getArgmaxParam() { - if (argmaxParamBuilder_ == null) { - return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } else { - return argmaxParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public Builder setArgmaxParam(caffe.Caffe.ArgMaxParameter value) { - if (argmaxParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - argmaxParam_ = value; - onChanged(); - } else { - argmaxParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public Builder setArgmaxParam( - caffe.Caffe.ArgMaxParameter.Builder builderForValue) { - if (argmaxParamBuilder_ == null) { - argmaxParam_ = builderForValue.build(); - onChanged(); - } else { - argmaxParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public Builder mergeArgmaxParam(caffe.Caffe.ArgMaxParameter value) { - if (argmaxParamBuilder_ == null) { - if (((bitField0_ & 0x00002000) == 0x00002000) && - argmaxParam_ != null && - argmaxParam_ != caffe.Caffe.ArgMaxParameter.getDefaultInstance()) { - argmaxParam_ = - caffe.Caffe.ArgMaxParameter.newBuilder(argmaxParam_).mergeFrom(value).buildPartial(); - } else { - argmaxParam_ = value; - } - onChanged(); - } else { - argmaxParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00002000; - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public Builder clearArgmaxParam() { - if (argmaxParamBuilder_ == null) { - argmaxParam_ = null; - onChanged(); - } else { - argmaxParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00002000); - return this; - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public caffe.Caffe.ArgMaxParameter.Builder getArgmaxParamBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return getArgmaxParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { - if (argmaxParamBuilder_ != null) { - return argmaxParamBuilder_.getMessageOrBuilder(); - } else { - return argmaxParam_ == null ? - caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; - } - } - /** - * optional .caffe.ArgMaxParameter argmax_param = 23; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> - getArgmaxParamFieldBuilder() { - if (argmaxParamBuilder_ == null) { - argmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder>( - getArgmaxParam(), - getParentForChildren(), - isClean()); - argmaxParam_ = null; - } - return argmaxParamBuilder_; - } - - private caffe.Caffe.ConcatParameter concatParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> concatParamBuilder_; - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public boolean hasConcatParam() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public caffe.Caffe.ConcatParameter getConcatParam() { - if (concatParamBuilder_ == null) { - return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } else { - return concatParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public Builder setConcatParam(caffe.Caffe.ConcatParameter value) { - if (concatParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - concatParam_ = value; - onChanged(); - } else { - concatParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public Builder setConcatParam( - caffe.Caffe.ConcatParameter.Builder builderForValue) { - if (concatParamBuilder_ == null) { - concatParam_ = builderForValue.build(); - onChanged(); - } else { - concatParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public Builder mergeConcatParam(caffe.Caffe.ConcatParameter value) { - if (concatParamBuilder_ == null) { - if (((bitField0_ & 0x00004000) == 0x00004000) && - concatParam_ != null && - concatParam_ != caffe.Caffe.ConcatParameter.getDefaultInstance()) { - concatParam_ = - caffe.Caffe.ConcatParameter.newBuilder(concatParam_).mergeFrom(value).buildPartial(); - } else { - concatParam_ = value; - } - onChanged(); - } else { - concatParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00004000; - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public Builder clearConcatParam() { - if (concatParamBuilder_ == null) { - concatParam_ = null; - onChanged(); - } else { - concatParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00004000); - return this; - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public caffe.Caffe.ConcatParameter.Builder getConcatParamBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return getConcatParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { - if (concatParamBuilder_ != null) { - return concatParamBuilder_.getMessageOrBuilder(); - } else { - return concatParam_ == null ? - caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; - } - } - /** - * optional .caffe.ConcatParameter concat_param = 9; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> - getConcatParamFieldBuilder() { - if (concatParamBuilder_ == null) { - concatParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder>( - getConcatParam(), - getParentForChildren(), - isClean()); - concatParam_ = null; - } - return concatParamBuilder_; - } - - private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> contrastiveLossParamBuilder_; - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public boolean hasContrastiveLossParam() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { - if (contrastiveLossParamBuilder_ == null) { - return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } else { - return contrastiveLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public Builder setContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { - if (contrastiveLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contrastiveLossParam_ = value; - onChanged(); - } else { - contrastiveLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public Builder setContrastiveLossParam( - caffe.Caffe.ContrastiveLossParameter.Builder builderForValue) { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = builderForValue.build(); - onChanged(); - } else { - contrastiveLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public Builder mergeContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { - if (contrastiveLossParamBuilder_ == null) { - if (((bitField0_ & 0x00008000) == 0x00008000) && - contrastiveLossParam_ != null && - contrastiveLossParam_ != caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) { - contrastiveLossParam_ = - caffe.Caffe.ContrastiveLossParameter.newBuilder(contrastiveLossParam_).mergeFrom(value).buildPartial(); - } else { - contrastiveLossParam_ = value; - } - onChanged(); - } else { - contrastiveLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00008000; - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public Builder clearContrastiveLossParam() { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParam_ = null; - onChanged(); - } else { - contrastiveLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00008000); - return this; - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public caffe.Caffe.ContrastiveLossParameter.Builder getContrastiveLossParamBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return getContrastiveLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { - if (contrastiveLossParamBuilder_ != null) { - return contrastiveLossParamBuilder_.getMessageOrBuilder(); - } else { - return contrastiveLossParam_ == null ? - caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; - } - } - /** - * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> - getContrastiveLossParamFieldBuilder() { - if (contrastiveLossParamBuilder_ == null) { - contrastiveLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder>( - getContrastiveLossParam(), - getParentForChildren(), - isClean()); - contrastiveLossParam_ = null; - } - return contrastiveLossParamBuilder_; - } - - private caffe.Caffe.ConvolutionParameter convolutionParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> convolutionParamBuilder_; - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public boolean hasConvolutionParam() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public caffe.Caffe.ConvolutionParameter getConvolutionParam() { - if (convolutionParamBuilder_ == null) { - return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } else { - return convolutionParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public Builder setConvolutionParam(caffe.Caffe.ConvolutionParameter value) { - if (convolutionParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - convolutionParam_ = value; - onChanged(); - } else { - convolutionParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public Builder setConvolutionParam( - caffe.Caffe.ConvolutionParameter.Builder builderForValue) { - if (convolutionParamBuilder_ == null) { - convolutionParam_ = builderForValue.build(); - onChanged(); - } else { - convolutionParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public Builder mergeConvolutionParam(caffe.Caffe.ConvolutionParameter value) { - if (convolutionParamBuilder_ == null) { - if (((bitField0_ & 0x00010000) == 0x00010000) && - convolutionParam_ != null && - convolutionParam_ != caffe.Caffe.ConvolutionParameter.getDefaultInstance()) { - convolutionParam_ = - caffe.Caffe.ConvolutionParameter.newBuilder(convolutionParam_).mergeFrom(value).buildPartial(); - } else { - convolutionParam_ = value; - } - onChanged(); - } else { - convolutionParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00010000; - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public Builder clearConvolutionParam() { - if (convolutionParamBuilder_ == null) { - convolutionParam_ = null; - onChanged(); - } else { - convolutionParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00010000); - return this; - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public caffe.Caffe.ConvolutionParameter.Builder getConvolutionParamBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return getConvolutionParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { - if (convolutionParamBuilder_ != null) { - return convolutionParamBuilder_.getMessageOrBuilder(); - } else { - return convolutionParam_ == null ? - caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; - } - } - /** - * optional .caffe.ConvolutionParameter convolution_param = 10; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> - getConvolutionParamFieldBuilder() { - if (convolutionParamBuilder_ == null) { - convolutionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder>( - getConvolutionParam(), - getParentForChildren(), - isClean()); - convolutionParam_ = null; - } - return convolutionParamBuilder_; - } - - private caffe.Caffe.DataParameter dataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> dataParamBuilder_; - /** - * optional .caffe.DataParameter data_param = 11; - */ - public boolean hasDataParam() { - return ((bitField0_ & 0x00020000) == 0x00020000); - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public caffe.Caffe.DataParameter getDataParam() { - if (dataParamBuilder_ == null) { - return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } else { - return dataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public Builder setDataParam(caffe.Caffe.DataParameter value) { - if (dataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataParam_ = value; - onChanged(); - } else { - dataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public Builder setDataParam( - caffe.Caffe.DataParameter.Builder builderForValue) { - if (dataParamBuilder_ == null) { - dataParam_ = builderForValue.build(); - onChanged(); - } else { - dataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public Builder mergeDataParam(caffe.Caffe.DataParameter value) { - if (dataParamBuilder_ == null) { - if (((bitField0_ & 0x00020000) == 0x00020000) && - dataParam_ != null && - dataParam_ != caffe.Caffe.DataParameter.getDefaultInstance()) { - dataParam_ = - caffe.Caffe.DataParameter.newBuilder(dataParam_).mergeFrom(value).buildPartial(); - } else { - dataParam_ = value; - } - onChanged(); - } else { - dataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - return this; - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public Builder clearDataParam() { - if (dataParamBuilder_ == null) { - dataParam_ = null; - onChanged(); - } else { - dataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00020000); - return this; - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public caffe.Caffe.DataParameter.Builder getDataParamBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { - if (dataParamBuilder_ != null) { - return dataParamBuilder_.getMessageOrBuilder(); - } else { - return dataParam_ == null ? - caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; - } - } - /** - * optional .caffe.DataParameter data_param = 11; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> - getDataParamFieldBuilder() { - if (dataParamBuilder_ == null) { - dataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder>( - getDataParam(), - getParentForChildren(), - isClean()); - dataParam_ = null; - } - return dataParamBuilder_; - } - - private caffe.Caffe.DropoutParameter dropoutParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> dropoutParamBuilder_; - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public boolean hasDropoutParam() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public caffe.Caffe.DropoutParameter getDropoutParam() { - if (dropoutParamBuilder_ == null) { - return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } else { - return dropoutParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public Builder setDropoutParam(caffe.Caffe.DropoutParameter value) { - if (dropoutParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dropoutParam_ = value; - onChanged(); - } else { - dropoutParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public Builder setDropoutParam( - caffe.Caffe.DropoutParameter.Builder builderForValue) { - if (dropoutParamBuilder_ == null) { - dropoutParam_ = builderForValue.build(); - onChanged(); - } else { - dropoutParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public Builder mergeDropoutParam(caffe.Caffe.DropoutParameter value) { - if (dropoutParamBuilder_ == null) { - if (((bitField0_ & 0x00040000) == 0x00040000) && - dropoutParam_ != null && - dropoutParam_ != caffe.Caffe.DropoutParameter.getDefaultInstance()) { - dropoutParam_ = - caffe.Caffe.DropoutParameter.newBuilder(dropoutParam_).mergeFrom(value).buildPartial(); - } else { - dropoutParam_ = value; - } - onChanged(); - } else { - dropoutParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00040000; - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public Builder clearDropoutParam() { - if (dropoutParamBuilder_ == null) { - dropoutParam_ = null; - onChanged(); - } else { - dropoutParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00040000); - return this; - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public caffe.Caffe.DropoutParameter.Builder getDropoutParamBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return getDropoutParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { - if (dropoutParamBuilder_ != null) { - return dropoutParamBuilder_.getMessageOrBuilder(); - } else { - return dropoutParam_ == null ? - caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; - } - } - /** - * optional .caffe.DropoutParameter dropout_param = 12; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> - getDropoutParamFieldBuilder() { - if (dropoutParamBuilder_ == null) { - dropoutParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder>( - getDropoutParam(), - getParentForChildren(), - isClean()); - dropoutParam_ = null; - } - return dropoutParamBuilder_; - } - - private caffe.Caffe.DummyDataParameter dummyDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> dummyDataParamBuilder_; - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public boolean hasDummyDataParam() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public caffe.Caffe.DummyDataParameter getDummyDataParam() { - if (dummyDataParamBuilder_ == null) { - return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } else { - return dummyDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public Builder setDummyDataParam(caffe.Caffe.DummyDataParameter value) { - if (dummyDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dummyDataParam_ = value; - onChanged(); - } else { - dummyDataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public Builder setDummyDataParam( - caffe.Caffe.DummyDataParameter.Builder builderForValue) { - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = builderForValue.build(); - onChanged(); - } else { - dummyDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public Builder mergeDummyDataParam(caffe.Caffe.DummyDataParameter value) { - if (dummyDataParamBuilder_ == null) { - if (((bitField0_ & 0x00080000) == 0x00080000) && - dummyDataParam_ != null && - dummyDataParam_ != caffe.Caffe.DummyDataParameter.getDefaultInstance()) { - dummyDataParam_ = - caffe.Caffe.DummyDataParameter.newBuilder(dummyDataParam_).mergeFrom(value).buildPartial(); - } else { - dummyDataParam_ = value; - } - onChanged(); - } else { - dummyDataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00080000; - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public Builder clearDummyDataParam() { - if (dummyDataParamBuilder_ == null) { - dummyDataParam_ = null; - onChanged(); - } else { - dummyDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00080000); - return this; - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public caffe.Caffe.DummyDataParameter.Builder getDummyDataParamBuilder() { - bitField0_ |= 0x00080000; - onChanged(); - return getDummyDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { - if (dummyDataParamBuilder_ != null) { - return dummyDataParamBuilder_.getMessageOrBuilder(); - } else { - return dummyDataParam_ == null ? - caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; - } - } - /** - * optional .caffe.DummyDataParameter dummy_data_param = 26; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> - getDummyDataParamFieldBuilder() { - if (dummyDataParamBuilder_ == null) { - dummyDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder>( - getDummyDataParam(), - getParentForChildren(), - isClean()); - dummyDataParam_ = null; - } - return dummyDataParamBuilder_; - } - - private caffe.Caffe.EltwiseParameter eltwiseParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> eltwiseParamBuilder_; - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public boolean hasEltwiseParam() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public caffe.Caffe.EltwiseParameter getEltwiseParam() { - if (eltwiseParamBuilder_ == null) { - return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } else { - return eltwiseParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public Builder setEltwiseParam(caffe.Caffe.EltwiseParameter value) { - if (eltwiseParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eltwiseParam_ = value; - onChanged(); - } else { - eltwiseParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public Builder setEltwiseParam( - caffe.Caffe.EltwiseParameter.Builder builderForValue) { - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = builderForValue.build(); - onChanged(); - } else { - eltwiseParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public Builder mergeEltwiseParam(caffe.Caffe.EltwiseParameter value) { - if (eltwiseParamBuilder_ == null) { - if (((bitField0_ & 0x00100000) == 0x00100000) && - eltwiseParam_ != null && - eltwiseParam_ != caffe.Caffe.EltwiseParameter.getDefaultInstance()) { - eltwiseParam_ = - caffe.Caffe.EltwiseParameter.newBuilder(eltwiseParam_).mergeFrom(value).buildPartial(); - } else { - eltwiseParam_ = value; - } - onChanged(); - } else { - eltwiseParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00100000; - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public Builder clearEltwiseParam() { - if (eltwiseParamBuilder_ == null) { - eltwiseParam_ = null; - onChanged(); - } else { - eltwiseParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00100000); - return this; - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public caffe.Caffe.EltwiseParameter.Builder getEltwiseParamBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return getEltwiseParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { - if (eltwiseParamBuilder_ != null) { - return eltwiseParamBuilder_.getMessageOrBuilder(); - } else { - return eltwiseParam_ == null ? - caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; - } - } - /** - * optional .caffe.EltwiseParameter eltwise_param = 24; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> - getEltwiseParamFieldBuilder() { - if (eltwiseParamBuilder_ == null) { - eltwiseParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder>( - getEltwiseParam(), - getParentForChildren(), - isClean()); - eltwiseParam_ = null; - } - return eltwiseParamBuilder_; - } - - private caffe.Caffe.ExpParameter expParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> expParamBuilder_; - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public boolean hasExpParam() { - return ((bitField0_ & 0x00200000) == 0x00200000); - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public caffe.Caffe.ExpParameter getExpParam() { - if (expParamBuilder_ == null) { - return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } else { - return expParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public Builder setExpParam(caffe.Caffe.ExpParameter value) { - if (expParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expParam_ = value; - onChanged(); - } else { - expParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public Builder setExpParam( - caffe.Caffe.ExpParameter.Builder builderForValue) { - if (expParamBuilder_ == null) { - expParam_ = builderForValue.build(); - onChanged(); - } else { - expParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public Builder mergeExpParam(caffe.Caffe.ExpParameter value) { - if (expParamBuilder_ == null) { - if (((bitField0_ & 0x00200000) == 0x00200000) && - expParam_ != null && - expParam_ != caffe.Caffe.ExpParameter.getDefaultInstance()) { - expParam_ = - caffe.Caffe.ExpParameter.newBuilder(expParam_).mergeFrom(value).buildPartial(); - } else { - expParam_ = value; - } - onChanged(); - } else { - expParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00200000; - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public Builder clearExpParam() { - if (expParamBuilder_ == null) { - expParam_ = null; - onChanged(); - } else { - expParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00200000); - return this; - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public caffe.Caffe.ExpParameter.Builder getExpParamBuilder() { - bitField0_ |= 0x00200000; - onChanged(); - return getExpParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { - if (expParamBuilder_ != null) { - return expParamBuilder_.getMessageOrBuilder(); - } else { - return expParam_ == null ? - caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; - } - } - /** - * optional .caffe.ExpParameter exp_param = 41; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> - getExpParamFieldBuilder() { - if (expParamBuilder_ == null) { - expParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder>( - getExpParam(), - getParentForChildren(), - isClean()); - expParam_ = null; - } - return expParamBuilder_; - } - - private caffe.Caffe.HDF5DataParameter hdf5DataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> hdf5DataParamBuilder_; - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public boolean hasHdf5DataParam() { - return ((bitField0_ & 0x00400000) == 0x00400000); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { - if (hdf5DataParamBuilder_ == null) { - return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } else { - return hdf5DataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public Builder setHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { - if (hdf5DataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hdf5DataParam_ = value; - onChanged(); - } else { - hdf5DataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public Builder setHdf5DataParam( - caffe.Caffe.HDF5DataParameter.Builder builderForValue) { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = builderForValue.build(); - onChanged(); - } else { - hdf5DataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public Builder mergeHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { - if (hdf5DataParamBuilder_ == null) { - if (((bitField0_ & 0x00400000) == 0x00400000) && - hdf5DataParam_ != null && - hdf5DataParam_ != caffe.Caffe.HDF5DataParameter.getDefaultInstance()) { - hdf5DataParam_ = - caffe.Caffe.HDF5DataParameter.newBuilder(hdf5DataParam_).mergeFrom(value).buildPartial(); - } else { - hdf5DataParam_ = value; - } - onChanged(); - } else { - hdf5DataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00400000; - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public Builder clearHdf5DataParam() { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParam_ = null; - onChanged(); - } else { - hdf5DataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00400000); - return this; - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public caffe.Caffe.HDF5DataParameter.Builder getHdf5DataParamBuilder() { - bitField0_ |= 0x00400000; - onChanged(); - return getHdf5DataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { - if (hdf5DataParamBuilder_ != null) { - return hdf5DataParamBuilder_.getMessageOrBuilder(); - } else { - return hdf5DataParam_ == null ? - caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; - } - } - /** - * optional .caffe.HDF5DataParameter hdf5_data_param = 13; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> - getHdf5DataParamFieldBuilder() { - if (hdf5DataParamBuilder_ == null) { - hdf5DataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder>( - getHdf5DataParam(), - getParentForChildren(), - isClean()); - hdf5DataParam_ = null; - } - return hdf5DataParamBuilder_; - } - - private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public boolean hasHdf5OutputParam() { - return ((bitField0_ & 0x00800000) == 0x00800000); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } else { - return hdf5OutputParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hdf5OutputParam_ = value; - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(value); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public Builder setHdf5OutputParam( - caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = builderForValue.build(); - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (((bitField0_ & 0x00800000) == 0x00800000) && - hdf5OutputParam_ != null && - hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { - hdf5OutputParam_ = - caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); - } else { - hdf5OutputParam_ = value; - } - onChanged(); - } else { - hdf5OutputParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00800000; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public Builder clearHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - onChanged(); - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00800000); - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { - bitField0_ |= 0x00800000; - onChanged(); - return getHdf5OutputParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - if (hdf5OutputParamBuilder_ != null) { - return hdf5OutputParamBuilder_.getMessageOrBuilder(); - } else { - return hdf5OutputParam_ == null ? - caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> - getHdf5OutputParamFieldBuilder() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( - getHdf5OutputParam(), - getParentForChildren(), - isClean()); - hdf5OutputParam_ = null; - } - return hdf5OutputParamBuilder_; - } - - private caffe.Caffe.HingeLossParameter hingeLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> hingeLossParamBuilder_; - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public boolean hasHingeLossParam() { - return ((bitField0_ & 0x01000000) == 0x01000000); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public caffe.Caffe.HingeLossParameter getHingeLossParam() { - if (hingeLossParamBuilder_ == null) { - return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } else { - return hingeLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public Builder setHingeLossParam(caffe.Caffe.HingeLossParameter value) { - if (hingeLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hingeLossParam_ = value; - onChanged(); - } else { - hingeLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public Builder setHingeLossParam( - caffe.Caffe.HingeLossParameter.Builder builderForValue) { - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = builderForValue.build(); - onChanged(); - } else { - hingeLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public Builder mergeHingeLossParam(caffe.Caffe.HingeLossParameter value) { - if (hingeLossParamBuilder_ == null) { - if (((bitField0_ & 0x01000000) == 0x01000000) && - hingeLossParam_ != null && - hingeLossParam_ != caffe.Caffe.HingeLossParameter.getDefaultInstance()) { - hingeLossParam_ = - caffe.Caffe.HingeLossParameter.newBuilder(hingeLossParam_).mergeFrom(value).buildPartial(); - } else { - hingeLossParam_ = value; - } - onChanged(); - } else { - hingeLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x01000000; - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public Builder clearHingeLossParam() { - if (hingeLossParamBuilder_ == null) { - hingeLossParam_ = null; - onChanged(); - } else { - hingeLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x01000000); - return this; - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public caffe.Caffe.HingeLossParameter.Builder getHingeLossParamBuilder() { - bitField0_ |= 0x01000000; - onChanged(); - return getHingeLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { - if (hingeLossParamBuilder_ != null) { - return hingeLossParamBuilder_.getMessageOrBuilder(); - } else { - return hingeLossParam_ == null ? - caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; - } - } - /** - * optional .caffe.HingeLossParameter hinge_loss_param = 29; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> - getHingeLossParamFieldBuilder() { - if (hingeLossParamBuilder_ == null) { - hingeLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder>( - getHingeLossParam(), - getParentForChildren(), - isClean()); - hingeLossParam_ = null; - } - return hingeLossParamBuilder_; - } - - private caffe.Caffe.ImageDataParameter imageDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> imageDataParamBuilder_; - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public boolean hasImageDataParam() { - return ((bitField0_ & 0x02000000) == 0x02000000); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public caffe.Caffe.ImageDataParameter getImageDataParam() { - if (imageDataParamBuilder_ == null) { - return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } else { - return imageDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public Builder setImageDataParam(caffe.Caffe.ImageDataParameter value) { - if (imageDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageDataParam_ = value; - onChanged(); - } else { - imageDataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public Builder setImageDataParam( - caffe.Caffe.ImageDataParameter.Builder builderForValue) { - if (imageDataParamBuilder_ == null) { - imageDataParam_ = builderForValue.build(); - onChanged(); - } else { - imageDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public Builder mergeImageDataParam(caffe.Caffe.ImageDataParameter value) { - if (imageDataParamBuilder_ == null) { - if (((bitField0_ & 0x02000000) == 0x02000000) && - imageDataParam_ != null && - imageDataParam_ != caffe.Caffe.ImageDataParameter.getDefaultInstance()) { - imageDataParam_ = - caffe.Caffe.ImageDataParameter.newBuilder(imageDataParam_).mergeFrom(value).buildPartial(); - } else { - imageDataParam_ = value; - } - onChanged(); - } else { - imageDataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x02000000; - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public Builder clearImageDataParam() { - if (imageDataParamBuilder_ == null) { - imageDataParam_ = null; - onChanged(); - } else { - imageDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x02000000); - return this; - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public caffe.Caffe.ImageDataParameter.Builder getImageDataParamBuilder() { - bitField0_ |= 0x02000000; - onChanged(); - return getImageDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { - if (imageDataParamBuilder_ != null) { - return imageDataParamBuilder_.getMessageOrBuilder(); - } else { - return imageDataParam_ == null ? - caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; - } - } - /** - * optional .caffe.ImageDataParameter image_data_param = 15; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> - getImageDataParamFieldBuilder() { - if (imageDataParamBuilder_ == null) { - imageDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder>( - getImageDataParam(), - getParentForChildren(), - isClean()); - imageDataParam_ = null; - } - return imageDataParamBuilder_; - } - - private caffe.Caffe.InfogainLossParameter infogainLossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> infogainLossParamBuilder_; - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public boolean hasInfogainLossParam() { - return ((bitField0_ & 0x04000000) == 0x04000000); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { - if (infogainLossParamBuilder_ == null) { - return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } else { - return infogainLossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public Builder setInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { - if (infogainLossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infogainLossParam_ = value; - onChanged(); - } else { - infogainLossParamBuilder_.setMessage(value); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public Builder setInfogainLossParam( - caffe.Caffe.InfogainLossParameter.Builder builderForValue) { - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = builderForValue.build(); - onChanged(); - } else { - infogainLossParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public Builder mergeInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { - if (infogainLossParamBuilder_ == null) { - if (((bitField0_ & 0x04000000) == 0x04000000) && - infogainLossParam_ != null && - infogainLossParam_ != caffe.Caffe.InfogainLossParameter.getDefaultInstance()) { - infogainLossParam_ = - caffe.Caffe.InfogainLossParameter.newBuilder(infogainLossParam_).mergeFrom(value).buildPartial(); - } else { - infogainLossParam_ = value; - } - onChanged(); - } else { - infogainLossParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x04000000; - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public Builder clearInfogainLossParam() { - if (infogainLossParamBuilder_ == null) { - infogainLossParam_ = null; - onChanged(); - } else { - infogainLossParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x04000000); - return this; - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public caffe.Caffe.InfogainLossParameter.Builder getInfogainLossParamBuilder() { - bitField0_ |= 0x04000000; - onChanged(); - return getInfogainLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { - if (infogainLossParamBuilder_ != null) { - return infogainLossParamBuilder_.getMessageOrBuilder(); - } else { - return infogainLossParam_ == null ? - caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; - } - } - /** - * optional .caffe.InfogainLossParameter infogain_loss_param = 16; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> - getInfogainLossParamFieldBuilder() { - if (infogainLossParamBuilder_ == null) { - infogainLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder>( - getInfogainLossParam(), - getParentForChildren(), - isClean()); - infogainLossParam_ = null; - } - return infogainLossParamBuilder_; - } - - private caffe.Caffe.InnerProductParameter innerProductParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> innerProductParamBuilder_; - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public boolean hasInnerProductParam() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public caffe.Caffe.InnerProductParameter getInnerProductParam() { - if (innerProductParamBuilder_ == null) { - return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } else { - return innerProductParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public Builder setInnerProductParam(caffe.Caffe.InnerProductParameter value) { - if (innerProductParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - innerProductParam_ = value; - onChanged(); - } else { - innerProductParamBuilder_.setMessage(value); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public Builder setInnerProductParam( - caffe.Caffe.InnerProductParameter.Builder builderForValue) { - if (innerProductParamBuilder_ == null) { - innerProductParam_ = builderForValue.build(); - onChanged(); - } else { - innerProductParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public Builder mergeInnerProductParam(caffe.Caffe.InnerProductParameter value) { - if (innerProductParamBuilder_ == null) { - if (((bitField0_ & 0x08000000) == 0x08000000) && - innerProductParam_ != null && - innerProductParam_ != caffe.Caffe.InnerProductParameter.getDefaultInstance()) { - innerProductParam_ = - caffe.Caffe.InnerProductParameter.newBuilder(innerProductParam_).mergeFrom(value).buildPartial(); - } else { - innerProductParam_ = value; - } - onChanged(); - } else { - innerProductParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x08000000; - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public Builder clearInnerProductParam() { - if (innerProductParamBuilder_ == null) { - innerProductParam_ = null; - onChanged(); - } else { - innerProductParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x08000000); - return this; - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public caffe.Caffe.InnerProductParameter.Builder getInnerProductParamBuilder() { - bitField0_ |= 0x08000000; - onChanged(); - return getInnerProductParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { - if (innerProductParamBuilder_ != null) { - return innerProductParamBuilder_.getMessageOrBuilder(); - } else { - return innerProductParam_ == null ? - caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; - } - } - /** - * optional .caffe.InnerProductParameter inner_product_param = 17; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> - getInnerProductParamFieldBuilder() { - if (innerProductParamBuilder_ == null) { - innerProductParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder>( - getInnerProductParam(), - getParentForChildren(), - isClean()); - innerProductParam_ = null; - } - return innerProductParamBuilder_; - } - - private caffe.Caffe.LRNParameter lrnParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> lrnParamBuilder_; - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public boolean hasLrnParam() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public caffe.Caffe.LRNParameter getLrnParam() { - if (lrnParamBuilder_ == null) { - return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } else { - return lrnParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public Builder setLrnParam(caffe.Caffe.LRNParameter value) { - if (lrnParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lrnParam_ = value; - onChanged(); - } else { - lrnParamBuilder_.setMessage(value); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public Builder setLrnParam( - caffe.Caffe.LRNParameter.Builder builderForValue) { - if (lrnParamBuilder_ == null) { - lrnParam_ = builderForValue.build(); - onChanged(); - } else { - lrnParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public Builder mergeLrnParam(caffe.Caffe.LRNParameter value) { - if (lrnParamBuilder_ == null) { - if (((bitField0_ & 0x10000000) == 0x10000000) && - lrnParam_ != null && - lrnParam_ != caffe.Caffe.LRNParameter.getDefaultInstance()) { - lrnParam_ = - caffe.Caffe.LRNParameter.newBuilder(lrnParam_).mergeFrom(value).buildPartial(); - } else { - lrnParam_ = value; - } - onChanged(); - } else { - lrnParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x10000000; - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public Builder clearLrnParam() { - if (lrnParamBuilder_ == null) { - lrnParam_ = null; - onChanged(); - } else { - lrnParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x10000000); - return this; - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public caffe.Caffe.LRNParameter.Builder getLrnParamBuilder() { - bitField0_ |= 0x10000000; - onChanged(); - return getLrnParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { - if (lrnParamBuilder_ != null) { - return lrnParamBuilder_.getMessageOrBuilder(); - } else { - return lrnParam_ == null ? - caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; - } - } - /** - * optional .caffe.LRNParameter lrn_param = 18; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> - getLrnParamFieldBuilder() { - if (lrnParamBuilder_ == null) { - lrnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder>( - getLrnParam(), - getParentForChildren(), - isClean()); - lrnParam_ = null; - } - return lrnParamBuilder_; - } - - private caffe.Caffe.MemoryDataParameter memoryDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> memoryDataParamBuilder_; - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public boolean hasMemoryDataParam() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { - if (memoryDataParamBuilder_ == null) { - return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } else { - return memoryDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public Builder setMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { - if (memoryDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - memoryDataParam_ = value; - onChanged(); - } else { - memoryDataParamBuilder_.setMessage(value); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public Builder setMemoryDataParam( - caffe.Caffe.MemoryDataParameter.Builder builderForValue) { - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = builderForValue.build(); - onChanged(); - } else { - memoryDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public Builder mergeMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { - if (memoryDataParamBuilder_ == null) { - if (((bitField0_ & 0x20000000) == 0x20000000) && - memoryDataParam_ != null && - memoryDataParam_ != caffe.Caffe.MemoryDataParameter.getDefaultInstance()) { - memoryDataParam_ = - caffe.Caffe.MemoryDataParameter.newBuilder(memoryDataParam_).mergeFrom(value).buildPartial(); - } else { - memoryDataParam_ = value; - } - onChanged(); - } else { - memoryDataParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x20000000; - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public Builder clearMemoryDataParam() { - if (memoryDataParamBuilder_ == null) { - memoryDataParam_ = null; - onChanged(); - } else { - memoryDataParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x20000000); - return this; - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public caffe.Caffe.MemoryDataParameter.Builder getMemoryDataParamBuilder() { - bitField0_ |= 0x20000000; - onChanged(); - return getMemoryDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { - if (memoryDataParamBuilder_ != null) { - return memoryDataParamBuilder_.getMessageOrBuilder(); - } else { - return memoryDataParam_ == null ? - caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; - } - } - /** - * optional .caffe.MemoryDataParameter memory_data_param = 22; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> - getMemoryDataParamFieldBuilder() { - if (memoryDataParamBuilder_ == null) { - memoryDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder>( - getMemoryDataParam(), - getParentForChildren(), - isClean()); - memoryDataParam_ = null; - } - return memoryDataParamBuilder_; - } - - private caffe.Caffe.MVNParameter mvnParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> mvnParamBuilder_; - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public boolean hasMvnParam() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public caffe.Caffe.MVNParameter getMvnParam() { - if (mvnParamBuilder_ == null) { - return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } else { - return mvnParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public Builder setMvnParam(caffe.Caffe.MVNParameter value) { - if (mvnParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mvnParam_ = value; - onChanged(); - } else { - mvnParamBuilder_.setMessage(value); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public Builder setMvnParam( - caffe.Caffe.MVNParameter.Builder builderForValue) { - if (mvnParamBuilder_ == null) { - mvnParam_ = builderForValue.build(); - onChanged(); - } else { - mvnParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public Builder mergeMvnParam(caffe.Caffe.MVNParameter value) { - if (mvnParamBuilder_ == null) { - if (((bitField0_ & 0x40000000) == 0x40000000) && - mvnParam_ != null && - mvnParam_ != caffe.Caffe.MVNParameter.getDefaultInstance()) { - mvnParam_ = - caffe.Caffe.MVNParameter.newBuilder(mvnParam_).mergeFrom(value).buildPartial(); - } else { - mvnParam_ = value; - } - onChanged(); - } else { - mvnParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x40000000; - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public Builder clearMvnParam() { - if (mvnParamBuilder_ == null) { - mvnParam_ = null; - onChanged(); - } else { - mvnParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x40000000); - return this; - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public caffe.Caffe.MVNParameter.Builder getMvnParamBuilder() { - bitField0_ |= 0x40000000; - onChanged(); - return getMvnParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { - if (mvnParamBuilder_ != null) { - return mvnParamBuilder_.getMessageOrBuilder(); - } else { - return mvnParam_ == null ? - caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; - } - } - /** - * optional .caffe.MVNParameter mvn_param = 34; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> - getMvnParamFieldBuilder() { - if (mvnParamBuilder_ == null) { - mvnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder>( - getMvnParam(), - getParentForChildren(), - isClean()); - mvnParam_ = null; - } - return mvnParamBuilder_; - } - - private caffe.Caffe.PoolingParameter poolingParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> poolingParamBuilder_; - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public boolean hasPoolingParam() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public caffe.Caffe.PoolingParameter getPoolingParam() { - if (poolingParamBuilder_ == null) { - return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } else { - return poolingParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public Builder setPoolingParam(caffe.Caffe.PoolingParameter value) { - if (poolingParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - poolingParam_ = value; - onChanged(); - } else { - poolingParamBuilder_.setMessage(value); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public Builder setPoolingParam( - caffe.Caffe.PoolingParameter.Builder builderForValue) { - if (poolingParamBuilder_ == null) { - poolingParam_ = builderForValue.build(); - onChanged(); - } else { - poolingParamBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public Builder mergePoolingParam(caffe.Caffe.PoolingParameter value) { - if (poolingParamBuilder_ == null) { - if (((bitField0_ & 0x80000000) == 0x80000000) && - poolingParam_ != null && - poolingParam_ != caffe.Caffe.PoolingParameter.getDefaultInstance()) { - poolingParam_ = - caffe.Caffe.PoolingParameter.newBuilder(poolingParam_).mergeFrom(value).buildPartial(); - } else { - poolingParam_ = value; - } - onChanged(); - } else { - poolingParamBuilder_.mergeFrom(value); - } - bitField0_ |= 0x80000000; - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public Builder clearPoolingParam() { - if (poolingParamBuilder_ == null) { - poolingParam_ = null; - onChanged(); - } else { - poolingParamBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x80000000); - return this; - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public caffe.Caffe.PoolingParameter.Builder getPoolingParamBuilder() { - bitField0_ |= 0x80000000; - onChanged(); - return getPoolingParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { - if (poolingParamBuilder_ != null) { - return poolingParamBuilder_.getMessageOrBuilder(); - } else { - return poolingParam_ == null ? - caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; - } - } - /** - * optional .caffe.PoolingParameter pooling_param = 19; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> - getPoolingParamFieldBuilder() { - if (poolingParamBuilder_ == null) { - poolingParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder>( - getPoolingParam(), - getParentForChildren(), - isClean()); - poolingParam_ = null; - } - return poolingParamBuilder_; - } - - private caffe.Caffe.PowerParameter powerParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> powerParamBuilder_; - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public boolean hasPowerParam() { - return ((bitField1_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public caffe.Caffe.PowerParameter getPowerParam() { - if (powerParamBuilder_ == null) { - return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } else { - return powerParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public Builder setPowerParam(caffe.Caffe.PowerParameter value) { - if (powerParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - powerParam_ = value; - onChanged(); - } else { - powerParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public Builder setPowerParam( - caffe.Caffe.PowerParameter.Builder builderForValue) { - if (powerParamBuilder_ == null) { - powerParam_ = builderForValue.build(); - onChanged(); - } else { - powerParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public Builder mergePowerParam(caffe.Caffe.PowerParameter value) { - if (powerParamBuilder_ == null) { - if (((bitField1_ & 0x00000001) == 0x00000001) && - powerParam_ != null && - powerParam_ != caffe.Caffe.PowerParameter.getDefaultInstance()) { - powerParam_ = - caffe.Caffe.PowerParameter.newBuilder(powerParam_).mergeFrom(value).buildPartial(); - } else { - powerParam_ = value; - } - onChanged(); - } else { - powerParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000001; - return this; - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public Builder clearPowerParam() { - if (powerParamBuilder_ == null) { - powerParam_ = null; - onChanged(); - } else { - powerParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000001); - return this; - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public caffe.Caffe.PowerParameter.Builder getPowerParamBuilder() { - bitField1_ |= 0x00000001; - onChanged(); - return getPowerParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { - if (powerParamBuilder_ != null) { - return powerParamBuilder_.getMessageOrBuilder(); - } else { - return powerParam_ == null ? - caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; - } - } - /** - * optional .caffe.PowerParameter power_param = 21; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> - getPowerParamFieldBuilder() { - if (powerParamBuilder_ == null) { - powerParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder>( - getPowerParam(), - getParentForChildren(), - isClean()); - powerParam_ = null; - } - return powerParamBuilder_; - } - - private caffe.Caffe.ReLUParameter reluParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> reluParamBuilder_; - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public boolean hasReluParam() { - return ((bitField1_ & 0x00000002) == 0x00000002); - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public caffe.Caffe.ReLUParameter getReluParam() { - if (reluParamBuilder_ == null) { - return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } else { - return reluParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public Builder setReluParam(caffe.Caffe.ReLUParameter value) { - if (reluParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reluParam_ = value; - onChanged(); - } else { - reluParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public Builder setReluParam( - caffe.Caffe.ReLUParameter.Builder builderForValue) { - if (reluParamBuilder_ == null) { - reluParam_ = builderForValue.build(); - onChanged(); - } else { - reluParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public Builder mergeReluParam(caffe.Caffe.ReLUParameter value) { - if (reluParamBuilder_ == null) { - if (((bitField1_ & 0x00000002) == 0x00000002) && - reluParam_ != null && - reluParam_ != caffe.Caffe.ReLUParameter.getDefaultInstance()) { - reluParam_ = - caffe.Caffe.ReLUParameter.newBuilder(reluParam_).mergeFrom(value).buildPartial(); - } else { - reluParam_ = value; - } - onChanged(); - } else { - reluParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000002; - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public Builder clearReluParam() { - if (reluParamBuilder_ == null) { - reluParam_ = null; - onChanged(); - } else { - reluParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000002); - return this; - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public caffe.Caffe.ReLUParameter.Builder getReluParamBuilder() { - bitField1_ |= 0x00000002; - onChanged(); - return getReluParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { - if (reluParamBuilder_ != null) { - return reluParamBuilder_.getMessageOrBuilder(); - } else { - return reluParam_ == null ? - caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; - } - } - /** - * optional .caffe.ReLUParameter relu_param = 30; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> - getReluParamFieldBuilder() { - if (reluParamBuilder_ == null) { - reluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder>( - getReluParam(), - getParentForChildren(), - isClean()); - reluParam_ = null; - } - return reluParamBuilder_; - } - - private caffe.Caffe.SigmoidParameter sigmoidParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> sigmoidParamBuilder_; - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public boolean hasSigmoidParam() { - return ((bitField1_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public caffe.Caffe.SigmoidParameter getSigmoidParam() { - if (sigmoidParamBuilder_ == null) { - return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } else { - return sigmoidParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public Builder setSigmoidParam(caffe.Caffe.SigmoidParameter value) { - if (sigmoidParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sigmoidParam_ = value; - onChanged(); - } else { - sigmoidParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public Builder setSigmoidParam( - caffe.Caffe.SigmoidParameter.Builder builderForValue) { - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = builderForValue.build(); - onChanged(); - } else { - sigmoidParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public Builder mergeSigmoidParam(caffe.Caffe.SigmoidParameter value) { - if (sigmoidParamBuilder_ == null) { - if (((bitField1_ & 0x00000004) == 0x00000004) && - sigmoidParam_ != null && - sigmoidParam_ != caffe.Caffe.SigmoidParameter.getDefaultInstance()) { - sigmoidParam_ = - caffe.Caffe.SigmoidParameter.newBuilder(sigmoidParam_).mergeFrom(value).buildPartial(); - } else { - sigmoidParam_ = value; - } - onChanged(); - } else { - sigmoidParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000004; - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public Builder clearSigmoidParam() { - if (sigmoidParamBuilder_ == null) { - sigmoidParam_ = null; - onChanged(); - } else { - sigmoidParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000004); - return this; - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public caffe.Caffe.SigmoidParameter.Builder getSigmoidParamBuilder() { - bitField1_ |= 0x00000004; - onChanged(); - return getSigmoidParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { - if (sigmoidParamBuilder_ != null) { - return sigmoidParamBuilder_.getMessageOrBuilder(); - } else { - return sigmoidParam_ == null ? - caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; - } - } - /** - * optional .caffe.SigmoidParameter sigmoid_param = 38; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> - getSigmoidParamFieldBuilder() { - if (sigmoidParamBuilder_ == null) { - sigmoidParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder>( - getSigmoidParam(), - getParentForChildren(), - isClean()); - sigmoidParam_ = null; - } - return sigmoidParamBuilder_; - } - - private caffe.Caffe.SoftmaxParameter softmaxParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> softmaxParamBuilder_; - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public boolean hasSoftmaxParam() { - return ((bitField1_ & 0x00000008) == 0x00000008); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { - if (softmaxParamBuilder_ == null) { - return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } else { - return softmaxParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public Builder setSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { - if (softmaxParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - softmaxParam_ = value; - onChanged(); - } else { - softmaxParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public Builder setSoftmaxParam( - caffe.Caffe.SoftmaxParameter.Builder builderForValue) { - if (softmaxParamBuilder_ == null) { - softmaxParam_ = builderForValue.build(); - onChanged(); - } else { - softmaxParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public Builder mergeSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { - if (softmaxParamBuilder_ == null) { - if (((bitField1_ & 0x00000008) == 0x00000008) && - softmaxParam_ != null && - softmaxParam_ != caffe.Caffe.SoftmaxParameter.getDefaultInstance()) { - softmaxParam_ = - caffe.Caffe.SoftmaxParameter.newBuilder(softmaxParam_).mergeFrom(value).buildPartial(); - } else { - softmaxParam_ = value; - } - onChanged(); - } else { - softmaxParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000008; - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public Builder clearSoftmaxParam() { - if (softmaxParamBuilder_ == null) { - softmaxParam_ = null; - onChanged(); - } else { - softmaxParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000008); - return this; - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public caffe.Caffe.SoftmaxParameter.Builder getSoftmaxParamBuilder() { - bitField1_ |= 0x00000008; - onChanged(); - return getSoftmaxParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { - if (softmaxParamBuilder_ != null) { - return softmaxParamBuilder_.getMessageOrBuilder(); - } else { - return softmaxParam_ == null ? - caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; - } - } - /** - * optional .caffe.SoftmaxParameter softmax_param = 39; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> - getSoftmaxParamFieldBuilder() { - if (softmaxParamBuilder_ == null) { - softmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder>( - getSoftmaxParam(), - getParentForChildren(), - isClean()); - softmaxParam_ = null; - } - return softmaxParamBuilder_; - } - - private caffe.Caffe.SliceParameter sliceParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> sliceParamBuilder_; - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public boolean hasSliceParam() { - return ((bitField1_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public caffe.Caffe.SliceParameter getSliceParam() { - if (sliceParamBuilder_ == null) { - return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } else { - return sliceParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public Builder setSliceParam(caffe.Caffe.SliceParameter value) { - if (sliceParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceParam_ = value; - onChanged(); - } else { - sliceParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public Builder setSliceParam( - caffe.Caffe.SliceParameter.Builder builderForValue) { - if (sliceParamBuilder_ == null) { - sliceParam_ = builderForValue.build(); - onChanged(); - } else { - sliceParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public Builder mergeSliceParam(caffe.Caffe.SliceParameter value) { - if (sliceParamBuilder_ == null) { - if (((bitField1_ & 0x00000010) == 0x00000010) && - sliceParam_ != null && - sliceParam_ != caffe.Caffe.SliceParameter.getDefaultInstance()) { - sliceParam_ = - caffe.Caffe.SliceParameter.newBuilder(sliceParam_).mergeFrom(value).buildPartial(); - } else { - sliceParam_ = value; - } - onChanged(); - } else { - sliceParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000010; - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public Builder clearSliceParam() { - if (sliceParamBuilder_ == null) { - sliceParam_ = null; - onChanged(); - } else { - sliceParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000010); - return this; - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public caffe.Caffe.SliceParameter.Builder getSliceParamBuilder() { - bitField1_ |= 0x00000010; - onChanged(); - return getSliceParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { - if (sliceParamBuilder_ != null) { - return sliceParamBuilder_.getMessageOrBuilder(); - } else { - return sliceParam_ == null ? - caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; - } - } - /** - * optional .caffe.SliceParameter slice_param = 31; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> - getSliceParamFieldBuilder() { - if (sliceParamBuilder_ == null) { - sliceParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder>( - getSliceParam(), - getParentForChildren(), - isClean()); - sliceParam_ = null; - } - return sliceParamBuilder_; - } - - private caffe.Caffe.TanHParameter tanhParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> tanhParamBuilder_; - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public boolean hasTanhParam() { - return ((bitField1_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public caffe.Caffe.TanHParameter getTanhParam() { - if (tanhParamBuilder_ == null) { - return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } else { - return tanhParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public Builder setTanhParam(caffe.Caffe.TanHParameter value) { - if (tanhParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tanhParam_ = value; - onChanged(); - } else { - tanhParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public Builder setTanhParam( - caffe.Caffe.TanHParameter.Builder builderForValue) { - if (tanhParamBuilder_ == null) { - tanhParam_ = builderForValue.build(); - onChanged(); - } else { - tanhParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public Builder mergeTanhParam(caffe.Caffe.TanHParameter value) { - if (tanhParamBuilder_ == null) { - if (((bitField1_ & 0x00000020) == 0x00000020) && - tanhParam_ != null && - tanhParam_ != caffe.Caffe.TanHParameter.getDefaultInstance()) { - tanhParam_ = - caffe.Caffe.TanHParameter.newBuilder(tanhParam_).mergeFrom(value).buildPartial(); - } else { - tanhParam_ = value; - } - onChanged(); - } else { - tanhParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public Builder clearTanhParam() { - if (tanhParamBuilder_ == null) { - tanhParam_ = null; - onChanged(); - } else { - tanhParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - return this; - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public caffe.Caffe.TanHParameter.Builder getTanhParamBuilder() { - bitField1_ |= 0x00000020; - onChanged(); - return getTanhParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { - if (tanhParamBuilder_ != null) { - return tanhParamBuilder_.getMessageOrBuilder(); - } else { - return tanhParam_ == null ? - caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; - } - } - /** - * optional .caffe.TanHParameter tanh_param = 37; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> - getTanhParamFieldBuilder() { - if (tanhParamBuilder_ == null) { - tanhParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder>( - getTanhParam(), - getParentForChildren(), - isClean()); - tanhParam_ = null; - } - return tanhParamBuilder_; - } - - private caffe.Caffe.ThresholdParameter thresholdParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> thresholdParamBuilder_; - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public boolean hasThresholdParam() { - return ((bitField1_ & 0x00000040) == 0x00000040); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public caffe.Caffe.ThresholdParameter getThresholdParam() { - if (thresholdParamBuilder_ == null) { - return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } else { - return thresholdParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public Builder setThresholdParam(caffe.Caffe.ThresholdParameter value) { - if (thresholdParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - thresholdParam_ = value; - onChanged(); - } else { - thresholdParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public Builder setThresholdParam( - caffe.Caffe.ThresholdParameter.Builder builderForValue) { - if (thresholdParamBuilder_ == null) { - thresholdParam_ = builderForValue.build(); - onChanged(); - } else { - thresholdParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public Builder mergeThresholdParam(caffe.Caffe.ThresholdParameter value) { - if (thresholdParamBuilder_ == null) { - if (((bitField1_ & 0x00000040) == 0x00000040) && - thresholdParam_ != null && - thresholdParam_ != caffe.Caffe.ThresholdParameter.getDefaultInstance()) { - thresholdParam_ = - caffe.Caffe.ThresholdParameter.newBuilder(thresholdParam_).mergeFrom(value).buildPartial(); - } else { - thresholdParam_ = value; - } - onChanged(); - } else { - thresholdParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000040; - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public Builder clearThresholdParam() { - if (thresholdParamBuilder_ == null) { - thresholdParam_ = null; - onChanged(); - } else { - thresholdParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000040); - return this; - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public caffe.Caffe.ThresholdParameter.Builder getThresholdParamBuilder() { - bitField1_ |= 0x00000040; - onChanged(); - return getThresholdParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { - if (thresholdParamBuilder_ != null) { - return thresholdParamBuilder_.getMessageOrBuilder(); - } else { - return thresholdParam_ == null ? - caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; - } - } - /** - * optional .caffe.ThresholdParameter threshold_param = 25; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> - getThresholdParamFieldBuilder() { - if (thresholdParamBuilder_ == null) { - thresholdParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder>( - getThresholdParam(), - getParentForChildren(), - isClean()); - thresholdParam_ = null; - } - return thresholdParamBuilder_; - } - - private caffe.Caffe.WindowDataParameter windowDataParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> windowDataParamBuilder_; - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public boolean hasWindowDataParam() { - return ((bitField1_ & 0x00000080) == 0x00000080); - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public caffe.Caffe.WindowDataParameter getWindowDataParam() { - if (windowDataParamBuilder_ == null) { - return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } else { - return windowDataParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public Builder setWindowDataParam(caffe.Caffe.WindowDataParameter value) { - if (windowDataParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowDataParam_ = value; - onChanged(); - } else { - windowDataParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public Builder setWindowDataParam( - caffe.Caffe.WindowDataParameter.Builder builderForValue) { - if (windowDataParamBuilder_ == null) { - windowDataParam_ = builderForValue.build(); - onChanged(); - } else { - windowDataParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public Builder mergeWindowDataParam(caffe.Caffe.WindowDataParameter value) { - if (windowDataParamBuilder_ == null) { - if (((bitField1_ & 0x00000080) == 0x00000080) && - windowDataParam_ != null && - windowDataParam_ != caffe.Caffe.WindowDataParameter.getDefaultInstance()) { - windowDataParam_ = - caffe.Caffe.WindowDataParameter.newBuilder(windowDataParam_).mergeFrom(value).buildPartial(); - } else { - windowDataParam_ = value; - } - onChanged(); - } else { - windowDataParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000080; - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public Builder clearWindowDataParam() { - if (windowDataParamBuilder_ == null) { - windowDataParam_ = null; - onChanged(); - } else { - windowDataParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000080); - return this; - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public caffe.Caffe.WindowDataParameter.Builder getWindowDataParamBuilder() { - bitField1_ |= 0x00000080; - onChanged(); - return getWindowDataParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { - if (windowDataParamBuilder_ != null) { - return windowDataParamBuilder_.getMessageOrBuilder(); - } else { - return windowDataParam_ == null ? - caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; - } - } - /** - * optional .caffe.WindowDataParameter window_data_param = 20; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> - getWindowDataParamFieldBuilder() { - if (windowDataParamBuilder_ == null) { - windowDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder>( - getWindowDataParam(), - getParentForChildren(), - isClean()); - windowDataParam_ = null; - } - return windowDataParamBuilder_; - } - - private caffe.Caffe.TransformationParameter transformParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> transformParamBuilder_; - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public boolean hasTransformParam() { - return ((bitField1_ & 0x00000100) == 0x00000100); - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public caffe.Caffe.TransformationParameter getTransformParam() { - if (transformParamBuilder_ == null) { - return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } else { - return transformParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public Builder setTransformParam(caffe.Caffe.TransformationParameter value) { - if (transformParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformParam_ = value; - onChanged(); - } else { - transformParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public Builder setTransformParam( - caffe.Caffe.TransformationParameter.Builder builderForValue) { - if (transformParamBuilder_ == null) { - transformParam_ = builderForValue.build(); - onChanged(); - } else { - transformParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public Builder mergeTransformParam(caffe.Caffe.TransformationParameter value) { - if (transformParamBuilder_ == null) { - if (((bitField1_ & 0x00000100) == 0x00000100) && - transformParam_ != null && - transformParam_ != caffe.Caffe.TransformationParameter.getDefaultInstance()) { - transformParam_ = - caffe.Caffe.TransformationParameter.newBuilder(transformParam_).mergeFrom(value).buildPartial(); - } else { - transformParam_ = value; - } - onChanged(); - } else { - transformParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000100; - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public Builder clearTransformParam() { - if (transformParamBuilder_ == null) { - transformParam_ = null; - onChanged(); - } else { - transformParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000100); - return this; - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public caffe.Caffe.TransformationParameter.Builder getTransformParamBuilder() { - bitField1_ |= 0x00000100; - onChanged(); - return getTransformParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { - if (transformParamBuilder_ != null) { - return transformParamBuilder_.getMessageOrBuilder(); - } else { - return transformParam_ == null ? - caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; - } - } - /** - * optional .caffe.TransformationParameter transform_param = 36; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> - getTransformParamFieldBuilder() { - if (transformParamBuilder_ == null) { - transformParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder>( - getTransformParam(), - getParentForChildren(), - isClean()); - transformParam_ = null; - } - return transformParamBuilder_; - } - - private caffe.Caffe.LossParameter lossParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> lossParamBuilder_; - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public boolean hasLossParam() { - return ((bitField1_ & 0x00000200) == 0x00000200); - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public caffe.Caffe.LossParameter getLossParam() { - if (lossParamBuilder_ == null) { - return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } else { - return lossParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public Builder setLossParam(caffe.Caffe.LossParameter value) { - if (lossParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lossParam_ = value; - onChanged(); - } else { - lossParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public Builder setLossParam( - caffe.Caffe.LossParameter.Builder builderForValue) { - if (lossParamBuilder_ == null) { - lossParam_ = builderForValue.build(); - onChanged(); - } else { - lossParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public Builder mergeLossParam(caffe.Caffe.LossParameter value) { - if (lossParamBuilder_ == null) { - if (((bitField1_ & 0x00000200) == 0x00000200) && - lossParam_ != null && - lossParam_ != caffe.Caffe.LossParameter.getDefaultInstance()) { - lossParam_ = - caffe.Caffe.LossParameter.newBuilder(lossParam_).mergeFrom(value).buildPartial(); - } else { - lossParam_ = value; - } - onChanged(); - } else { - lossParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000200; - return this; - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public Builder clearLossParam() { - if (lossParamBuilder_ == null) { - lossParam_ = null; - onChanged(); - } else { - lossParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000200); - return this; - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public caffe.Caffe.LossParameter.Builder getLossParamBuilder() { - bitField1_ |= 0x00000200; - onChanged(); - return getLossParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { - if (lossParamBuilder_ != null) { - return lossParamBuilder_.getMessageOrBuilder(); - } else { - return lossParam_ == null ? - caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; - } - } - /** - * optional .caffe.LossParameter loss_param = 42; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> - getLossParamFieldBuilder() { - if (lossParamBuilder_ == null) { - lossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder>( - getLossParam(), - getParentForChildren(), - isClean()); - lossParam_ = null; - } - return lossParamBuilder_; - } - - private caffe.Caffe.V0LayerParameter layer_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder> layerBuilder_; - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public boolean hasLayer() { - return ((bitField1_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public caffe.Caffe.V0LayerParameter getLayer() { - if (layerBuilder_ == null) { - return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; - } else { - return layerBuilder_.getMessage(); - } - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public Builder setLayer(caffe.Caffe.V0LayerParameter value) { - if (layerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - layer_ = value; - onChanged(); - } else { - layerBuilder_.setMessage(value); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public Builder setLayer( - caffe.Caffe.V0LayerParameter.Builder builderForValue) { - if (layerBuilder_ == null) { - layer_ = builderForValue.build(); - onChanged(); - } else { - layerBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public Builder mergeLayer(caffe.Caffe.V0LayerParameter value) { - if (layerBuilder_ == null) { - if (((bitField1_ & 0x00000400) == 0x00000400) && - layer_ != null && - layer_ != caffe.Caffe.V0LayerParameter.getDefaultInstance()) { - layer_ = - caffe.Caffe.V0LayerParameter.newBuilder(layer_).mergeFrom(value).buildPartial(); - } else { - layer_ = value; - } - onChanged(); - } else { - layerBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000400; - return this; - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public Builder clearLayer() { - if (layerBuilder_ == null) { - layer_ = null; - onChanged(); - } else { - layerBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000400); - return this; - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public caffe.Caffe.V0LayerParameter.Builder getLayerBuilder() { - bitField1_ |= 0x00000400; - onChanged(); - return getLayerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - public caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder() { - if (layerBuilder_ != null) { - return layerBuilder_.getMessageOrBuilder(); - } else { - return layer_ == null ? - caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; - } - } - /** - * optional .caffe.V0LayerParameter layer = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder> - getLayerFieldBuilder() { - if (layerBuilder_ == null) { - layerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder>( - getLayer(), - getParentForChildren(), - isClean()); - layer_ = null; - } - return layerBuilder_; - } - - // @@protoc_insertion_point(builder_scope:caffe.V1LayerParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.V1LayerParameter) - private static final caffe.Caffe.V1LayerParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.V1LayerParameter(); - } - - public static caffe.Caffe.V1LayerParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public V1LayerParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new V1LayerParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.V1LayerParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface V0LayerParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.V0LayerParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * 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; - * - *
-     * the string to specify the layer type
-     * 
- */ - boolean hasType(); - /** - * optional string type = 2; - * - *
-     * the string to specify the layer type
-     * 
- */ - java.lang.String getType(); - /** - * optional string type = 2; - * - *
-     * the string to specify the layer type
-     * 
- */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * optional uint32 num_output = 3; - * - *
-     * Parameters to specify layers with inner products.
-     * 
- */ - boolean hasNumOutput(); - /** - * optional uint32 num_output = 3; - * - *
-     * Parameters to specify layers with inner products.
-     * 
- */ - int getNumOutput(); - - /** - * optional bool biasterm = 4 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean hasBiasterm(); - /** - * optional bool biasterm = 4 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - boolean getBiasterm(); - - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - boolean hasWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameter getWeightFiller(); - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); - - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - boolean hasBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameter getBiasFiller(); - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); - - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-     * The padding size
-     * 
- */ - boolean hasPad(); - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-     * The padding size
-     * 
- */ - int getPad(); - - /** - * optional uint32 kernelsize = 8; - * - *
-     * The kernel size
-     * 
- */ - boolean hasKernelsize(); - /** - * optional uint32 kernelsize = 8; - * - *
-     * The kernel size
-     * 
- */ - int getKernelsize(); - - /** - * optional uint32 group = 9 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - boolean hasGroup(); - /** - * optional uint32 group = 9 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - int getGroup(); - - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-     * The stride
-     * 
- */ - boolean hasStride(); - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-     * The stride
-     * 
- */ - int getStride(); - - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - boolean hasPool(); - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - caffe.Caffe.V0LayerParameter.PoolMethod getPool(); - - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - boolean hasDropoutRatio(); - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - float getDropoutRatio(); - - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-     * for local response norm
-     * 
- */ - boolean hasLocalSize(); - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-     * for local response norm
-     * 
- */ - int getLocalSize(); - - /** - * optional float alpha = 14 [default = 1]; - * - *
-     * for local response norm
-     * 
- */ - boolean hasAlpha(); - /** - * optional float alpha = 14 [default = 1]; - * - *
-     * for local response norm
-     * 
- */ - float getAlpha(); - - /** - * optional float beta = 15 [default = 0.75]; - * - *
-     * for local response norm
-     * 
- */ - boolean hasBeta(); - /** - * optional float beta = 15 [default = 0.75]; - * - *
-     * for local response norm
-     * 
- */ - float getBeta(); - - /** - * optional float k = 22 [default = 1]; - */ - boolean hasK(); - /** - * optional float k = 22 [default = 1]; - */ - float getK(); - - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - boolean hasSource(); - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - java.lang.String getSource(); - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - * optional float scale = 17 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - boolean hasScale(); - /** - * optional float scale = 17 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - float getScale(); - - /** - * optional string meanfile = 18; - */ - boolean hasMeanfile(); - /** - * optional string meanfile = 18; - */ - java.lang.String getMeanfile(); - /** - * optional string meanfile = 18; - */ - com.google.protobuf.ByteString - getMeanfileBytes(); - - /** - * optional uint32 batchsize = 19; - * - *
-     * For data layers, specify the batch size.
-     * 
- */ - boolean hasBatchsize(); - /** - * optional uint32 batchsize = 19; - * - *
-     * For data layers, specify the batch size.
-     * 
- */ - int getBatchsize(); - - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-     * For data layers, specify if we would like to randomly crop an image.
-     * 
- */ - boolean hasCropsize(); - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-     * For data layers, specify if we would like to randomly crop an image.
-     * 
- */ - int getCropsize(); - - /** - * optional bool mirror = 21 [default = false]; - * - *
-     * For data layers, specify if we want to randomly mirror data.
-     * 
- */ - boolean hasMirror(); - /** - * optional bool mirror = 21 [default = false]; - * - *
-     * For data layers, specify if we want to randomly mirror data.
-     * 
- */ - boolean getMirror(); - - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - java.util.List - getBlobsList(); - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - caffe.Caffe.BlobProto getBlobs(int index); - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - int getBlobsCount(); - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - java.util.List - getBlobsOrBuilderList(); - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index); - - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - java.util.List getBlobsLrList(); - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - int getBlobsLrCount(); - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - float getBlobsLr(int index); - - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - java.util.List getWeightDecayList(); - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - int getWeightDecayCount(); - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - float getWeightDecay(int index); - - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - boolean hasRandSkip(); - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - int getRandSkip(); - - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-     * Fields related to detection (det_*)
-     * foreground (object) overlap threshold
-     * 
- */ - boolean hasDetFgThreshold(); - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-     * Fields related to detection (det_*)
-     * foreground (object) overlap threshold
-     * 
- */ - float getDetFgThreshold(); - - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-     * background (non-object) overlap threshold
-     * 
- */ - boolean hasDetBgThreshold(); - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-     * background (non-object) overlap threshold
-     * 
- */ - float getDetBgThreshold(); - - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - boolean hasDetFgFraction(); - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - float getDetFgFraction(); - - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - boolean hasDetContextPad(); - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - int getDetContextPad(); - - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - boolean hasDetCropMode(); - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - java.lang.String getDetCropMode(); - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - com.google.protobuf.ByteString - getDetCropModeBytes(); - - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-     * For ReshapeLayer, one needs to specify the new dimensions.
-     * 
- */ - boolean hasNewNum(); - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-     * For ReshapeLayer, one needs to specify the new dimensions.
-     * 
- */ - int getNewNum(); - - /** - * optional int32 new_channels = 61 [default = 0]; - */ - boolean hasNewChannels(); - /** - * optional int32 new_channels = 61 [default = 0]; - */ - int getNewChannels(); - - /** - * optional int32 new_height = 62 [default = 0]; - */ - boolean hasNewHeight(); - /** - * optional int32 new_height = 62 [default = 0]; - */ - int getNewHeight(); - - /** - * optional int32 new_width = 63 [default = 0]; - */ - boolean hasNewWidth(); - /** - * optional int32 new_width = 63 [default = 0]; - */ - int getNewWidth(); - - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - boolean hasShuffleImages(); - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - boolean getShuffleImages(); - - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-     * For ConcatLayer, one needs to specify the dimension for concatenation, and
-     * the other dimensions must be the same for all the bottom blobs.
-     * By default it will concatenate blobs along the channels dimension.
-     * 
- */ - boolean hasConcatDim(); - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-     * For ConcatLayer, one needs to specify the dimension for concatenation, and
-     * the other dimensions must be the same for all the bottom blobs.
-     * By default it will concatenate blobs along the channels dimension.
-     * 
- */ - int getConcatDim(); - - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - boolean hasHdf5OutputParam(); - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - caffe.Caffe.HDF5OutputParameter getHdf5OutputParam(); - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder(); - } - /** - * Protobuf type {@code caffe.V0LayerParameter} - * - *
-   * DEPRECATED: V0LayerParameter is the old way of specifying layer parameters
-   * in Caffe.  We keep this message type around for legacy support.
-   * 
- */ - public static final class V0LayerParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.V0LayerParameter) - V0LayerParameterOrBuilder { - // Use V0LayerParameter.newBuilder() to construct. - private V0LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private V0LayerParameter() { - name_ = ""; - type_ = ""; - numOutput_ = 0; - biasterm_ = true; - pad_ = 0; - kernelsize_ = 0; - group_ = 1; - stride_ = 1; - pool_ = 0; - dropoutRatio_ = 0.5F; - localSize_ = 5; - alpha_ = 1F; - beta_ = 0.75F; - k_ = 1F; - source_ = ""; - scale_ = 1F; - meanfile_ = ""; - batchsize_ = 0; - cropsize_ = 0; - mirror_ = false; - blobs_ = java.util.Collections.emptyList(); - blobsLr_ = java.util.Collections.emptyList(); - weightDecay_ = java.util.Collections.emptyList(); - randSkip_ = 0; - detFgThreshold_ = 0.5F; - detBgThreshold_ = 0.5F; - detFgFraction_ = 0.25F; - detContextPad_ = 0; - detCropMode_ = "warp"; - newNum_ = 0; - newChannels_ = 0; - newHeight_ = 0; - newWidth_ = 0; - shuffleImages_ = false; - concatDim_ = 1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private V0LayerParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - type_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - numOutput_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - biasterm_ = input.readBool(); - break; - } - case 42: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = weightFiller_.toBuilder(); - } - weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(weightFiller_); - weightFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 50: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = biasFiller_.toBuilder(); - } - biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(biasFiller_); - biasFiller_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 56: { - bitField0_ |= 0x00000040; - pad_ = input.readUInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - kernelsize_ = input.readUInt32(); - break; - } - case 72: { - bitField0_ |= 0x00000100; - group_ = input.readUInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - stride_ = input.readUInt32(); - break; - } - case 88: { - int rawValue = input.readEnum(); - caffe.Caffe.V0LayerParameter.PoolMethod value = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - pool_ = rawValue; - } - break; - } - case 101: { - bitField0_ |= 0x00000800; - dropoutRatio_ = input.readFloat(); - break; - } - case 104: { - bitField0_ |= 0x00001000; - localSize_ = input.readUInt32(); - break; - } - case 117: { - bitField0_ |= 0x00002000; - alpha_ = input.readFloat(); - break; - } - case 125: { - bitField0_ |= 0x00004000; - beta_ = input.readFloat(); - break; - } - case 130: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00010000; - source_ = bs; - break; - } - case 141: { - bitField0_ |= 0x00020000; - scale_ = input.readFloat(); - break; - } - case 146: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00040000; - meanfile_ = bs; - break; - } - case 152: { - bitField0_ |= 0x00080000; - batchsize_ = input.readUInt32(); - break; - } - case 160: { - bitField0_ |= 0x00100000; - cropsize_ = input.readUInt32(); - break; - } - case 168: { - bitField0_ |= 0x00200000; - mirror_ = input.readBool(); - break; - } - case 181: { - bitField0_ |= 0x00008000; - k_ = input.readFloat(); - break; - } - case 402: { - if (!((mutable_bitField0_ & 0x00400000) == 0x00400000)) { - blobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00400000; - } - blobs_.add(input.readMessage(caffe.Caffe.BlobProto.parser(), extensionRegistry)); - break; - } - case 413: { - if (!((mutable_bitField0_ & 0x00800000) == 0x00800000)) { - blobsLr_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00800000; - } - blobsLr_.add(input.readFloat()); - break; - } - case 410: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00800000) == 0x00800000) && input.getBytesUntilLimit() > 0) { - blobsLr_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00800000; - } - while (input.getBytesUntilLimit() > 0) { - blobsLr_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 421: { - if (!((mutable_bitField0_ & 0x01000000) == 0x01000000)) { - weightDecay_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x01000000; - } - weightDecay_.add(input.readFloat()); - break; - } - case 418: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x01000000) == 0x01000000) && input.getBytesUntilLimit() > 0) { - weightDecay_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x01000000; - } - while (input.getBytesUntilLimit() > 0) { - weightDecay_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 424: { - bitField0_ |= 0x00400000; - randSkip_ = input.readUInt32(); - break; - } - case 437: { - bitField0_ |= 0x00800000; - detFgThreshold_ = input.readFloat(); - break; - } - case 445: { - bitField0_ |= 0x01000000; - detBgThreshold_ = input.readFloat(); - break; - } - case 453: { - bitField0_ |= 0x02000000; - detFgFraction_ = input.readFloat(); - break; - } - case 464: { - bitField0_ |= 0x04000000; - detContextPad_ = input.readUInt32(); - break; - } - case 474: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x08000000; - detCropMode_ = bs; - break; - } - case 480: { - bitField0_ |= 0x10000000; - newNum_ = input.readInt32(); - break; - } - case 488: { - bitField0_ |= 0x20000000; - newChannels_ = input.readInt32(); - break; - } - case 496: { - bitField0_ |= 0x40000000; - newHeight_ = input.readInt32(); - break; - } - case 504: { - bitField0_ |= 0x80000000; - newWidth_ = input.readInt32(); - break; - } - case 512: { - bitField1_ |= 0x00000001; - shuffleImages_ = input.readBool(); - break; - } - case 520: { - bitField1_ |= 0x00000002; - concatDim_ = input.readUInt32(); - break; - } - case 8010: { - caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null; - if (((bitField1_ & 0x00000004) == 0x00000004)) { - subBuilder = hdf5OutputParam_.toBuilder(); - } - hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdf5OutputParam_); - hdf5OutputParam_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00400000) == 0x00400000)) { - blobs_ = java.util.Collections.unmodifiableList(blobs_); - } - if (((mutable_bitField0_ & 0x00800000) == 0x00800000)) { - blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); - } - if (((mutable_bitField0_ & 0x01000000) == 0x01000000)) { - weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_V0LayerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.V0LayerParameter.class, caffe.Caffe.V0LayerParameter.Builder.class); - } - - /** - * Protobuf enum {@code caffe.V0LayerParameter.PoolMethod} - */ - public enum PoolMethod - implements com.google.protobuf.ProtocolMessageEnum { - /** - * MAX = 0; - */ - MAX(0, 0), - /** - * AVE = 1; - */ - AVE(1, 1), - /** - * STOCHASTIC = 2; - */ - STOCHASTIC(2, 2), - ; - - /** - * MAX = 0; - */ - public static final int MAX_VALUE = 0; - /** - * AVE = 1; - */ - public static final int AVE_VALUE = 1; - /** - * STOCHASTIC = 2; - */ - public static final int STOCHASTIC_VALUE = 2; - - - public final int getNumber() { - return value; - } - - public static PoolMethod valueOf(int value) { - switch (value) { - case 0: return MAX; - case 1: return AVE; - case 2: return STOCHASTIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PoolMethod> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PoolMethod findValueByNumber(int number) { - return PoolMethod.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.V0LayerParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final PoolMethod[] VALUES = values(); - - public static PoolMethod 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 PoolMethod(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:caffe.V0LayerParameter.PoolMethod) - } - - private int bitField0_; - private int bitField1_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile 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; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; - /** - * optional string type = 2; - * - *
-     * the string to specify the layer type
-     * 
- */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string type = 2; - * - *
-     * the string to specify 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 string to specify 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; - } - } - - public static final int NUM_OUTPUT_FIELD_NUMBER = 3; - private int numOutput_; - /** - * optional uint32 num_output = 3; - * - *
-     * Parameters to specify layers with inner products.
-     * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 num_output = 3; - * - *
-     * Parameters to specify layers with inner products.
-     * 
- */ - public int getNumOutput() { - return numOutput_; - } - - public static final int BIASTERM_FIELD_NUMBER = 4; - private boolean biasterm_; - /** - * optional bool biasterm = 4 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean hasBiasterm() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool biasterm = 4 [default = true]; - * - *
-     * whether to have bias terms
-     * 
- */ - public boolean getBiasterm() { - return biasterm_; - } - - public static final int WEIGHT_FILLER_FIELD_NUMBER = 5; - private caffe.Caffe.FillerParameter weightFiller_; - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-     * The filler for the weight
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - - public static final int BIAS_FILLER_FIELD_NUMBER = 6; - private caffe.Caffe.FillerParameter biasFiller_; - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-     * The filler for the bias
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - - public static final int PAD_FIELD_NUMBER = 7; - private int pad_; - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-     * The padding size
-     * 
- */ - public boolean hasPad() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-     * The padding size
-     * 
- */ - public int getPad() { - return pad_; - } - - public static final int KERNELSIZE_FIELD_NUMBER = 8; - private int kernelsize_; - /** - * optional uint32 kernelsize = 8; - * - *
-     * The kernel size
-     * 
- */ - public boolean hasKernelsize() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 kernelsize = 8; - * - *
-     * The kernel size
-     * 
- */ - public int getKernelsize() { - return kernelsize_; - } - - public static final int GROUP_FIELD_NUMBER = 9; - private int group_; - /** - * optional uint32 group = 9 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - public boolean hasGroup() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 group = 9 [default = 1]; - * - *
-     * The group size for group conv
-     * 
- */ - public int getGroup() { - return group_; - } - - public static final int STRIDE_FIELD_NUMBER = 10; - private int stride_; - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-     * The stride
-     * 
- */ - public boolean hasStride() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-     * The stride
-     * 
- */ - public int getStride() { - return stride_; - } - - public static final int POOL_FIELD_NUMBER = 11; - private int pool_; - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-     * The pooling method
-     * 
- */ - public caffe.Caffe.V0LayerParameter.PoolMethod getPool() { - caffe.Caffe.V0LayerParameter.PoolMethod result = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.V0LayerParameter.PoolMethod.MAX : result; - } - - public static final int DROPOUT_RATIO_FIELD_NUMBER = 12; - private float dropoutRatio_; - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - public boolean hasDropoutRatio() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-     * dropout ratio
-     * 
- */ - public float getDropoutRatio() { - return dropoutRatio_; - } - - public static final int LOCAL_SIZE_FIELD_NUMBER = 13; - private int localSize_; - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-     * for local response norm
-     * 
- */ - public boolean hasLocalSize() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-     * for local response norm
-     * 
- */ - public int getLocalSize() { - return localSize_; - } - - public static final int ALPHA_FIELD_NUMBER = 14; - private float alpha_; - /** - * optional float alpha = 14 [default = 1]; - * - *
-     * for local response norm
-     * 
- */ - public boolean hasAlpha() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional float alpha = 14 [default = 1]; - * - *
-     * for local response norm
-     * 
- */ - public float getAlpha() { - return alpha_; - } - - public static final int BETA_FIELD_NUMBER = 15; - private float beta_; - /** - * optional float beta = 15 [default = 0.75]; - * - *
-     * for local response norm
-     * 
- */ - public boolean hasBeta() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional float beta = 15 [default = 0.75]; - * - *
-     * for local response norm
-     * 
- */ - public float getBeta() { - return beta_; - } - - public static final int K_FIELD_NUMBER = 22; - private float k_; - /** - * optional float k = 22 [default = 1]; - */ - public boolean hasK() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional float k = 22 [default = 1]; - */ - public float getK() { - return k_; - } - - public static final int SOURCE_FIELD_NUMBER = 16; - private volatile java.lang.Object source_; - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - 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()) { - source_ = s; - } - return s; - } - } - /** - * optional string source = 16; - * - *
-     * For data layers, specify the data source
-     * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCALE_FIELD_NUMBER = 17; - private float scale_; - /** - * optional float scale = 17 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00020000) == 0x00020000); - } - /** - * optional float scale = 17 [default = 1]; - * - *
-     * For data pre-processing, we can do simple scaling and subtracting the
-     * data mean, if provided. Note that the mean subtraction is always carried
-     * out before scaling.
-     * 
- */ - public float getScale() { - return scale_; - } - - public static final int MEANFILE_FIELD_NUMBER = 18; - private volatile java.lang.Object meanfile_; - /** - * optional string meanfile = 18; - */ - public boolean hasMeanfile() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional string meanfile = 18; - */ - public java.lang.String getMeanfile() { - java.lang.Object ref = meanfile_; - 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()) { - meanfile_ = s; - } - return s; - } - } - /** - * optional string meanfile = 18; - */ - public com.google.protobuf.ByteString - getMeanfileBytes() { - java.lang.Object ref = meanfile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanfile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCHSIZE_FIELD_NUMBER = 19; - private int batchsize_; - /** - * optional uint32 batchsize = 19; - * - *
-     * For data layers, specify the batch size.
-     * 
- */ - public boolean hasBatchsize() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional uint32 batchsize = 19; - * - *
-     * For data layers, specify the batch size.
-     * 
- */ - public int getBatchsize() { - return batchsize_; - } - - public static final int CROPSIZE_FIELD_NUMBER = 20; - private int cropsize_; - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-     * For data layers, specify if we would like to randomly crop an image.
-     * 
- */ - public boolean hasCropsize() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-     * For data layers, specify if we would like to randomly crop an image.
-     * 
- */ - public int getCropsize() { - return cropsize_; - } - - public static final int MIRROR_FIELD_NUMBER = 21; - private boolean mirror_; - /** - * optional bool mirror = 21 [default = false]; - * - *
-     * For data layers, specify if we want to randomly mirror data.
-     * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00200000) == 0x00200000); - } - /** - * optional bool mirror = 21 [default = false]; - * - *
-     * For data layers, specify if we want to randomly mirror data.
-     * 
- */ - public boolean getMirror() { - return mirror_; - } - - public static final int BLOBS_FIELD_NUMBER = 50; - private java.util.List blobs_; - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - public java.util.List getBlobsList() { - return blobs_; - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - public java.util.List - getBlobsOrBuilderList() { - return blobs_; - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - public int getBlobsCount() { - return blobs_.size(); - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - public caffe.Caffe.BlobProto getBlobs(int index) { - return blobs_.get(index); - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-     * The blobs containing the numeric parameters of the layer
-     * 
- */ - public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index) { - return blobs_.get(index); - } - - public static final int BLOBS_LR_FIELD_NUMBER = 51; - private java.util.List blobsLr_; - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - public java.util.List - getBlobsLrList() { - return blobsLr_; - } - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - public int getBlobsLrCount() { - return blobsLr_.size(); - } - /** - * repeated float blobs_lr = 51; - * - *
-     * The ratio that is multiplied on the global learning rate. If you want to
-     * set the learning ratio for one blob, you need to set it for all blobs.
-     * 
- */ - public float getBlobsLr(int index) { - return blobsLr_.get(index); - } - - public static final int WEIGHT_DECAY_FIELD_NUMBER = 52; - private java.util.List weightDecay_; - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - public java.util.List - getWeightDecayList() { - return weightDecay_; - } - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - public int getWeightDecayCount() { - return weightDecay_.size(); - } - /** - * repeated float weight_decay = 52; - * - *
-     * The weight decay that is multiplied on the global weight decay.
-     * 
- */ - public float getWeightDecay(int index) { - return weightDecay_.get(index); - } - - public static final int RAND_SKIP_FIELD_NUMBER = 53; - private int randSkip_; - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x00400000) == 0x00400000); - } - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-     * The rand_skip variable is for the data layer to skip a few data points
-     * to avoid all asynchronous sgd clients to start at the same point. The skip
-     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-     * be larger than the number of keys in the database.
-     * 
- */ - public int getRandSkip() { - return randSkip_; - } - - public static final int DET_FG_THRESHOLD_FIELD_NUMBER = 54; - private float detFgThreshold_; - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-     * Fields related to detection (det_*)
-     * foreground (object) overlap threshold
-     * 
- */ - public boolean hasDetFgThreshold() { - return ((bitField0_ & 0x00800000) == 0x00800000); - } - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-     * Fields related to detection (det_*)
-     * foreground (object) overlap threshold
-     * 
- */ - public float getDetFgThreshold() { - return detFgThreshold_; - } - - public static final int DET_BG_THRESHOLD_FIELD_NUMBER = 55; - private float detBgThreshold_; - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-     * background (non-object) overlap threshold
-     * 
- */ - public boolean hasDetBgThreshold() { - return ((bitField0_ & 0x01000000) == 0x01000000); - } - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-     * background (non-object) overlap threshold
-     * 
- */ - public float getDetBgThreshold() { - return detBgThreshold_; - } - - public static final int DET_FG_FRACTION_FIELD_NUMBER = 56; - private float detFgFraction_; - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - public boolean hasDetFgFraction() { - return ((bitField0_ & 0x02000000) == 0x02000000); - } - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-     * Fraction of batch that should be foreground objects
-     * 
- */ - public float getDetFgFraction() { - return detFgFraction_; - } - - public static final int DET_CONTEXT_PAD_FIELD_NUMBER = 58; - private int detContextPad_; - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - public boolean hasDetContextPad() { - return ((bitField0_ & 0x04000000) == 0x04000000); - } - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-     * Amount of contextual padding to add around a window
-     * (used only by the window_data_layer)
-     * 
- */ - public int getDetContextPad() { - return detContextPad_; - } - - public static final int DET_CROP_MODE_FIELD_NUMBER = 59; - private volatile java.lang.Object detCropMode_; - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public boolean hasDetCropMode() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public java.lang.String getDetCropMode() { - java.lang.Object ref = detCropMode_; - 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()) { - detCropMode_ = s; - } - return s; - } - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-     * Mode for cropping out a detection window
-     * warp: cropped window is warped to a fixed size and aspect ratio
-     * square: the tightest square around the window is cropped
-     * 
- */ - public com.google.protobuf.ByteString - getDetCropModeBytes() { - java.lang.Object ref = detCropMode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detCropMode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NEW_NUM_FIELD_NUMBER = 60; - private int newNum_; - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-     * For ReshapeLayer, one needs to specify the new dimensions.
-     * 
- */ - public boolean hasNewNum() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-     * For ReshapeLayer, one needs to specify the new dimensions.
-     * 
- */ - public int getNewNum() { - return newNum_; - } - - public static final int NEW_CHANNELS_FIELD_NUMBER = 61; - private int newChannels_; - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public boolean hasNewChannels() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public int getNewChannels() { - return newChannels_; - } - - public static final int NEW_HEIGHT_FIELD_NUMBER = 62; - private int newHeight_; - /** - * optional int32 new_height = 62 [default = 0]; - */ - public boolean hasNewHeight() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional int32 new_height = 62 [default = 0]; - */ - public int getNewHeight() { - return newHeight_; - } - - public static final int NEW_WIDTH_FIELD_NUMBER = 63; - private int newWidth_; - /** - * optional int32 new_width = 63 [default = 0]; - */ - public boolean hasNewWidth() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional int32 new_width = 63 [default = 0]; - */ - public int getNewWidth() { - return newWidth_; - } - - public static final int SHUFFLE_IMAGES_FIELD_NUMBER = 64; - private boolean shuffleImages_; - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - public boolean hasShuffleImages() { - return ((bitField1_ & 0x00000001) == 0x00000001); - } - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-     * Whether or not ImageLayer should shuffle the list of files at every epoch.
-     * It will also resize images if new_height or new_width are not zero.
-     * 
- */ - public boolean getShuffleImages() { - return shuffleImages_; - } - - public static final int CONCAT_DIM_FIELD_NUMBER = 65; - private int concatDim_; - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-     * For ConcatLayer, one needs to specify the dimension for concatenation, and
-     * the other dimensions must be the same for all the bottom blobs.
-     * By default it will concatenate blobs along the channels dimension.
-     * 
- */ - public boolean hasConcatDim() { - return ((bitField1_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-     * For ConcatLayer, one needs to specify the dimension for concatenation, and
-     * the other dimensions must be the same for all the bottom blobs.
-     * By default it will concatenate blobs along the channels dimension.
-     * 
- */ - public int getConcatDim() { - return concatDim_; - } - - public static final int HDF5_OUTPUT_PARAM_FIELD_NUMBER = 1001; - private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_; - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public boolean hasHdf5OutputParam() { - return ((bitField1_ & 0x00000004) == 0x00000004); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, numOutput_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, biasterm_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, getWeightFiller()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeMessage(6, getBiasFiller()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(7, pad_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeUInt32(8, kernelsize_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeUInt32(9, group_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt32(10, stride_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeEnum(11, pool_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeFloat(12, dropoutRatio_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeUInt32(13, localSize_); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeFloat(14, alpha_); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - output.writeFloat(15, beta_); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - com.google.protobuf.GeneratedMessage.writeString(output, 16, source_); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - output.writeFloat(17, scale_); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - com.google.protobuf.GeneratedMessage.writeString(output, 18, meanfile_); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - output.writeUInt32(19, batchsize_); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - output.writeUInt32(20, cropsize_); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - output.writeBool(21, mirror_); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - output.writeFloat(22, k_); - } - for (int i = 0; i < blobs_.size(); i++) { - output.writeMessage(50, blobs_.get(i)); - } - for (int i = 0; i < blobsLr_.size(); i++) { - output.writeFloat(51, blobsLr_.get(i)); - } - for (int i = 0; i < weightDecay_.size(); i++) { - output.writeFloat(52, weightDecay_.get(i)); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - output.writeUInt32(53, randSkip_); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - output.writeFloat(54, detFgThreshold_); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - output.writeFloat(55, detBgThreshold_); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - output.writeFloat(56, detFgFraction_); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - output.writeUInt32(58, detContextPad_); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - com.google.protobuf.GeneratedMessage.writeString(output, 59, detCropMode_); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - output.writeInt32(60, newNum_); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - output.writeInt32(61, newChannels_); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - output.writeInt32(62, newHeight_); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - output.writeInt32(63, newWidth_); - } - if (((bitField1_ & 0x00000001) == 0x00000001)) { - output.writeBool(64, shuffleImages_); - } - if (((bitField1_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(65, concatDim_); - } - if (((bitField1_ & 0x00000004) == 0x00000004)) { - output.writeMessage(1001, getHdf5OutputParam()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, numOutput_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, biasterm_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getWeightFiller()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getBiasFiller()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, pad_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, kernelsize_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, group_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, stride_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, pool_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(12, dropoutRatio_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(13, localSize_); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(14, alpha_); - } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(15, beta_); - } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(16, source_); - } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(17, scale_); - } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(18, meanfile_); - } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(19, batchsize_); - } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(20, cropsize_); - } - if (((bitField0_ & 0x00200000) == 0x00200000)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(21, mirror_); - } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(22, k_); - } - for (int i = 0; i < blobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(50, blobs_.get(i)); - } - { - int dataSize = 0; - dataSize = 4 * getBlobsLrList().size(); - size += dataSize; - size += 2 * getBlobsLrList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getWeightDecayList().size(); - size += dataSize; - size += 2 * getWeightDecayList().size(); - } - if (((bitField0_ & 0x00400000) == 0x00400000)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(53, randSkip_); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(54, detFgThreshold_); - } - if (((bitField0_ & 0x01000000) == 0x01000000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(55, detBgThreshold_); - } - if (((bitField0_ & 0x02000000) == 0x02000000)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(56, detFgFraction_); - } - if (((bitField0_ & 0x04000000) == 0x04000000)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(58, detContextPad_); - } - if (((bitField0_ & 0x08000000) == 0x08000000)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(59, detCropMode_); - } - if (((bitField0_ & 0x10000000) == 0x10000000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(60, newNum_); - } - if (((bitField0_ & 0x20000000) == 0x20000000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(61, newChannels_); - } - if (((bitField0_ & 0x40000000) == 0x40000000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(62, newHeight_); - } - if (((bitField0_ & 0x80000000) == 0x80000000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(63, newWidth_); - } - if (((bitField1_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(64, shuffleImages_); - } - if (((bitField1_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(65, concatDim_); - } - if (((bitField1_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1001, getHdf5OutputParam()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.V0LayerParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.V0LayerParameter 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.V0LayerParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.V0LayerParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.V0LayerParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.V0LayerParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.V0LayerParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.V0LayerParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.V0LayerParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.V0LayerParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.V0LayerParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.V0LayerParameter} - * - *
-     * DEPRECATED: V0LayerParameter is the old way of specifying layer parameters
-     * in Caffe.  We keep this message type around for legacy support.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.V0LayerParameter) - caffe.Caffe.V0LayerParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_V0LayerParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.V0LayerParameter.class, caffe.Caffe.V0LayerParameter.Builder.class); - } - - // Construct using caffe.Caffe.V0LayerParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getWeightFillerFieldBuilder(); - getBiasFillerFieldBuilder(); - getBlobsFieldBuilder(); - getHdf5OutputParamFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - type_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - numOutput_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - biasterm_ = true; - bitField0_ = (bitField0_ & ~0x00000008); - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - pad_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - kernelsize_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - group_ = 1; - bitField0_ = (bitField0_ & ~0x00000100); - stride_ = 1; - bitField0_ = (bitField0_ & ~0x00000200); - pool_ = 0; - bitField0_ = (bitField0_ & ~0x00000400); - dropoutRatio_ = 0.5F; - bitField0_ = (bitField0_ & ~0x00000800); - localSize_ = 5; - bitField0_ = (bitField0_ & ~0x00001000); - alpha_ = 1F; - bitField0_ = (bitField0_ & ~0x00002000); - beta_ = 0.75F; - bitField0_ = (bitField0_ & ~0x00004000); - k_ = 1F; - bitField0_ = (bitField0_ & ~0x00008000); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00010000); - scale_ = 1F; - bitField0_ = (bitField0_ & ~0x00020000); - meanfile_ = ""; - bitField0_ = (bitField0_ & ~0x00040000); - batchsize_ = 0; - bitField0_ = (bitField0_ & ~0x00080000); - cropsize_ = 0; - bitField0_ = (bitField0_ & ~0x00100000); - mirror_ = false; - bitField0_ = (bitField0_ & ~0x00200000); - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00400000); - } else { - blobsBuilder_.clear(); - } - blobsLr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00800000); - weightDecay_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x01000000); - randSkip_ = 0; - bitField0_ = (bitField0_ & ~0x02000000); - detFgThreshold_ = 0.5F; - bitField0_ = (bitField0_ & ~0x04000000); - detBgThreshold_ = 0.5F; - bitField0_ = (bitField0_ & ~0x08000000); - detFgFraction_ = 0.25F; - bitField0_ = (bitField0_ & ~0x10000000); - detContextPad_ = 0; - bitField0_ = (bitField0_ & ~0x20000000); - detCropMode_ = "warp"; - bitField0_ = (bitField0_ & ~0x40000000); - newNum_ = 0; - bitField0_ = (bitField0_ & ~0x80000000); - newChannels_ = 0; - bitField1_ = (bitField1_ & ~0x00000001); - newHeight_ = 0; - bitField1_ = (bitField1_ & ~0x00000002); - newWidth_ = 0; - bitField1_ = (bitField1_ & ~0x00000004); - shuffleImages_ = false; - bitField1_ = (bitField1_ & ~0x00000008); - concatDim_ = 1; - bitField1_ = (bitField1_ & ~0x00000010); - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; - } - - public caffe.Caffe.V0LayerParameter getDefaultInstanceForType() { - return caffe.Caffe.V0LayerParameter.getDefaultInstance(); - } - - public caffe.Caffe.V0LayerParameter build() { - caffe.Caffe.V0LayerParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.V0LayerParameter buildPartial() { - caffe.Caffe.V0LayerParameter result = new caffe.Caffe.V0LayerParameter(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 (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.numOutput_ = numOutput_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.biasterm_ = biasterm_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (weightFillerBuilder_ == null) { - result.weightFiller_ = weightFiller_; - } else { - result.weightFiller_ = weightFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - if (biasFillerBuilder_ == null) { - result.biasFiller_ = biasFiller_; - } else { - result.biasFiller_ = biasFillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.pad_ = pad_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.kernelsize_ = kernelsize_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.group_ = group_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.stride_ = stride_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.pool_ = pool_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.dropoutRatio_ = dropoutRatio_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00001000; - } - result.localSize_ = localSize_; - if (((from_bitField0_ & 0x00002000) == 0x00002000)) { - to_bitField0_ |= 0x00002000; - } - result.alpha_ = alpha_; - if (((from_bitField0_ & 0x00004000) == 0x00004000)) { - to_bitField0_ |= 0x00004000; - } - result.beta_ = beta_; - if (((from_bitField0_ & 0x00008000) == 0x00008000)) { - to_bitField0_ |= 0x00008000; - } - result.k_ = k_; - if (((from_bitField0_ & 0x00010000) == 0x00010000)) { - to_bitField0_ |= 0x00010000; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00020000) == 0x00020000)) { - to_bitField0_ |= 0x00020000; - } - result.scale_ = scale_; - if (((from_bitField0_ & 0x00040000) == 0x00040000)) { - to_bitField0_ |= 0x00040000; - } - result.meanfile_ = meanfile_; - if (((from_bitField0_ & 0x00080000) == 0x00080000)) { - to_bitField0_ |= 0x00080000; - } - result.batchsize_ = batchsize_; - if (((from_bitField0_ & 0x00100000) == 0x00100000)) { - to_bitField0_ |= 0x00100000; - } - result.cropsize_ = cropsize_; - if (((from_bitField0_ & 0x00200000) == 0x00200000)) { - to_bitField0_ |= 0x00200000; - } - result.mirror_ = mirror_; - if (blobsBuilder_ == null) { - if (((bitField0_ & 0x00400000) == 0x00400000)) { - blobs_ = java.util.Collections.unmodifiableList(blobs_); - bitField0_ = (bitField0_ & ~0x00400000); - } - result.blobs_ = blobs_; - } else { - result.blobs_ = blobsBuilder_.build(); - } - if (((bitField0_ & 0x00800000) == 0x00800000)) { - blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); - bitField0_ = (bitField0_ & ~0x00800000); - } - result.blobsLr_ = blobsLr_; - if (((bitField0_ & 0x01000000) == 0x01000000)) { - weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); - bitField0_ = (bitField0_ & ~0x01000000); - } - result.weightDecay_ = weightDecay_; - if (((from_bitField0_ & 0x02000000) == 0x02000000)) { - to_bitField0_ |= 0x00400000; - } - result.randSkip_ = randSkip_; - if (((from_bitField0_ & 0x04000000) == 0x04000000)) { - to_bitField0_ |= 0x00800000; - } - result.detFgThreshold_ = detFgThreshold_; - if (((from_bitField0_ & 0x08000000) == 0x08000000)) { - to_bitField0_ |= 0x01000000; - } - result.detBgThreshold_ = detBgThreshold_; - if (((from_bitField0_ & 0x10000000) == 0x10000000)) { - to_bitField0_ |= 0x02000000; - } - result.detFgFraction_ = detFgFraction_; - if (((from_bitField0_ & 0x20000000) == 0x20000000)) { - to_bitField0_ |= 0x04000000; - } - result.detContextPad_ = detContextPad_; - if (((from_bitField0_ & 0x40000000) == 0x40000000)) { - to_bitField0_ |= 0x08000000; - } - result.detCropMode_ = detCropMode_; - if (((from_bitField0_ & 0x80000000) == 0x80000000)) { - to_bitField0_ |= 0x10000000; - } - result.newNum_ = newNum_; - if (((from_bitField1_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x20000000; - } - result.newChannels_ = newChannels_; - if (((from_bitField1_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x40000000; - } - result.newHeight_ = newHeight_; - if (((from_bitField1_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x80000000; - } - result.newWidth_ = newWidth_; - if (((from_bitField1_ & 0x00000008) == 0x00000008)) { - to_bitField1_ |= 0x00000001; - } - result.shuffleImages_ = shuffleImages_; - if (((from_bitField1_ & 0x00000010) == 0x00000010)) { - to_bitField1_ |= 0x00000002; - } - result.concatDim_ = concatDim_; - if (((from_bitField1_ & 0x00000020) == 0x00000020)) { - to_bitField1_ |= 0x00000004; - } - if (hdf5OutputParamBuilder_ == null) { - result.hdf5OutputParam_ = hdf5OutputParam_; - } else { - result.hdf5OutputParam_ = hdf5OutputParamBuilder_.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.V0LayerParameter) { - return mergeFrom((caffe.Caffe.V0LayerParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.V0LayerParameter other) { - if (other == caffe.Caffe.V0LayerParameter.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasType()) { - bitField0_ |= 0x00000002; - type_ = other.type_; - onChanged(); - } - if (other.hasNumOutput()) { - setNumOutput(other.getNumOutput()); - } - if (other.hasBiasterm()) { - setBiasterm(other.getBiasterm()); - } - if (other.hasWeightFiller()) { - mergeWeightFiller(other.getWeightFiller()); - } - if (other.hasBiasFiller()) { - mergeBiasFiller(other.getBiasFiller()); - } - if (other.hasPad()) { - setPad(other.getPad()); - } - if (other.hasKernelsize()) { - setKernelsize(other.getKernelsize()); - } - if (other.hasGroup()) { - setGroup(other.getGroup()); - } - if (other.hasStride()) { - setStride(other.getStride()); - } - if (other.hasPool()) { - setPool(other.getPool()); - } - if (other.hasDropoutRatio()) { - setDropoutRatio(other.getDropoutRatio()); - } - if (other.hasLocalSize()) { - setLocalSize(other.getLocalSize()); - } - if (other.hasAlpha()) { - setAlpha(other.getAlpha()); - } - if (other.hasBeta()) { - setBeta(other.getBeta()); - } - if (other.hasK()) { - setK(other.getK()); - } - if (other.hasSource()) { - bitField0_ |= 0x00010000; - source_ = other.source_; - onChanged(); - } - if (other.hasScale()) { - setScale(other.getScale()); - } - if (other.hasMeanfile()) { - bitField0_ |= 0x00040000; - meanfile_ = other.meanfile_; - onChanged(); - } - if (other.hasBatchsize()) { - setBatchsize(other.getBatchsize()); - } - if (other.hasCropsize()) { - setCropsize(other.getCropsize()); - } - if (other.hasMirror()) { - setMirror(other.getMirror()); - } - if (blobsBuilder_ == null) { - if (!other.blobs_.isEmpty()) { - if (blobs_.isEmpty()) { - blobs_ = other.blobs_; - bitField0_ = (bitField0_ & ~0x00400000); - } else { - ensureBlobsIsMutable(); - blobs_.addAll(other.blobs_); - } - onChanged(); - } - } else { - if (!other.blobs_.isEmpty()) { - if (blobsBuilder_.isEmpty()) { - blobsBuilder_.dispose(); - blobsBuilder_ = null; - blobs_ = other.blobs_; - bitField0_ = (bitField0_ & ~0x00400000); - blobsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlobsFieldBuilder() : null; - } else { - blobsBuilder_.addAllMessages(other.blobs_); - } - } - } - if (!other.blobsLr_.isEmpty()) { - if (blobsLr_.isEmpty()) { - blobsLr_ = other.blobsLr_; - bitField0_ = (bitField0_ & ~0x00800000); - } else { - ensureBlobsLrIsMutable(); - blobsLr_.addAll(other.blobsLr_); - } - onChanged(); - } - if (!other.weightDecay_.isEmpty()) { - if (weightDecay_.isEmpty()) { - weightDecay_ = other.weightDecay_; - bitField0_ = (bitField0_ & ~0x01000000); - } else { - ensureWeightDecayIsMutable(); - weightDecay_.addAll(other.weightDecay_); - } - onChanged(); - } - if (other.hasRandSkip()) { - setRandSkip(other.getRandSkip()); - } - if (other.hasDetFgThreshold()) { - setDetFgThreshold(other.getDetFgThreshold()); - } - if (other.hasDetBgThreshold()) { - setDetBgThreshold(other.getDetBgThreshold()); - } - if (other.hasDetFgFraction()) { - setDetFgFraction(other.getDetFgFraction()); - } - if (other.hasDetContextPad()) { - setDetContextPad(other.getDetContextPad()); - } - if (other.hasDetCropMode()) { - bitField0_ |= 0x40000000; - detCropMode_ = other.detCropMode_; - onChanged(); - } - if (other.hasNewNum()) { - setNewNum(other.getNewNum()); - } - if (other.hasNewChannels()) { - setNewChannels(other.getNewChannels()); - } - if (other.hasNewHeight()) { - setNewHeight(other.getNewHeight()); - } - if (other.hasNewWidth()) { - setNewWidth(other.getNewWidth()); - } - if (other.hasShuffleImages()) { - setShuffleImages(other.getShuffleImages()); - } - if (other.hasConcatDim()) { - setConcatDim(other.getConcatDim()); - } - if (other.hasHdf5OutputParam()) { - mergeHdf5OutputParam(other.getHdf5OutputParam()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.V0LayerParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.V0LayerParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - private int bitField1_; - - 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)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - 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; - } - - private java.lang.Object type_ = ""; - /** - * optional string type = 2; - * - *
-       * the string to specify the layer type
-       * 
- */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string type = 2; - * - *
-       * the string to specify the layer type
-       * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 2; - * - *
-       * the string to specify 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 string to specify 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 string to specify the layer type
-       * 
- */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000002); - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 2; - * - *
-       * the string to specify the layer type
-       * 
- */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - type_ = value; - onChanged(); - return this; - } - - private int numOutput_ ; - /** - * optional uint32 num_output = 3; - * - *
-       * Parameters to specify layers with inner products.
-       * 
- */ - public boolean hasNumOutput() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint32 num_output = 3; - * - *
-       * Parameters to specify layers with inner products.
-       * 
- */ - public int getNumOutput() { - return numOutput_; - } - /** - * optional uint32 num_output = 3; - * - *
-       * Parameters to specify layers with inner products.
-       * 
- */ - public Builder setNumOutput(int value) { - bitField0_ |= 0x00000004; - numOutput_ = value; - onChanged(); - return this; - } - /** - * optional uint32 num_output = 3; - * - *
-       * Parameters to specify layers with inner products.
-       * 
- */ - public Builder clearNumOutput() { - bitField0_ = (bitField0_ & ~0x00000004); - numOutput_ = 0; - onChanged(); - return this; - } - - private boolean biasterm_ = true; - /** - * optional bool biasterm = 4 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean hasBiasterm() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool biasterm = 4 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public boolean getBiasterm() { - return biasterm_; - } - /** - * optional bool biasterm = 4 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder setBiasterm(boolean value) { - bitField0_ |= 0x00000008; - biasterm_ = value; - onChanged(); - return this; - } - /** - * optional bool biasterm = 4 [default = true]; - * - *
-       * whether to have bias terms
-       * 
- */ - public Builder clearBiasterm() { - bitField0_ = (bitField0_ & ~0x00000008); - biasterm_ = true; - onChanged(); - return this; - } - - private caffe.Caffe.FillerParameter weightFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public boolean hasWeightFiller() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter getWeightFiller() { - if (weightFillerBuilder_ == null) { - return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } else { - return weightFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - weightFiller_ = value; - onChanged(); - } else { - weightFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder setWeightFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (weightFillerBuilder_ == null) { - weightFiller_ = builderForValue.build(); - onChanged(); - } else { - weightFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { - if (weightFillerBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - weightFiller_ != null && - weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - weightFiller_ = - caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); - } else { - weightFiller_ = value; - } - onChanged(); - } else { - weightFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public Builder clearWeightFiller() { - if (weightFillerBuilder_ == null) { - weightFiller_ = null; - onChanged(); - } else { - weightFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getWeightFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { - if (weightFillerBuilder_ != null) { - return weightFillerBuilder_.getMessageOrBuilder(); - } else { - return weightFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; - } - } - /** - * optional .caffe.FillerParameter weight_filler = 5; - * - *
-       * The filler for the weight
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getWeightFillerFieldBuilder() { - if (weightFillerBuilder_ == null) { - weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getWeightFiller(), - getParentForChildren(), - isClean()); - weightFiller_ = null; - } - return weightFillerBuilder_; - } - - private caffe.Caffe.FillerParameter biasFiller_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public boolean hasBiasFiller() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter getBiasFiller() { - if (biasFillerBuilder_ == null) { - return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } else { - return biasFillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - biasFiller_ = value; - onChanged(); - } else { - biasFillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder setBiasFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (biasFillerBuilder_ == null) { - biasFiller_ = builderForValue.build(); - onChanged(); - } else { - biasFillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { - if (biasFillerBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020) && - biasFiller_ != null && - biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - biasFiller_ = - caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); - } else { - biasFiller_ = value; - } - onChanged(); - } else { - biasFillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public Builder clearBiasFiller() { - if (biasFillerBuilder_ == null) { - biasFiller_ = null; - onChanged(); - } else { - biasFillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getBiasFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { - if (biasFillerBuilder_ != null) { - return biasFillerBuilder_.getMessageOrBuilder(); - } else { - return biasFiller_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; - } - } - /** - * optional .caffe.FillerParameter bias_filler = 6; - * - *
-       * The filler for the bias
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getBiasFillerFieldBuilder() { - if (biasFillerBuilder_ == null) { - biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getBiasFiller(), - getParentForChildren(), - isClean()); - biasFiller_ = null; - } - return biasFillerBuilder_; - } - - private int pad_ ; - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-       * The padding size
-       * 
- */ - public boolean hasPad() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-       * The padding size
-       * 
- */ - public int getPad() { - return pad_; - } - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-       * The padding size
-       * 
- */ - public Builder setPad(int value) { - bitField0_ |= 0x00000040; - pad_ = value; - onChanged(); - return this; - } - /** - * optional uint32 pad = 7 [default = 0]; - * - *
-       * The padding size
-       * 
- */ - public Builder clearPad() { - bitField0_ = (bitField0_ & ~0x00000040); - pad_ = 0; - onChanged(); - return this; - } - - private int kernelsize_ ; - /** - * optional uint32 kernelsize = 8; - * - *
-       * The kernel size
-       * 
- */ - public boolean hasKernelsize() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional uint32 kernelsize = 8; - * - *
-       * The kernel size
-       * 
- */ - public int getKernelsize() { - return kernelsize_; - } - /** - * optional uint32 kernelsize = 8; - * - *
-       * The kernel size
-       * 
- */ - public Builder setKernelsize(int value) { - bitField0_ |= 0x00000080; - kernelsize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 kernelsize = 8; - * - *
-       * The kernel size
-       * 
- */ - public Builder clearKernelsize() { - bitField0_ = (bitField0_ & ~0x00000080); - kernelsize_ = 0; - onChanged(); - return this; - } - - private int group_ = 1; - /** - * optional uint32 group = 9 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public boolean hasGroup() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional uint32 group = 9 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public int getGroup() { - return group_; - } - /** - * optional uint32 group = 9 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public Builder setGroup(int value) { - bitField0_ |= 0x00000100; - group_ = value; - onChanged(); - return this; - } - /** - * optional uint32 group = 9 [default = 1]; - * - *
-       * The group size for group conv
-       * 
- */ - public Builder clearGroup() { - bitField0_ = (bitField0_ & ~0x00000100); - group_ = 1; - onChanged(); - return this; - } - - private int stride_ = 1; - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-       * The stride
-       * 
- */ - public boolean hasStride() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-       * The stride
-       * 
- */ - public int getStride() { - return stride_; - } - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-       * The stride
-       * 
- */ - public Builder setStride(int value) { - bitField0_ |= 0x00000200; - stride_ = value; - onChanged(); - return this; - } - /** - * optional uint32 stride = 10 [default = 1]; - * - *
-       * The stride
-       * 
- */ - public Builder clearStride() { - bitField0_ = (bitField0_ & ~0x00000200); - stride_ = 1; - onChanged(); - return this; - } - - private int pool_ = 0; - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public boolean hasPool() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public caffe.Caffe.V0LayerParameter.PoolMethod getPool() { - caffe.Caffe.V0LayerParameter.PoolMethod result = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(pool_); - return result == null ? caffe.Caffe.V0LayerParameter.PoolMethod.MAX : result; - } - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder setPool(caffe.Caffe.V0LayerParameter.PoolMethod value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - pool_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; - * - *
-       * The pooling method
-       * 
- */ - public Builder clearPool() { - bitField0_ = (bitField0_ & ~0x00000400); - pool_ = 0; - onChanged(); - return this; - } - - private float dropoutRatio_ = 0.5F; - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public boolean hasDropoutRatio() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public float getDropoutRatio() { - return dropoutRatio_; - } - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public Builder setDropoutRatio(float value) { - bitField0_ |= 0x00000800; - dropoutRatio_ = value; - onChanged(); - return this; - } - /** - * optional float dropout_ratio = 12 [default = 0.5]; - * - *
-       * dropout ratio
-       * 
- */ - public Builder clearDropoutRatio() { - bitField0_ = (bitField0_ & ~0x00000800); - dropoutRatio_ = 0.5F; - onChanged(); - return this; - } - - private int localSize_ = 5; - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-       * for local response norm
-       * 
- */ - public boolean hasLocalSize() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-       * for local response norm
-       * 
- */ - public int getLocalSize() { - return localSize_; - } - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-       * for local response norm
-       * 
- */ - public Builder setLocalSize(int value) { - bitField0_ |= 0x00001000; - localSize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 local_size = 13 [default = 5]; - * - *
-       * for local response norm
-       * 
- */ - public Builder clearLocalSize() { - bitField0_ = (bitField0_ & ~0x00001000); - localSize_ = 5; - onChanged(); - return this; - } - - private float alpha_ = 1F; - /** - * optional float alpha = 14 [default = 1]; - * - *
-       * for local response norm
-       * 
- */ - public boolean hasAlpha() { - return ((bitField0_ & 0x00002000) == 0x00002000); - } - /** - * optional float alpha = 14 [default = 1]; - * - *
-       * for local response norm
-       * 
- */ - public float getAlpha() { - return alpha_; - } - /** - * optional float alpha = 14 [default = 1]; - * - *
-       * for local response norm
-       * 
- */ - public Builder setAlpha(float value) { - bitField0_ |= 0x00002000; - alpha_ = value; - onChanged(); - return this; - } - /** - * optional float alpha = 14 [default = 1]; - * - *
-       * for local response norm
-       * 
- */ - public Builder clearAlpha() { - bitField0_ = (bitField0_ & ~0x00002000); - alpha_ = 1F; - onChanged(); - return this; - } - - private float beta_ = 0.75F; - /** - * optional float beta = 15 [default = 0.75]; - * - *
-       * for local response norm
-       * 
- */ - public boolean hasBeta() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional float beta = 15 [default = 0.75]; - * - *
-       * for local response norm
-       * 
- */ - public float getBeta() { - return beta_; - } - /** - * optional float beta = 15 [default = 0.75]; - * - *
-       * for local response norm
-       * 
- */ - public Builder setBeta(float value) { - bitField0_ |= 0x00004000; - beta_ = value; - onChanged(); - return this; - } - /** - * optional float beta = 15 [default = 0.75]; - * - *
-       * for local response norm
-       * 
- */ - public Builder clearBeta() { - bitField0_ = (bitField0_ & ~0x00004000); - beta_ = 0.75F; - onChanged(); - return this; - } - - private float k_ = 1F; - /** - * optional float k = 22 [default = 1]; - */ - public boolean hasK() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional float k = 22 [default = 1]; - */ - public float getK() { - return k_; - } - /** - * optional float k = 22 [default = 1]; - */ - public Builder setK(float value) { - bitField0_ |= 0x00008000; - k_ = value; - onChanged(); - return this; - } - /** - * optional float k = 22 [default = 1]; - */ - public Builder clearK() { - bitField0_ = (bitField0_ & ~0x00008000); - k_ = 1F; - onChanged(); - return this; - } - - private java.lang.Object source_ = ""; - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public boolean hasSource() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public Builder setSource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - source_ = value; - onChanged(); - return this; - } - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00010000); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - * optional string source = 16; - * - *
-       * For data layers, specify the data source
-       * 
- */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - source_ = value; - onChanged(); - return this; - } - - private float scale_ = 1F; - /** - * optional float scale = 17 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public boolean hasScale() { - return ((bitField0_ & 0x00020000) == 0x00020000); - } - /** - * optional float scale = 17 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public float getScale() { - return scale_; - } - /** - * optional float scale = 17 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder setScale(float value) { - bitField0_ |= 0x00020000; - scale_ = value; - onChanged(); - return this; - } - /** - * optional float scale = 17 [default = 1]; - * - *
-       * For data pre-processing, we can do simple scaling and subtracting the
-       * data mean, if provided. Note that the mean subtraction is always carried
-       * out before scaling.
-       * 
- */ - public Builder clearScale() { - bitField0_ = (bitField0_ & ~0x00020000); - scale_ = 1F; - onChanged(); - return this; - } - - private java.lang.Object meanfile_ = ""; - /** - * optional string meanfile = 18; - */ - public boolean hasMeanfile() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional string meanfile = 18; - */ - public java.lang.String getMeanfile() { - java.lang.Object ref = meanfile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - meanfile_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string meanfile = 18; - */ - public com.google.protobuf.ByteString - getMeanfileBytes() { - java.lang.Object ref = meanfile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - meanfile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string meanfile = 18; - */ - public Builder setMeanfile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00040000; - meanfile_ = value; - onChanged(); - return this; - } - /** - * optional string meanfile = 18; - */ - public Builder clearMeanfile() { - bitField0_ = (bitField0_ & ~0x00040000); - meanfile_ = getDefaultInstance().getMeanfile(); - onChanged(); - return this; - } - /** - * optional string meanfile = 18; - */ - public Builder setMeanfileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00040000; - meanfile_ = value; - onChanged(); - return this; - } - - private int batchsize_ ; - /** - * optional uint32 batchsize = 19; - * - *
-       * For data layers, specify the batch size.
-       * 
- */ - public boolean hasBatchsize() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional uint32 batchsize = 19; - * - *
-       * For data layers, specify the batch size.
-       * 
- */ - public int getBatchsize() { - return batchsize_; - } - /** - * optional uint32 batchsize = 19; - * - *
-       * For data layers, specify the batch size.
-       * 
- */ - public Builder setBatchsize(int value) { - bitField0_ |= 0x00080000; - batchsize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 batchsize = 19; - * - *
-       * For data layers, specify the batch size.
-       * 
- */ - public Builder clearBatchsize() { - bitField0_ = (bitField0_ & ~0x00080000); - batchsize_ = 0; - onChanged(); - return this; - } - - private int cropsize_ ; - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-       * For data layers, specify if we would like to randomly crop an image.
-       * 
- */ - public boolean hasCropsize() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-       * For data layers, specify if we would like to randomly crop an image.
-       * 
- */ - public int getCropsize() { - return cropsize_; - } - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-       * For data layers, specify if we would like to randomly crop an image.
-       * 
- */ - public Builder setCropsize(int value) { - bitField0_ |= 0x00100000; - cropsize_ = value; - onChanged(); - return this; - } - /** - * optional uint32 cropsize = 20 [default = 0]; - * - *
-       * For data layers, specify if we would like to randomly crop an image.
-       * 
- */ - public Builder clearCropsize() { - bitField0_ = (bitField0_ & ~0x00100000); - cropsize_ = 0; - onChanged(); - return this; - } - - private boolean mirror_ ; - /** - * optional bool mirror = 21 [default = false]; - * - *
-       * For data layers, specify if we want to randomly mirror data.
-       * 
- */ - public boolean hasMirror() { - return ((bitField0_ & 0x00200000) == 0x00200000); - } - /** - * optional bool mirror = 21 [default = false]; - * - *
-       * For data layers, specify if we want to randomly mirror data.
-       * 
- */ - public boolean getMirror() { - return mirror_; - } - /** - * optional bool mirror = 21 [default = false]; - * - *
-       * For data layers, specify if we want to randomly mirror data.
-       * 
- */ - public Builder setMirror(boolean value) { - bitField0_ |= 0x00200000; - mirror_ = value; - onChanged(); - return this; - } - /** - * optional bool mirror = 21 [default = false]; - * - *
-       * For data layers, specify if we want to randomly mirror data.
-       * 
- */ - public Builder clearMirror() { - bitField0_ = (bitField0_ & ~0x00200000); - mirror_ = false; - onChanged(); - return this; - } - - private java.util.List blobs_ = - java.util.Collections.emptyList(); - private void ensureBlobsIsMutable() { - if (!((bitField0_ & 0x00400000) == 0x00400000)) { - blobs_ = new java.util.ArrayList(blobs_); - bitField0_ |= 0x00400000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; - - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public java.util.List getBlobsList() { - if (blobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(blobs_); - } else { - return blobsBuilder_.getMessageList(); - } - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public int getBlobsCount() { - if (blobsBuilder_ == null) { - return blobs_.size(); - } else { - return blobsBuilder_.getCount(); - } - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public caffe.Caffe.BlobProto getBlobs(int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); - } else { - return blobsBuilder_.getMessage(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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 = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public Builder addAllBlobs( - java.lang.Iterable values) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blobs_); - onChanged(); - } else { - blobsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public Builder clearBlobs() { - if (blobsBuilder_ == null) { - blobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00400000); - onChanged(); - } else { - blobsBuilder_.clear(); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public Builder removeBlobs(int index) { - if (blobsBuilder_ == null) { - ensureBlobsIsMutable(); - blobs_.remove(index); - onChanged(); - } else { - blobsBuilder_.remove(index); - } - return this; - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public caffe.Caffe.BlobProto.Builder getBlobsBuilder( - int index) { - return getBlobsFieldBuilder().getBuilder(index); - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( - int index) { - if (blobsBuilder_ == null) { - return blobs_.get(index); } else { - return blobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public java.util.List - getBlobsOrBuilderList() { - if (blobsBuilder_ != null) { - return blobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blobs_); - } - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { - return getBlobsFieldBuilder().addBuilder( - caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - public caffe.Caffe.BlobProto.Builder addBlobsBuilder( - int index) { - return getBlobsFieldBuilder().addBuilder( - index, caffe.Caffe.BlobProto.getDefaultInstance()); - } - /** - * repeated .caffe.BlobProto blobs = 50; - * - *
-       * The blobs containing the numeric parameters of the layer
-       * 
- */ - 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_ & 0x00400000) == 0x00400000), - getParentForChildren(), - isClean()); - blobs_ = null; - } - return blobsBuilder_; - } - - private java.util.List blobsLr_ = java.util.Collections.emptyList(); - private void ensureBlobsLrIsMutable() { - if (!((bitField0_ & 0x00800000) == 0x00800000)) { - blobsLr_ = new java.util.ArrayList(blobsLr_); - bitField0_ |= 0x00800000; - } - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public java.util.List - getBlobsLrList() { - return java.util.Collections.unmodifiableList(blobsLr_); - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public int getBlobsLrCount() { - return blobsLr_.size(); - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public float getBlobsLr(int index) { - return blobsLr_.get(index); - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public Builder setBlobsLr( - int index, float value) { - ensureBlobsLrIsMutable(); - blobsLr_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public Builder addBlobsLr(float value) { - ensureBlobsLrIsMutable(); - blobsLr_.add(value); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public Builder addAllBlobsLr( - java.lang.Iterable values) { - ensureBlobsLrIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blobsLr_); - onChanged(); - return this; - } - /** - * repeated float blobs_lr = 51; - * - *
-       * The ratio that is multiplied on the global learning rate. If you want to
-       * set the learning ratio for one blob, you need to set it for all blobs.
-       * 
- */ - public Builder clearBlobsLr() { - blobsLr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00800000); - onChanged(); - return this; - } - - private java.util.List weightDecay_ = java.util.Collections.emptyList(); - private void ensureWeightDecayIsMutable() { - if (!((bitField0_ & 0x01000000) == 0x01000000)) { - weightDecay_ = new java.util.ArrayList(weightDecay_); - bitField0_ |= 0x01000000; - } - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public java.util.List - getWeightDecayList() { - return java.util.Collections.unmodifiableList(weightDecay_); - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public int getWeightDecayCount() { - return weightDecay_.size(); - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public float getWeightDecay(int index) { - return weightDecay_.get(index); - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public Builder setWeightDecay( - int index, float value) { - ensureWeightDecayIsMutable(); - weightDecay_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public Builder addWeightDecay(float value) { - ensureWeightDecayIsMutable(); - weightDecay_.add(value); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public Builder addAllWeightDecay( - java.lang.Iterable values) { - ensureWeightDecayIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, weightDecay_); - onChanged(); - return this; - } - /** - * repeated float weight_decay = 52; - * - *
-       * The weight decay that is multiplied on the global weight decay.
-       * 
- */ - public Builder clearWeightDecay() { - weightDecay_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x01000000); - onChanged(); - return this; - } - - private int randSkip_ ; - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public boolean hasRandSkip() { - return ((bitField0_ & 0x02000000) == 0x02000000); - } - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public int getRandSkip() { - return randSkip_; - } - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public Builder setRandSkip(int value) { - bitField0_ |= 0x02000000; - randSkip_ = value; - onChanged(); - return this; - } - /** - * optional uint32 rand_skip = 53 [default = 0]; - * - *
-       * The rand_skip variable is for the data layer to skip a few data points
-       * to avoid all asynchronous sgd clients to start at the same point. The skip
-       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
-       * be larger than the number of keys in the database.
-       * 
- */ - public Builder clearRandSkip() { - bitField0_ = (bitField0_ & ~0x02000000); - randSkip_ = 0; - onChanged(); - return this; - } - - private float detFgThreshold_ = 0.5F; - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-       * Fields related to detection (det_*)
-       * foreground (object) overlap threshold
-       * 
- */ - public boolean hasDetFgThreshold() { - return ((bitField0_ & 0x04000000) == 0x04000000); - } - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-       * Fields related to detection (det_*)
-       * foreground (object) overlap threshold
-       * 
- */ - public float getDetFgThreshold() { - return detFgThreshold_; - } - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-       * Fields related to detection (det_*)
-       * foreground (object) overlap threshold
-       * 
- */ - public Builder setDetFgThreshold(float value) { - bitField0_ |= 0x04000000; - detFgThreshold_ = value; - onChanged(); - return this; - } - /** - * optional float det_fg_threshold = 54 [default = 0.5]; - * - *
-       * Fields related to detection (det_*)
-       * foreground (object) overlap threshold
-       * 
- */ - public Builder clearDetFgThreshold() { - bitField0_ = (bitField0_ & ~0x04000000); - detFgThreshold_ = 0.5F; - onChanged(); - return this; - } - - private float detBgThreshold_ = 0.5F; - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-       * background (non-object) overlap threshold
-       * 
- */ - public boolean hasDetBgThreshold() { - return ((bitField0_ & 0x08000000) == 0x08000000); - } - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-       * background (non-object) overlap threshold
-       * 
- */ - public float getDetBgThreshold() { - return detBgThreshold_; - } - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-       * background (non-object) overlap threshold
-       * 
- */ - public Builder setDetBgThreshold(float value) { - bitField0_ |= 0x08000000; - detBgThreshold_ = value; - onChanged(); - return this; - } - /** - * optional float det_bg_threshold = 55 [default = 0.5]; - * - *
-       * background (non-object) overlap threshold
-       * 
- */ - public Builder clearDetBgThreshold() { - bitField0_ = (bitField0_ & ~0x08000000); - detBgThreshold_ = 0.5F; - onChanged(); - return this; - } - - private float detFgFraction_ = 0.25F; - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public boolean hasDetFgFraction() { - return ((bitField0_ & 0x10000000) == 0x10000000); - } - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public float getDetFgFraction() { - return detFgFraction_; - } - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public Builder setDetFgFraction(float value) { - bitField0_ |= 0x10000000; - detFgFraction_ = value; - onChanged(); - return this; - } - /** - * optional float det_fg_fraction = 56 [default = 0.25]; - * - *
-       * Fraction of batch that should be foreground objects
-       * 
- */ - public Builder clearDetFgFraction() { - bitField0_ = (bitField0_ & ~0x10000000); - detFgFraction_ = 0.25F; - onChanged(); - return this; - } - - private int detContextPad_ ; - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public boolean hasDetContextPad() { - return ((bitField0_ & 0x20000000) == 0x20000000); - } - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public int getDetContextPad() { - return detContextPad_; - } - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public Builder setDetContextPad(int value) { - bitField0_ |= 0x20000000; - detContextPad_ = value; - onChanged(); - return this; - } - /** - * optional uint32 det_context_pad = 58 [default = 0]; - * - *
-       * Amount of contextual padding to add around a window
-       * (used only by the window_data_layer)
-       * 
- */ - public Builder clearDetContextPad() { - bitField0_ = (bitField0_ & ~0x20000000); - detContextPad_ = 0; - onChanged(); - return this; - } - - private java.lang.Object detCropMode_ = "warp"; - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public boolean hasDetCropMode() { - return ((bitField0_ & 0x40000000) == 0x40000000); - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public java.lang.String getDetCropMode() { - java.lang.Object ref = detCropMode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - detCropMode_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public com.google.protobuf.ByteString - getDetCropModeBytes() { - java.lang.Object ref = detCropMode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detCropMode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder setDetCropMode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x40000000; - detCropMode_ = value; - onChanged(); - return this; - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder clearDetCropMode() { - bitField0_ = (bitField0_ & ~0x40000000); - detCropMode_ = getDefaultInstance().getDetCropMode(); - onChanged(); - return this; - } - /** - * optional string det_crop_mode = 59 [default = "warp"]; - * - *
-       * Mode for cropping out a detection window
-       * warp: cropped window is warped to a fixed size and aspect ratio
-       * square: the tightest square around the window is cropped
-       * 
- */ - public Builder setDetCropModeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x40000000; - detCropMode_ = value; - onChanged(); - return this; - } - - private int newNum_ ; - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-       * For ReshapeLayer, one needs to specify the new dimensions.
-       * 
- */ - public boolean hasNewNum() { - return ((bitField0_ & 0x80000000) == 0x80000000); - } - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-       * For ReshapeLayer, one needs to specify the new dimensions.
-       * 
- */ - public int getNewNum() { - return newNum_; - } - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-       * For ReshapeLayer, one needs to specify the new dimensions.
-       * 
- */ - public Builder setNewNum(int value) { - bitField0_ |= 0x80000000; - newNum_ = value; - onChanged(); - return this; - } - /** - * optional int32 new_num = 60 [default = 0]; - * - *
-       * For ReshapeLayer, one needs to specify the new dimensions.
-       * 
- */ - public Builder clearNewNum() { - bitField0_ = (bitField0_ & ~0x80000000); - newNum_ = 0; - onChanged(); - return this; - } - - private int newChannels_ ; - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public boolean hasNewChannels() { - return ((bitField1_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public int getNewChannels() { - return newChannels_; - } - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public Builder setNewChannels(int value) { - bitField1_ |= 0x00000001; - newChannels_ = value; - onChanged(); - return this; - } - /** - * optional int32 new_channels = 61 [default = 0]; - */ - public Builder clearNewChannels() { - bitField1_ = (bitField1_ & ~0x00000001); - newChannels_ = 0; - onChanged(); - return this; - } - - private int newHeight_ ; - /** - * optional int32 new_height = 62 [default = 0]; - */ - public boolean hasNewHeight() { - return ((bitField1_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 new_height = 62 [default = 0]; - */ - public int getNewHeight() { - return newHeight_; - } - /** - * optional int32 new_height = 62 [default = 0]; - */ - public Builder setNewHeight(int value) { - bitField1_ |= 0x00000002; - newHeight_ = value; - onChanged(); - return this; - } - /** - * optional int32 new_height = 62 [default = 0]; - */ - public Builder clearNewHeight() { - bitField1_ = (bitField1_ & ~0x00000002); - newHeight_ = 0; - onChanged(); - return this; - } - - private int newWidth_ ; - /** - * optional int32 new_width = 63 [default = 0]; - */ - public boolean hasNewWidth() { - return ((bitField1_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 new_width = 63 [default = 0]; - */ - public int getNewWidth() { - return newWidth_; - } - /** - * optional int32 new_width = 63 [default = 0]; - */ - public Builder setNewWidth(int value) { - bitField1_ |= 0x00000004; - newWidth_ = value; - onChanged(); - return this; - } - /** - * optional int32 new_width = 63 [default = 0]; - */ - public Builder clearNewWidth() { - bitField1_ = (bitField1_ & ~0x00000004); - newWidth_ = 0; - onChanged(); - return this; - } - - private boolean shuffleImages_ ; - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public boolean hasShuffleImages() { - return ((bitField1_ & 0x00000008) == 0x00000008); - } - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public boolean getShuffleImages() { - return shuffleImages_; - } - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public Builder setShuffleImages(boolean value) { - bitField1_ |= 0x00000008; - shuffleImages_ = value; - onChanged(); - return this; - } - /** - * optional bool shuffle_images = 64 [default = false]; - * - *
-       * Whether or not ImageLayer should shuffle the list of files at every epoch.
-       * It will also resize images if new_height or new_width are not zero.
-       * 
- */ - public Builder clearShuffleImages() { - bitField1_ = (bitField1_ & ~0x00000008); - shuffleImages_ = false; - onChanged(); - return this; - } - - private int concatDim_ = 1; - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-       * For ConcatLayer, one needs to specify the dimension for concatenation, and
-       * the other dimensions must be the same for all the bottom blobs.
-       * By default it will concatenate blobs along the channels dimension.
-       * 
- */ - public boolean hasConcatDim() { - return ((bitField1_ & 0x00000010) == 0x00000010); - } - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-       * For ConcatLayer, one needs to specify the dimension for concatenation, and
-       * the other dimensions must be the same for all the bottom blobs.
-       * By default it will concatenate blobs along the channels dimension.
-       * 
- */ - public int getConcatDim() { - return concatDim_; - } - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-       * For ConcatLayer, one needs to specify the dimension for concatenation, and
-       * the other dimensions must be the same for all the bottom blobs.
-       * By default it will concatenate blobs along the channels dimension.
-       * 
- */ - public Builder setConcatDim(int value) { - bitField1_ |= 0x00000010; - concatDim_ = value; - onChanged(); - return this; - } - /** - * optional uint32 concat_dim = 65 [default = 1]; - * - *
-       * For ConcatLayer, one needs to specify the dimension for concatenation, and
-       * the other dimensions must be the same for all the bottom blobs.
-       * By default it will concatenate blobs along the channels dimension.
-       * 
- */ - public Builder clearConcatDim() { - bitField1_ = (bitField1_ & ~0x00000010); - concatDim_ = 1; - onChanged(); - return this; - } - - private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public boolean hasHdf5OutputParam() { - return ((bitField1_ & 0x00000020) == 0x00000020); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } else { - return hdf5OutputParamBuilder_.getMessage(); - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hdf5OutputParam_ = value; - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public Builder setHdf5OutputParam( - caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = builderForValue.build(); - onChanged(); - } else { - hdf5OutputParamBuilder_.setMessage(builderForValue.build()); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { - if (hdf5OutputParamBuilder_ == null) { - if (((bitField1_ & 0x00000020) == 0x00000020) && - hdf5OutputParam_ != null && - hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { - hdf5OutputParam_ = - caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); - } else { - hdf5OutputParam_ = value; - } - onChanged(); - } else { - hdf5OutputParamBuilder_.mergeFrom(value); - } - bitField1_ |= 0x00000020; - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public Builder clearHdf5OutputParam() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParam_ = null; - onChanged(); - } else { - hdf5OutputParamBuilder_.clear(); - } - bitField1_ = (bitField1_ & ~0x00000020); - return this; - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { - bitField1_ |= 0x00000020; - onChanged(); - return getHdf5OutputParamFieldBuilder().getBuilder(); - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { - if (hdf5OutputParamBuilder_ != null) { - return hdf5OutputParamBuilder_.getMessageOrBuilder(); - } else { - return hdf5OutputParam_ == null ? - caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; - } - } - /** - * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; - */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> - getHdf5OutputParamFieldBuilder() { - if (hdf5OutputParamBuilder_ == null) { - hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( - getHdf5OutputParam(), - getParentForChildren(), - isClean()); - hdf5OutputParam_ = null; - } - return hdf5OutputParamBuilder_; - } - - // @@protoc_insertion_point(builder_scope:caffe.V0LayerParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.V0LayerParameter) - private static final caffe.Caffe.V0LayerParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.V0LayerParameter(); - } - - public static caffe.Caffe.V0LayerParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public V0LayerParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new V0LayerParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.V0LayerParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PReLUParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:caffe.PReLUParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - boolean hasFiller(); - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - caffe.Caffe.FillerParameter getFiller(); - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder(); - - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-     * Whether or not slope paramters are shared across channels.
-     * 
- */ - boolean hasChannelShared(); - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-     * Whether or not slope paramters are shared across channels.
-     * 
- */ - boolean getChannelShared(); - } - /** - * Protobuf type {@code caffe.PReLUParameter} - * - *
-   * Parametric ReLU described in K. He et al, Delving Deep into Rectifiers:
-   * Surpassing Human-Level Performance on ImageNet Classification, 2015.
-   * 
- */ - public static final class PReLUParameter extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:caffe.PReLUParameter) - PReLUParameterOrBuilder { - // Use PReLUParameter.newBuilder() to construct. - private PReLUParameter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PReLUParameter() { - channelShared_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PReLUParameter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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: { - caffe.Caffe.FillerParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = filler_.toBuilder(); - } - filler_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(filler_); - filler_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - bitField0_ |= 0x00000002; - channelShared_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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_PReLUParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PReLUParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PReLUParameter.class, caffe.Caffe.PReLUParameter.Builder.class); - } - - private int bitField0_; - public static final int FILLER_FIELD_NUMBER = 1; - private caffe.Caffe.FillerParameter filler_; - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - public boolean hasFiller() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - public caffe.Caffe.FillerParameter getFiller() { - return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-     * Initial value of a_i. Default is a_i=0.25 for all i.
-     * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { - return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; - } - - public static final int CHANNEL_SHARED_FIELD_NUMBER = 2; - private boolean channelShared_; - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-     * Whether or not slope paramters are shared across channels.
-     * 
- */ - public boolean hasChannelShared() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-     * Whether or not slope paramters are shared across channels.
-     * 
- */ - public boolean getChannelShared() { - return channelShared_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, getFiller()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, channelShared_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFiller()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, channelShared_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static caffe.Caffe.PReLUParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PReLUParameter 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.PReLUParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static caffe.Caffe.PReLUParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static caffe.Caffe.PReLUParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PReLUParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static caffe.Caffe.PReLUParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static caffe.Caffe.PReLUParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static caffe.Caffe.PReLUParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static caffe.Caffe.PReLUParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(caffe.Caffe.PReLUParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code caffe.PReLUParameter} - * - *
-     * Parametric ReLU described in K. He et al, Delving Deep into Rectifiers:
-     * Surpassing Human-Level Performance on ImageNet Classification, 2015.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:caffe.PReLUParameter) - caffe.Caffe.PReLUParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return caffe.Caffe.internal_static_caffe_PReLUParameter_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return caffe.Caffe.internal_static_caffe_PReLUParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - caffe.Caffe.PReLUParameter.class, caffe.Caffe.PReLUParameter.Builder.class); - } - - // Construct using caffe.Caffe.PReLUParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFillerFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (fillerBuilder_ == null) { - filler_ = null; - } else { - fillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - channelShared_ = false; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return caffe.Caffe.internal_static_caffe_PReLUParameter_descriptor; - } - - public caffe.Caffe.PReLUParameter getDefaultInstanceForType() { - return caffe.Caffe.PReLUParameter.getDefaultInstance(); - } - - public caffe.Caffe.PReLUParameter build() { - caffe.Caffe.PReLUParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public caffe.Caffe.PReLUParameter buildPartial() { - caffe.Caffe.PReLUParameter result = new caffe.Caffe.PReLUParameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (fillerBuilder_ == null) { - result.filler_ = filler_; - } else { - result.filler_ = fillerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.channelShared_ = channelShared_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof caffe.Caffe.PReLUParameter) { - return mergeFrom((caffe.Caffe.PReLUParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(caffe.Caffe.PReLUParameter other) { - if (other == caffe.Caffe.PReLUParameter.getDefaultInstance()) return this; - if (other.hasFiller()) { - mergeFiller(other.getFiller()); - } - if (other.hasChannelShared()) { - setChannelShared(other.getChannelShared()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - caffe.Caffe.PReLUParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (caffe.Caffe.PReLUParameter) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private caffe.Caffe.FillerParameter filler_ = null; - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> fillerBuilder_; - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public boolean hasFiller() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public caffe.Caffe.FillerParameter getFiller() { - if (fillerBuilder_ == null) { - return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; - } else { - return fillerBuilder_.getMessage(); - } - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public Builder setFiller(caffe.Caffe.FillerParameter value) { - if (fillerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - filler_ = value; - onChanged(); - } else { - fillerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public Builder setFiller( - caffe.Caffe.FillerParameter.Builder builderForValue) { - if (fillerBuilder_ == null) { - filler_ = builderForValue.build(); - onChanged(); - } else { - fillerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public Builder mergeFiller(caffe.Caffe.FillerParameter value) { - if (fillerBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - filler_ != null && - filler_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { - filler_ = - caffe.Caffe.FillerParameter.newBuilder(filler_).mergeFrom(value).buildPartial(); - } else { - filler_ = value; - } - onChanged(); - } else { - fillerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public Builder clearFiller() { - if (fillerBuilder_ == null) { - filler_ = null; - onChanged(); - } else { - fillerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public caffe.Caffe.FillerParameter.Builder getFillerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFillerFieldBuilder().getBuilder(); - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { - if (fillerBuilder_ != null) { - return fillerBuilder_.getMessageOrBuilder(); - } else { - return filler_ == null ? - caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; - } - } - /** - * optional .caffe.FillerParameter filler = 1; - * - *
-       * Initial value of a_i. Default is a_i=0.25 for all i.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> - getFillerFieldBuilder() { - if (fillerBuilder_ == null) { - fillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( - getFiller(), - getParentForChildren(), - isClean()); - filler_ = null; - } - return fillerBuilder_; - } - - private boolean channelShared_ ; - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-       * Whether or not slope paramters are shared across channels.
-       * 
- */ - public boolean hasChannelShared() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-       * Whether or not slope paramters are shared across channels.
-       * 
- */ - public boolean getChannelShared() { - return channelShared_; - } - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-       * Whether or not slope paramters are shared across channels.
-       * 
- */ - public Builder setChannelShared(boolean value) { - bitField0_ |= 0x00000002; - channelShared_ = value; - onChanged(); - return this; - } - /** - * optional bool channel_shared = 2 [default = false]; - * - *
-       * Whether or not slope paramters are shared across channels.
-       * 
- */ - public Builder clearChannelShared() { - bitField0_ = (bitField0_ & ~0x00000002); - channelShared_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:caffe.PReLUParameter) - } - - // @@protoc_insertion_point(class_scope:caffe.PReLUParameter) - private static final caffe.Caffe.PReLUParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new caffe.Caffe.PReLUParameter(); - } - - public static caffe.Caffe.PReLUParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PReLUParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PReLUParameter(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public caffe.Caffe.PReLUParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_BlobShape_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_BlobShape_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_BlobProto_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_BlobProto_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_BlobProtoVector_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_BlobProtoVector_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_Datum_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_Datum_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_FillerParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_FillerParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_NetParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_NetParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SolverParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SolverParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SolverState_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SolverState_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_NetState_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_NetState_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_NetStateRule_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_NetStateRule_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ParamSpec_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ParamSpec_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_LayerParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_LayerParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_TransformationParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_TransformationParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_LossParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_LossParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_AccuracyParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_AccuracyParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ArgMaxParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ArgMaxParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ConcatParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ConcatParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ContrastiveLossParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ConvolutionParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ConvolutionParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_DataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_DataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_DropoutParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_DropoutParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_DummyDataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_DummyDataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_EltwiseParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_EltwiseParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_EmbedParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_EmbedParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ExpParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ExpParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_FlattenParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_FlattenParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_HDF5DataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_HDF5DataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_HDF5OutputParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_HDF5OutputParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_HingeLossParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_HingeLossParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ImageDataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ImageDataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_InfogainLossParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_InfogainLossParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_InnerProductParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_InnerProductParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_LogParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_LogParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_LRNParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_LRNParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_MemoryDataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_MemoryDataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_MVNParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_MVNParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_PoolingParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_PoolingParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_PowerParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_PowerParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_PythonParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_PythonParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ReductionParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ReductionParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ReLUParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ReLUParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ReshapeParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ReshapeParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SigmoidParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SigmoidParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SliceParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SliceParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SoftmaxParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SoftmaxParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_TanHParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_TanHParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_TileParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_TileParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_ThresholdParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_ThresholdParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_WindowDataParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_WindowDataParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_SPPParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_SPPParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_V1LayerParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_V1LayerParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_V0LayerParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_V0LayerParameter_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_caffe_PReLUParameter_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_caffe_PReLUParameter_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\013caffe.proto\022\005caffe\"\034\n\tBlobShape\022\017\n\003dim" + - "\030\001 \003(\003B\002\020\001\"\314\001\n\tBlobProto\022\037\n\005shape\030\007 \001(\0132" + - "\020.caffe.BlobShape\022\020\n\004data\030\005 \003(\002B\002\020\001\022\020\n\004d" + - "iff\030\006 \003(\002B\002\020\001\022\027\n\013double_data\030\010 \003(\001B\002\020\001\022\027" + - "\n\013double_diff\030\t \003(\001B\002\020\001\022\016\n\003num\030\001 \001(\005:\0010\022" + - "\023\n\010channels\030\002 \001(\005:\0010\022\021\n\006height\030\003 \001(\005:\0010\022" + - "\020\n\005width\030\004 \001(\005:\0010\"2\n\017BlobProtoVector\022\037\n\005" + - "blobs\030\001 \003(\0132\020.caffe.BlobProto\"\201\001\n\005Datum\022" + - "\020\n\010channels\030\001 \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005wid" + - "th\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\022\r\n\005label\030\005 \001(\005\022\022\n", - "\nfloat_data\030\006 \003(\002\022\026\n\007encoded\030\007 \001(\010:\005fals" + - "e\"\212\002\n\017FillerParameter\022\026\n\004type\030\001 \001(\t:\010con" + - "stant\022\020\n\005value\030\002 \001(\002:\0010\022\016\n\003min\030\003 \001(\002:\0010\022" + - "\016\n\003max\030\004 \001(\002:\0011\022\017\n\004mean\030\005 \001(\002:\0010\022\016\n\003std\030" + - "\006 \001(\002:\0011\022\022\n\006sparse\030\007 \001(\005:\002-1\022B\n\rvariance" + - "_norm\030\010 \001(\0162#.caffe.FillerParameter.Vari" + - "anceNorm:\006FAN_IN\"4\n\014VarianceNorm\022\n\n\006FAN_" + - "IN\020\000\022\013\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002\"\216\002\n\014NetPa" + - "rameter\022\014\n\004name\030\001 \001(\t\022\r\n\005input\030\003 \003(\t\022%\n\013" + - "input_shape\030\010 \003(\0132\020.caffe.BlobShape\022\021\n\ti", - "nput_dim\030\004 \003(\005\022\035\n\016force_backward\030\005 \001(\010:\005" + - "false\022\036\n\005state\030\006 \001(\0132\017.caffe.NetState\022\031\n" + - "\ndebug_info\030\007 \001(\010:\005false\022$\n\005layer\030d \003(\0132" + - "\025.caffe.LayerParameter\022\'\n\006layers\030\002 \003(\0132\027" + - ".caffe.V1LayerParameter\"\211\n\n\017SolverParame" + - "ter\022\013\n\003net\030\030 \001(\t\022&\n\tnet_param\030\031 \001(\0132\023.ca" + - "ffe.NetParameter\022\021\n\ttrain_net\030\001 \001(\t\022\020\n\010t" + - "est_net\030\002 \003(\t\022,\n\017train_net_param\030\025 \001(\0132\023" + - ".caffe.NetParameter\022+\n\016test_net_param\030\026 " + - "\003(\0132\023.caffe.NetParameter\022$\n\013train_state\030", - "\032 \001(\0132\017.caffe.NetState\022#\n\ntest_state\030\033 \003" + - "(\0132\017.caffe.NetState\022\021\n\ttest_iter\030\003 \003(\005\022\030" + - "\n\rtest_interval\030\004 \001(\005:\0010\022 \n\021test_compute" + - "_loss\030\023 \001(\010:\005false\022!\n\023test_initializatio" + - "n\030 \001(\010:\004true\022\017\n\007base_lr\030\005 \001(\002\022\017\n\007displa" + - "y\030\006 \001(\005\022\027\n\014average_loss\030! \001(\005:\0011\022\020\n\010max_" + - "iter\030\007 \001(\005\022\024\n\titer_size\030$ \001(\005:\0011\022\021\n\tlr_p" + - "olicy\030\010 \001(\t\022\r\n\005gamma\030\t \001(\002\022\r\n\005power\030\n \001(" + - "\002\022\020\n\010momentum\030\013 \001(\002\022\024\n\014weight_decay\030\014 \001(" + - "\002\022\037\n\023regularization_type\030\035 \001(\t:\002L2\022\020\n\010st", - "epsize\030\r \001(\005\022\021\n\tstepvalue\030\" \003(\005\022\032\n\016clip_" + - "gradients\030# \001(\002:\002-1\022\023\n\010snapshot\030\016 \001(\005:\0010" + - "\022\027\n\017snapshot_prefix\030\017 \001(\t\022\034\n\rsnapshot_di" + - "ff\030\020 \001(\010:\005false\022K\n\017snapshot_format\030% \001(\016" + - "2%.caffe.SolverParameter.SnapshotFormat:" + - "\013BINARYPROTO\022;\n\013solver_mode\030\021 \001(\0162!.caff" + - "e.SolverParameter.SolverMode:\003GPU\022\024\n\tdev" + - "ice_id\030\022 \001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003:\002-1" + - "\022;\n\013solver_type\030\036 \001(\0162!.caffe.SolverPara" + - "meter.SolverType:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e", - "-08\022\030\n\tmomentum2\030\' \001(\002:\0050.999\022\021\n\trms_dec" + - "ay\030& \001(\002\022\031\n\ndebug_info\030\027 \001(\010:\005false\022\"\n\024s" + - "napshot_after_train\030\034 \001(\010:\004true\"+\n\016Snaps" + - "hotFormat\022\010\n\004HDF5\020\000\022\017\n\013BINARYPROTO\020\001\"\036\n\n" + - "SolverMode\022\007\n\003CPU\020\000\022\007\n\003GPU\020\001\"U\n\nSolverTy" + - "pe\022\007\n\003SGD\020\000\022\014\n\010NESTEROV\020\001\022\013\n\007ADAGRAD\020\002\022\013" + - "\n\007RMSPROP\020\003\022\014\n\010ADADELTA\020\004\022\010\n\004ADAM\020\005\"l\n\013S" + - "olverState\022\014\n\004iter\030\001 \001(\005\022\023\n\013learned_net\030" + - "\002 \001(\t\022!\n\007history\030\003 \003(\0132\020.caffe.BlobProto" + - "\022\027\n\014current_step\030\004 \001(\005:\0010\"N\n\010NetState\022!\n", - "\005phase\030\001 \001(\0162\014.caffe.Phase:\004TEST\022\020\n\005leve" + - "l\030\002 \001(\005:\0010\022\r\n\005stage\030\003 \003(\t\"s\n\014NetStateRul" + - "e\022\033\n\005phase\030\001 \001(\0162\014.caffe.Phase\022\021\n\tmin_le" + - "vel\030\002 \001(\005\022\021\n\tmax_level\030\003 \001(\005\022\r\n\005stage\030\004 " + - "\003(\t\022\021\n\tnot_stage\030\005 \003(\t\"\243\001\n\tParamSpec\022\014\n\004" + - "name\030\001 \001(\t\0221\n\nshare_mode\030\002 \001(\0162\035.caffe.P" + - "aramSpec.DimCheckMode\022\022\n\007lr_mult\030\003 \001(\002:\001" + - "1\022\025\n\ndecay_mult\030\004 \001(\002:\0011\"*\n\014DimCheckMode" + - "\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\"\211\021\n\016LayerPa" + - "rameter\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\016\n\006b", - "ottom\030\003 \003(\t\022\013\n\003top\030\004 \003(\t\022\033\n\005phase\030\n \001(\0162" + - "\014.caffe.Phase\022\023\n\013loss_weight\030\005 \003(\002\022\037\n\005pa" + - "ram\030\006 \003(\0132\020.caffe.ParamSpec\022\037\n\005blobs\030\007 \003" + - "(\0132\020.caffe.BlobProto\022\026\n\016propagate_down\030\013" + - " \003(\010\022$\n\007include\030\010 \003(\0132\023.caffe.NetStateRu" + - "le\022$\n\007exclude\030\t \003(\0132\023.caffe.NetStateRule" + - "\0227\n\017transform_param\030d \001(\0132\036.caffe.Transf" + - "ormationParameter\022(\n\nloss_param\030e \001(\0132\024." + - "caffe.LossParameter\0220\n\016accuracy_param\030f " + - "\001(\0132\030.caffe.AccuracyParameter\022,\n\014argmax_", - "param\030g \001(\0132\026.caffe.ArgMaxParameter\022,\n\014c" + - "oncat_param\030h \001(\0132\026.caffe.ConcatParamete" + - "r\022?\n\026contrastive_loss_param\030i \001(\0132\037.caff" + - "e.ContrastiveLossParameter\0226\n\021convolutio" + - "n_param\030j \001(\0132\033.caffe.ConvolutionParamet" + - "er\022(\n\ndata_param\030k \001(\0132\024.caffe.DataParam" + - "eter\022.\n\rdropout_param\030l \001(\0132\027.caffe.Drop" + - "outParameter\0223\n\020dummy_data_param\030m \001(\0132\031" + - ".caffe.DummyDataParameter\022.\n\reltwise_par" + - "am\030n \001(\0132\027.caffe.EltwiseParameter\022+\n\013emb", - "ed_param\030\211\001 \001(\0132\025.caffe.EmbedParameter\022&" + - "\n\texp_param\030o \001(\0132\023.caffe.ExpParameter\022/" + - "\n\rflatten_param\030\207\001 \001(\0132\027.caffe.FlattenPa" + - "rameter\0221\n\017hdf5_data_param\030p \001(\0132\030.caffe" + - ".HDF5DataParameter\0225\n\021hdf5_output_param\030" + - "q \001(\0132\032.caffe.HDF5OutputParameter\0223\n\020hin" + - "ge_loss_param\030r \001(\0132\031.caffe.HingeLossPar" + - "ameter\0223\n\020image_data_param\030s \001(\0132\031.caffe" + - ".ImageDataParameter\0229\n\023infogain_loss_par" + - "am\030t \001(\0132\034.caffe.InfogainLossParameter\0229", - "\n\023inner_product_param\030u \001(\0132\034.caffe.Inne" + - "rProductParameter\022\'\n\tlog_param\030\206\001 \001(\0132\023." + - "caffe.LogParameter\022&\n\tlrn_param\030v \001(\0132\023." + - "caffe.LRNParameter\0225\n\021memory_data_param\030" + - "w \001(\0132\032.caffe.MemoryDataParameter\022&\n\tmvn" + - "_param\030x \001(\0132\023.caffe.MVNParameter\022.\n\rpoo" + - "ling_param\030y \001(\0132\027.caffe.PoolingParamete" + - "r\022*\n\013power_param\030z \001(\0132\025.caffe.PowerPara" + - "meter\022+\n\013prelu_param\030\203\001 \001(\0132\025.caffe.PReL" + - "UParameter\022-\n\014python_param\030\202\001 \001(\0132\026.caff", - "e.PythonParameter\0223\n\017reduction_param\030\210\001 " + - "\001(\0132\031.caffe.ReductionParameter\022(\n\nrelu_p" + - "aram\030{ \001(\0132\024.caffe.ReLUParameter\022/\n\rresh" + - "ape_param\030\205\001 \001(\0132\027.caffe.ReshapeParamete" + - "r\022.\n\rsigmoid_param\030| \001(\0132\027.caffe.Sigmoid" + - "Parameter\022.\n\rsoftmax_param\030} \001(\0132\027.caffe" + - ".SoftmaxParameter\022\'\n\tspp_param\030\204\001 \001(\0132\023." + - "caffe.SPPParameter\022*\n\013slice_param\030~ \001(\0132" + - "\025.caffe.SliceParameter\022(\n\ntanh_param\030\177 \001" + - "(\0132\024.caffe.TanHParameter\0223\n\017threshold_pa", - "ram\030\200\001 \001(\0132\031.caffe.ThresholdParameter\022)\n" + - "\ntile_param\030\212\001 \001(\0132\024.caffe.TileParameter" + - "\0226\n\021window_data_param\030\201\001 \001(\0132\032.caffe.Win" + - "dowDataParameter\"\266\001\n\027TransformationParam" + - "eter\022\020\n\005scale\030\001 \001(\002:\0011\022\025\n\006mirror\030\002 \001(\010:\005" + - "false\022\024\n\tcrop_size\030\003 \001(\r:\0010\022\021\n\tmean_file" + - "\030\004 \001(\t\022\022\n\nmean_value\030\005 \003(\002\022\032\n\013force_colo" + - "r\030\006 \001(\010:\005false\022\031\n\nforce_gray\030\007 \001(\010:\005fals" + - "e\">\n\rLossParameter\022\024\n\014ignore_label\030\001 \001(\005" + - "\022\027\n\tnormalize\030\002 \001(\010:\004true\"L\n\021AccuracyPar", - "ameter\022\020\n\005top_k\030\001 \001(\r:\0011\022\017\n\004axis\030\002 \001(\005:\001" + - "1\022\024\n\014ignore_label\030\003 \001(\005\"M\n\017ArgMaxParamet" + - "er\022\032\n\013out_max_val\030\001 \001(\010:\005false\022\020\n\005top_k\030" + - "\002 \001(\r:\0011\022\014\n\004axis\030\003 \001(\005\"9\n\017ConcatParamete" + - "r\022\017\n\004axis\030\002 \001(\005:\0011\022\025\n\nconcat_dim\030\001 \001(\r:\001" + - "1\"L\n\030ContrastiveLossParameter\022\021\n\006margin\030" + - "\001 \001(\002:\0011\022\035\n\016legacy_version\030\002 \001(\010:\005false\"" + - "\352\003\n\024ConvolutionParameter\022\022\n\nnum_output\030\001" + - " \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022\013\n\003pad\030\003 \003" + - "(\r\022\023\n\013kernel_size\030\004 \003(\r\022\016\n\006stride\030\006 \003(\r\022", - "\020\n\005pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\020\n\010k" + - "ernel_h\030\013 \001(\r\022\020\n\010kernel_w\030\014 \001(\r\022\020\n\010strid" + - "e_h\030\r \001(\r\022\020\n\010stride_w\030\016 \001(\r\022\020\n\005group\030\005 \001" + - "(\r:\0011\022-\n\rweight_filler\030\007 \001(\0132\026.caffe.Fil" + - "lerParameter\022+\n\013bias_filler\030\010 \001(\0132\026.caff" + - "e.FillerParameter\022;\n\006engine\030\017 \001(\0162\".caff" + - "e.ConvolutionParameter.Engine:\007DEFAULT\022\017" + - "\n\004axis\030\020 \001(\005:\0011\022\036\n\017force_nd_im2col\030\021 \001(\010" + - ":\005false\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020" + - "\001\022\t\n\005CUDNN\020\002\"\244\002\n\rDataParameter\022\016\n\006source", - "\030\001 \001(\t\022\022\n\nbatch_size\030\004 \001(\r\022\024\n\trand_skip\030" + - "\007 \001(\r:\0010\0221\n\007backend\030\010 \001(\0162\027.caffe.DataPa" + - "rameter.DB:\007LEVELDB\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n" + - "\tmean_file\030\003 \001(\t\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025" + - "\n\006mirror\030\006 \001(\010:\005false\022\"\n\023force_encoded_c" + - "olor\030\t \001(\010:\005false\022\023\n\010prefetch\030\n \001(\r:\0014\"\033" + - "\n\002DB\022\013\n\007LEVELDB\020\000\022\010\n\004LMDB\020\001\".\n\020DropoutPa" + - "rameter\022\032\n\rdropout_ratio\030\001 \001(\002:\0030.5\"\240\001\n\022" + - "DummyDataParameter\022+\n\013data_filler\030\001 \003(\0132" + - "\026.caffe.FillerParameter\022\037\n\005shape\030\006 \003(\0132\020", - ".caffe.BlobShape\022\013\n\003num\030\002 \003(\r\022\020\n\010channel" + - "s\030\003 \003(\r\022\016\n\006height\030\004 \003(\r\022\r\n\005width\030\005 \003(\r\"\245" + - "\001\n\020EltwiseParameter\0229\n\toperation\030\001 \001(\0162!" + - ".caffe.EltwiseParameter.EltwiseOp:\003SUM\022\r" + - "\n\005coeff\030\002 \003(\002\022\036\n\020stable_prod_grad\030\003 \001(\010:" + - "\004true\"\'\n\tEltwiseOp\022\010\n\004PROD\020\000\022\007\n\003SUM\020\001\022\007\n" + - "\003MAX\020\002\"\254\001\n\016EmbedParameter\022\022\n\nnum_output\030" + - "\001 \001(\r\022\021\n\tinput_dim\030\002 \001(\r\022\027\n\tbias_term\030\003 " + - "\001(\010:\004true\022-\n\rweight_filler\030\004 \001(\0132\026.caffe" + - ".FillerParameter\022+\n\013bias_filler\030\005 \001(\0132\026.", - "caffe.FillerParameter\"D\n\014ExpParameter\022\020\n" + - "\004base\030\001 \001(\002:\002-1\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shi" + - "ft\030\003 \001(\002:\0010\"9\n\020FlattenParameter\022\017\n\004axis\030" + - "\001 \001(\005:\0011\022\024\n\010end_axis\030\002 \001(\005:\002-1\"O\n\021HDF5Da" + - "taParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_siz" + - "e\030\002 \001(\r\022\026\n\007shuffle\030\003 \001(\010:\005false\"(\n\023HDF5O" + - "utputParameter\022\021\n\tfile_name\030\001 \001(\t\"^\n\022Hin" + - "geLossParameter\0220\n\004norm\030\001 \001(\0162\036.caffe.Hi" + - "ngeLossParameter.Norm:\002L1\"\026\n\004Norm\022\006\n\002L1\020" + - "\001\022\006\n\002L2\020\002\"\227\002\n\022ImageDataParameter\022\016\n\006sour", - "ce\030\001 \001(\t\022\025\n\nbatch_size\030\004 \001(\r:\0011\022\024\n\trand_" + - "skip\030\007 \001(\r:\0010\022\026\n\007shuffle\030\010 \001(\010:\005false\022\025\n" + - "\nnew_height\030\t \001(\r:\0010\022\024\n\tnew_width\030\n \001(\r:" + - "\0010\022\026\n\010is_color\030\013 \001(\010:\004true\022\020\n\005scale\030\002 \001(" + - "\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\024\n\tcrop_size\030\005 \001" + - "(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\025\n\013root_fol" + - "der\030\014 \001(\t:\000\"\'\n\025InfogainLossParameter\022\016\n\006" + - "source\030\001 \001(\t\"\261\001\n\025InnerProductParameter\022\022" + - "\n\nnum_output\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004t" + - "rue\022-\n\rweight_filler\030\003 \001(\0132\026.caffe.Fille", - "rParameter\022+\n\013bias_filler\030\004 \001(\0132\026.caffe." + - "FillerParameter\022\017\n\004axis\030\005 \001(\005:\0011\"D\n\014LogP" + - "arameter\022\020\n\004base\030\001 \001(\002:\002-1\022\020\n\005scale\030\002 \001(" + - "\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"\326\001\n\014LRNParameter\022" + - "\025\n\nlocal_size\030\001 \001(\r:\0015\022\020\n\005alpha\030\002 \001(\002:\0011" + - "\022\022\n\004beta\030\003 \001(\002:\0040.75\022D\n\013norm_region\030\004 \001(" + - "\0162\036.caffe.LRNParameter.NormRegion:\017ACROS" + - "S_CHANNELS\022\014\n\001k\030\005 \001(\002:\0011\"5\n\nNormRegion\022\023" + - "\n\017ACROSS_CHANNELS\020\000\022\022\n\016WITHIN_CHANNEL\020\001\"" + - "Z\n\023MemoryDataParameter\022\022\n\nbatch_size\030\001 \001", - "(\r\022\020\n\010channels\030\002 \001(\r\022\016\n\006height\030\003 \001(\r\022\r\n\005" + - "width\030\004 \001(\r\"d\n\014MVNParameter\022 \n\022normalize" + - "_variance\030\001 \001(\010:\004true\022\036\n\017across_channels" + - "\030\002 \001(\010:\005false\022\022\n\003eps\030\003 \001(\002:\0051e-09\"\242\003\n\020Po" + - "olingParameter\0225\n\004pool\030\001 \001(\0162\".caffe.Poo" + - "lingParameter.PoolMethod:\003MAX\022\016\n\003pad\030\004 \001" + - "(\r:\0010\022\020\n\005pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\001" + - "0\022\023\n\013kernel_size\030\002 \001(\r\022\020\n\010kernel_h\030\005 \001(\r" + - "\022\020\n\010kernel_w\030\006 \001(\r\022\021\n\006stride\030\003 \001(\r:\0011\022\020\n" + - "\010stride_h\030\007 \001(\r\022\020\n\010stride_w\030\010 \001(\r\0227\n\006eng", - "ine\030\013 \001(\0162\036.caffe.PoolingParameter.Engin" + - "e:\007DEFAULT\022\035\n\016global_pooling\030\014 \001(\010:\005fals" + - "e\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTO" + - "CHASTIC\020\002\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFF" + - "E\020\001\022\t\n\005CUDNN\020\002\"F\n\016PowerParameter\022\020\n\005powe" + - "r\030\001 \001(\002:\0011\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 " + - "\001(\002:\0010\"g\n\017PythonParameter\022\016\n\006module\030\001 \001(" + - "\t\022\r\n\005layer\030\002 \001(\t\022\023\n\tparam_str\030\003 \001(\t:\000\022 \n" + - "\021share_in_parallel\030\004 \001(\010:\005false\"\255\001\n\022Redu" + - "ctionParameter\022=\n\toperation\030\001 \001(\0162%.caff", - "e.ReductionParameter.ReductionOp:\003SUM\022\017\n" + - "\004axis\030\002 \001(\005:\0010\022\020\n\005coeff\030\003 \001(\002:\0011\"5\n\013Redu" + - "ctionOp\022\007\n\003SUM\020\001\022\010\n\004ASUM\020\002\022\t\n\005SUMSQ\020\003\022\010\n" + - "\004MEAN\020\004\"\215\001\n\rReLUParameter\022\031\n\016negative_sl" + - "ope\030\001 \001(\002:\0010\0224\n\006engine\030\002 \001(\0162\033.caffe.ReL" + - "UParameter.Engine:\007DEFAULT\"+\n\006Engine\022\013\n\007" + - "DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"Z\n\020Resha" + - "peParameter\022\037\n\005shape\030\001 \001(\0132\020.caffe.BlobS" + - "hape\022\017\n\004axis\030\002 \001(\005:\0010\022\024\n\010num_axes\030\003 \001(\005:" + - "\002-1\"x\n\020SigmoidParameter\0227\n\006engine\030\001 \001(\0162", - "\036.caffe.SigmoidParameter.Engine:\007DEFAULT" + - "\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CU" + - "DNN\020\002\"L\n\016SliceParameter\022\017\n\004axis\030\003 \001(\005:\0011" + - "\022\023\n\013slice_point\030\002 \003(\r\022\024\n\tslice_dim\030\001 \001(\r" + - ":\0011\"\211\001\n\020SoftmaxParameter\0227\n\006engine\030\001 \001(\016" + - "2\036.caffe.SoftmaxParameter.Engine:\007DEFAUL" + - "T\022\017\n\004axis\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n\007DEFAULT\020" + - "\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"r\n\rTanHParameter" + - "\0224\n\006engine\030\001 \001(\0162\033.caffe.TanHParameter.E" + - "ngine:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n", - "\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"/\n\rTileParameter\022\017\n\004" + - "axis\030\001 \001(\005:\0011\022\r\n\005tiles\030\002 \001(\005\"*\n\022Threshol" + - "dParameter\022\024\n\tthreshold\030\001 \001(\002:\0010\"\301\002\n\023Win" + - "dowDataParameter\022\016\n\006source\030\001 \001(\t\022\020\n\005scal" + - "e\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\022\n\nbatch_s" + - "ize\030\004 \001(\r\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirro" + - "r\030\006 \001(\010:\005false\022\031\n\014fg_threshold\030\007 \001(\002:\0030." + - "5\022\031\n\014bg_threshold\030\010 \001(\002:\0030.5\022\031\n\013fg_fract" + - "ion\030\t \001(\002:\0040.25\022\026\n\013context_pad\030\n \001(\r:\0010\022" + - "\027\n\tcrop_mode\030\013 \001(\t:\004warp\022\033\n\014cache_images", - "\030\014 \001(\010:\005false\022\025\n\013root_folder\030\r \001(\t:\000\"\353\001\n" + - "\014SPPParameter\022\026\n\016pyramid_height\030\001 \001(\r\0221\n" + - "\004pool\030\002 \001(\0162\036.caffe.SPPParameter.PoolMet" + - "hod:\003MAX\0223\n\006engine\030\006 \001(\0162\032.caffe.SPPPara" + - "meter.Engine:\007DEFAULT\".\n\nPoolMethod\022\007\n\003M" + - "AX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022" + - "\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\340\023\n\020V" + - "1LayerParameter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003" + - " \003(\t\022\014\n\004name\030\004 \001(\t\022$\n\007include\030 \003(\0132\023.ca" + - "ffe.NetStateRule\022$\n\007exclude\030! \003(\0132\023.caff", - "e.NetStateRule\022/\n\004type\030\005 \001(\0162!.caffe.V1L" + - "ayerParameter.LayerType\022\037\n\005blobs\030\006 \003(\0132\020" + - ".caffe.BlobProto\022\016\n\005param\030\351\007 \003(\t\022>\n\017blob" + - "_share_mode\030\352\007 \003(\0162$.caffe.V1LayerParame" + - "ter.DimCheckMode\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014we" + - "ight_decay\030\010 \003(\002\022\023\n\013loss_weight\030# \003(\002\0220\n" + - "\016accuracy_param\030\033 \001(\0132\030.caffe.AccuracyPa" + - "rameter\022,\n\014argmax_param\030\027 \001(\0132\026.caffe.Ar" + - "gMaxParameter\022,\n\014concat_param\030\t \001(\0132\026.ca" + - "ffe.ConcatParameter\022?\n\026contrastive_loss_", - "param\030( \001(\0132\037.caffe.ContrastiveLossParam" + - "eter\0226\n\021convolution_param\030\n \001(\0132\033.caffe." + - "ConvolutionParameter\022(\n\ndata_param\030\013 \001(\013" + - "2\024.caffe.DataParameter\022.\n\rdropout_param\030" + - "\014 \001(\0132\027.caffe.DropoutParameter\0223\n\020dummy_" + - "data_param\030\032 \001(\0132\031.caffe.DummyDataParame" + - "ter\022.\n\reltwise_param\030\030 \001(\0132\027.caffe.Eltwi" + - "seParameter\022&\n\texp_param\030) \001(\0132\023.caffe.E" + - "xpParameter\0221\n\017hdf5_data_param\030\r \001(\0132\030.c" + - "affe.HDF5DataParameter\0225\n\021hdf5_output_pa", - "ram\030\016 \001(\0132\032.caffe.HDF5OutputParameter\0223\n" + - "\020hinge_loss_param\030\035 \001(\0132\031.caffe.HingeLos" + - "sParameter\0223\n\020image_data_param\030\017 \001(\0132\031.c" + - "affe.ImageDataParameter\0229\n\023infogain_loss" + - "_param\030\020 \001(\0132\034.caffe.InfogainLossParamet" + - "er\0229\n\023inner_product_param\030\021 \001(\0132\034.caffe." + - "InnerProductParameter\022&\n\tlrn_param\030\022 \001(\013" + - "2\023.caffe.LRNParameter\0225\n\021memory_data_par" + - "am\030\026 \001(\0132\032.caffe.MemoryDataParameter\022&\n\t" + - "mvn_param\030\" \001(\0132\023.caffe.MVNParameter\022.\n\r", - "pooling_param\030\023 \001(\0132\027.caffe.PoolingParam" + - "eter\022*\n\013power_param\030\025 \001(\0132\025.caffe.PowerP" + - "arameter\022(\n\nrelu_param\030\036 \001(\0132\024.caffe.ReL" + - "UParameter\022.\n\rsigmoid_param\030& \001(\0132\027.caff" + - "e.SigmoidParameter\022.\n\rsoftmax_param\030\' \001(" + - "\0132\027.caffe.SoftmaxParameter\022*\n\013slice_para" + - "m\030\037 \001(\0132\025.caffe.SliceParameter\022(\n\ntanh_p" + - "aram\030% \001(\0132\024.caffe.TanHParameter\0222\n\017thre" + - "shold_param\030\031 \001(\0132\031.caffe.ThresholdParam" + - "eter\0225\n\021window_data_param\030\024 \001(\0132\032.caffe.", - "WindowDataParameter\0227\n\017transform_param\030$" + - " \001(\0132\036.caffe.TransformationParameter\022(\n\n" + - "loss_param\030* \001(\0132\024.caffe.LossParameter\022&" + - "\n\005layer\030\001 \001(\0132\027.caffe.V0LayerParameter\"\330" + - "\004\n\tLayerType\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010AC" + - "CURACY\020\001\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONCAT" + - "\020\003\022\024\n\020CONTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTION\020" + - "\004\022\010\n\004DATA\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROPOU" + - "T\020\006\022\016\n\nDUMMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020\007\022" + - "\013\n\007ELTWISE\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\tHD", - "F5_DATA\020\t\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LOSS" + - "\020\034\022\n\n\006IM2COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFOGA" + - "IN_LOSS\020\r\022\021\n\rINNER_PRODUCT\020\016\022\007\n\003LRN\020\017\022\017\n" + - "\013MEMORY_DATA\020\035\022\035\n\031MULTINOMIAL_LOGISTIC_L" + - "OSS\020\020\022\007\n\003MVN\020\"\022\013\n\007POOLING\020\021\022\t\n\005POWER\020\032\022\010" + - "\n\004RELU\020\022\022\013\n\007SIGMOID\020\023\022\036\n\032SIGMOID_CROSS_E" + - "NTROPY_LOSS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020\024\022" + - "\020\n\014SOFTMAX_LOSS\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020!\022" + - "\010\n\004TANH\020\027\022\017\n\013WINDOW_DATA\020\030\022\r\n\tTHRESHOLD\020" + - "\037\"*\n\014DimCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISS", - "IVE\020\001\"\375\007\n\020V0LayerParameter\022\014\n\004name\030\001 \001(\t" + - "\022\014\n\004type\030\002 \001(\t\022\022\n\nnum_output\030\003 \001(\r\022\026\n\010bi" + - "asterm\030\004 \001(\010:\004true\022-\n\rweight_filler\030\005 \001(" + - "\0132\026.caffe.FillerParameter\022+\n\013bias_filler" + - "\030\006 \001(\0132\026.caffe.FillerParameter\022\016\n\003pad\030\007 " + - "\001(\r:\0010\022\022\n\nkernelsize\030\010 \001(\r\022\020\n\005group\030\t \001(" + - "\r:\0011\022\021\n\006stride\030\n \001(\r:\0011\0225\n\004pool\030\013 \001(\0162\"." + - "caffe.V0LayerParameter.PoolMethod:\003MAX\022\032" + - "\n\rdropout_ratio\030\014 \001(\002:\0030.5\022\025\n\nlocal_size" + - "\030\r \001(\r:\0015\022\020\n\005alpha\030\016 \001(\002:\0011\022\022\n\004beta\030\017 \001(", - "\002:\0040.75\022\014\n\001k\030\026 \001(\002:\0011\022\016\n\006source\030\020 \001(\t\022\020\n" + - "\005scale\030\021 \001(\002:\0011\022\020\n\010meanfile\030\022 \001(\t\022\021\n\tbat" + - "chsize\030\023 \001(\r\022\023\n\010cropsize\030\024 \001(\r:\0010\022\025\n\006mir" + - "ror\030\025 \001(\010:\005false\022\037\n\005blobs\0302 \003(\0132\020.caffe." + - "BlobProto\022\020\n\010blobs_lr\0303 \003(\002\022\024\n\014weight_de" + - "cay\0304 \003(\002\022\024\n\trand_skip\0305 \001(\r:\0010\022\035\n\020det_f" + - "g_threshold\0306 \001(\002:\0030.5\022\035\n\020det_bg_thresho" + - "ld\0307 \001(\002:\0030.5\022\035\n\017det_fg_fraction\0308 \001(\002:\004" + - "0.25\022\032\n\017det_context_pad\030: \001(\r:\0010\022\033\n\rdet_" + - "crop_mode\030; \001(\t:\004warp\022\022\n\007new_num\030< \001(\005:\001", - "0\022\027\n\014new_channels\030= \001(\005:\0010\022\025\n\nnew_height" + - "\030> \001(\005:\0010\022\024\n\tnew_width\030? \001(\005:\0010\022\035\n\016shuff" + - "le_images\030@ \001(\010:\005false\022\025\n\nconcat_dim\030A \001" + - "(\r:\0011\0226\n\021hdf5_output_param\030\351\007 \001(\0132\032.caff" + - "e.HDF5OutputParameter\".\n\nPoolMethod\022\007\n\003M" + - "AX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"W\n\016PReLUPa" + - "rameter\022&\n\006filler\030\001 \001(\0132\026.caffe.FillerPa" + - "rameter\022\035\n\016channel_shared\030\002 \001(\010:\005false*\034" + - "\n\005Phase\022\t\n\005TRAIN\020\000\022\010\n\004TEST\020\001" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_caffe_BlobShape_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_caffe_BlobShape_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_BlobShape_descriptor, - new java.lang.String[] { "Dim", }); - internal_static_caffe_BlobProto_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_caffe_BlobProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_BlobProto_descriptor, - new java.lang.String[] { "Shape", "Data", "Diff", "DoubleData", "DoubleDiff", "Num", "Channels", "Height", "Width", }); - internal_static_caffe_BlobProtoVector_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_caffe_BlobProtoVector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_BlobProtoVector_descriptor, - new java.lang.String[] { "Blobs", }); - internal_static_caffe_Datum_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_caffe_Datum_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_Datum_descriptor, - new java.lang.String[] { "Channels", "Height", "Width", "Data", "Label", "FloatData", "Encoded", }); - internal_static_caffe_FillerParameter_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_caffe_FillerParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_FillerParameter_descriptor, - new java.lang.String[] { "Type", "Value", "Min", "Max", "Mean", "Std", "Sparse", "VarianceNorm", }); - internal_static_caffe_NetParameter_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_caffe_NetParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_NetParameter_descriptor, - new java.lang.String[] { "Name", "Input", "InputShape", "InputDim", "ForceBackward", "State", "DebugInfo", "Layer", "Layers", }); - internal_static_caffe_SolverParameter_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_caffe_SolverParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SolverParameter_descriptor, - new java.lang.String[] { "Net", "NetParam", "TrainNet", "TestNet", "TrainNetParam", "TestNetParam", "TrainState", "TestState", "TestIter", "TestInterval", "TestComputeLoss", "TestInitialization", "BaseLr", "Display", "AverageLoss", "MaxIter", "IterSize", "LrPolicy", "Gamma", "Power", "Momentum", "WeightDecay", "RegularizationType", "Stepsize", "Stepvalue", "ClipGradients", "Snapshot", "SnapshotPrefix", "SnapshotDiff", "SnapshotFormat", "SolverMode", "DeviceId", "RandomSeed", "SolverType", "Delta", "Momentum2", "RmsDecay", "DebugInfo", "SnapshotAfterTrain", }); - internal_static_caffe_SolverState_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_caffe_SolverState_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SolverState_descriptor, - new java.lang.String[] { "Iter", "LearnedNet", "History", "CurrentStep", }); - internal_static_caffe_NetState_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_caffe_NetState_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_NetState_descriptor, - new java.lang.String[] { "Phase", "Level", "Stage", }); - internal_static_caffe_NetStateRule_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_caffe_NetStateRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_NetStateRule_descriptor, - new java.lang.String[] { "Phase", "MinLevel", "MaxLevel", "Stage", "NotStage", }); - internal_static_caffe_ParamSpec_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_caffe_ParamSpec_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ParamSpec_descriptor, - new java.lang.String[] { "Name", "ShareMode", "LrMult", "DecayMult", }); - internal_static_caffe_LayerParameter_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_caffe_LayerParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_LayerParameter_descriptor, - new java.lang.String[] { "Name", "Type", "Bottom", "Top", "Phase", "LossWeight", "Param", "Blobs", "PropagateDown", "Include", "Exclude", "TransformParam", "LossParam", "AccuracyParam", "ArgmaxParam", "ConcatParam", "ContrastiveLossParam", "ConvolutionParam", "DataParam", "DropoutParam", "DummyDataParam", "EltwiseParam", "EmbedParam", "ExpParam", "FlattenParam", "Hdf5DataParam", "Hdf5OutputParam", "HingeLossParam", "ImageDataParam", "InfogainLossParam", "InnerProductParam", "LogParam", "LrnParam", "MemoryDataParam", "MvnParam", "PoolingParam", "PowerParam", "PreluParam", "PythonParam", "ReductionParam", "ReluParam", "ReshapeParam", "SigmoidParam", "SoftmaxParam", "SppParam", "SliceParam", "TanhParam", "ThresholdParam", "TileParam", "WindowDataParam", }); - internal_static_caffe_TransformationParameter_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_caffe_TransformationParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_TransformationParameter_descriptor, - new java.lang.String[] { "Scale", "Mirror", "CropSize", "MeanFile", "MeanValue", "ForceColor", "ForceGray", }); - internal_static_caffe_LossParameter_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_caffe_LossParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_LossParameter_descriptor, - new java.lang.String[] { "IgnoreLabel", "Normalize", }); - internal_static_caffe_AccuracyParameter_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_caffe_AccuracyParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_AccuracyParameter_descriptor, - new java.lang.String[] { "TopK", "Axis", "IgnoreLabel", }); - internal_static_caffe_ArgMaxParameter_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_caffe_ArgMaxParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ArgMaxParameter_descriptor, - new java.lang.String[] { "OutMaxVal", "TopK", "Axis", }); - internal_static_caffe_ConcatParameter_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_caffe_ConcatParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ConcatParameter_descriptor, - new java.lang.String[] { "Axis", "ConcatDim", }); - internal_static_caffe_ContrastiveLossParameter_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ContrastiveLossParameter_descriptor, - new java.lang.String[] { "Margin", "LegacyVersion", }); - internal_static_caffe_ConvolutionParameter_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_caffe_ConvolutionParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ConvolutionParameter_descriptor, - new java.lang.String[] { "NumOutput", "BiasTerm", "Pad", "KernelSize", "Stride", "PadH", "PadW", "KernelH", "KernelW", "StrideH", "StrideW", "Group", "WeightFiller", "BiasFiller", "Engine", "Axis", "ForceNdIm2Col", }); - internal_static_caffe_DataParameter_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_caffe_DataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_DataParameter_descriptor, - new java.lang.String[] { "Source", "BatchSize", "RandSkip", "Backend", "Scale", "MeanFile", "CropSize", "Mirror", "ForceEncodedColor", "Prefetch", }); - internal_static_caffe_DropoutParameter_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_caffe_DropoutParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_DropoutParameter_descriptor, - new java.lang.String[] { "DropoutRatio", }); - internal_static_caffe_DummyDataParameter_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_caffe_DummyDataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_DummyDataParameter_descriptor, - new java.lang.String[] { "DataFiller", "Shape", "Num", "Channels", "Height", "Width", }); - internal_static_caffe_EltwiseParameter_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_caffe_EltwiseParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_EltwiseParameter_descriptor, - new java.lang.String[] { "Operation", "Coeff", "StableProdGrad", }); - internal_static_caffe_EmbedParameter_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_caffe_EmbedParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_EmbedParameter_descriptor, - new java.lang.String[] { "NumOutput", "InputDim", "BiasTerm", "WeightFiller", "BiasFiller", }); - internal_static_caffe_ExpParameter_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_caffe_ExpParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ExpParameter_descriptor, - new java.lang.String[] { "Base", "Scale", "Shift", }); - internal_static_caffe_FlattenParameter_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_caffe_FlattenParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_FlattenParameter_descriptor, - new java.lang.String[] { "Axis", "EndAxis", }); - internal_static_caffe_HDF5DataParameter_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_caffe_HDF5DataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_HDF5DataParameter_descriptor, - new java.lang.String[] { "Source", "BatchSize", "Shuffle", }); - internal_static_caffe_HDF5OutputParameter_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_caffe_HDF5OutputParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_HDF5OutputParameter_descriptor, - new java.lang.String[] { "FileName", }); - internal_static_caffe_HingeLossParameter_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_caffe_HingeLossParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_HingeLossParameter_descriptor, - new java.lang.String[] { "Norm", }); - internal_static_caffe_ImageDataParameter_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_caffe_ImageDataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ImageDataParameter_descriptor, - new java.lang.String[] { "Source", "BatchSize", "RandSkip", "Shuffle", "NewHeight", "NewWidth", "IsColor", "Scale", "MeanFile", "CropSize", "Mirror", "RootFolder", }); - internal_static_caffe_InfogainLossParameter_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_caffe_InfogainLossParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_InfogainLossParameter_descriptor, - new java.lang.String[] { "Source", }); - internal_static_caffe_InnerProductParameter_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_caffe_InnerProductParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_InnerProductParameter_descriptor, - new java.lang.String[] { "NumOutput", "BiasTerm", "WeightFiller", "BiasFiller", "Axis", }); - internal_static_caffe_LogParameter_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_caffe_LogParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_LogParameter_descriptor, - new java.lang.String[] { "Base", "Scale", "Shift", }); - internal_static_caffe_LRNParameter_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_caffe_LRNParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_LRNParameter_descriptor, - new java.lang.String[] { "LocalSize", "Alpha", "Beta", "NormRegion", "K", }); - internal_static_caffe_MemoryDataParameter_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_caffe_MemoryDataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_MemoryDataParameter_descriptor, - new java.lang.String[] { "BatchSize", "Channels", "Height", "Width", }); - internal_static_caffe_MVNParameter_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_caffe_MVNParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_MVNParameter_descriptor, - new java.lang.String[] { "NormalizeVariance", "AcrossChannels", "Eps", }); - internal_static_caffe_PoolingParameter_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_caffe_PoolingParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_PoolingParameter_descriptor, - new java.lang.String[] { "Pool", "Pad", "PadH", "PadW", "KernelSize", "KernelH", "KernelW", "Stride", "StrideH", "StrideW", "Engine", "GlobalPooling", }); - internal_static_caffe_PowerParameter_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_caffe_PowerParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_PowerParameter_descriptor, - new java.lang.String[] { "Power", "Scale", "Shift", }); - internal_static_caffe_PythonParameter_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_caffe_PythonParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_PythonParameter_descriptor, - new java.lang.String[] { "Module", "Layer", "ParamStr", "ShareInParallel", }); - internal_static_caffe_ReductionParameter_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_caffe_ReductionParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ReductionParameter_descriptor, - new java.lang.String[] { "Operation", "Axis", "Coeff", }); - internal_static_caffe_ReLUParameter_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_caffe_ReLUParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ReLUParameter_descriptor, - new java.lang.String[] { "NegativeSlope", "Engine", }); - internal_static_caffe_ReshapeParameter_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_caffe_ReshapeParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ReshapeParameter_descriptor, - new java.lang.String[] { "Shape", "Axis", "NumAxes", }); - internal_static_caffe_SigmoidParameter_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_caffe_SigmoidParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SigmoidParameter_descriptor, - new java.lang.String[] { "Engine", }); - internal_static_caffe_SliceParameter_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_caffe_SliceParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SliceParameter_descriptor, - new java.lang.String[] { "Axis", "SlicePoint", "SliceDim", }); - internal_static_caffe_SoftmaxParameter_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_caffe_SoftmaxParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SoftmaxParameter_descriptor, - new java.lang.String[] { "Engine", "Axis", }); - internal_static_caffe_TanHParameter_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_caffe_TanHParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_TanHParameter_descriptor, - new java.lang.String[] { "Engine", }); - internal_static_caffe_TileParameter_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_caffe_TileParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_TileParameter_descriptor, - new java.lang.String[] { "Axis", "Tiles", }); - internal_static_caffe_ThresholdParameter_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_caffe_ThresholdParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_ThresholdParameter_descriptor, - new java.lang.String[] { "Threshold", }); - internal_static_caffe_WindowDataParameter_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_caffe_WindowDataParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_WindowDataParameter_descriptor, - new java.lang.String[] { "Source", "Scale", "MeanFile", "BatchSize", "CropSize", "Mirror", "FgThreshold", "BgThreshold", "FgFraction", "ContextPad", "CropMode", "CacheImages", "RootFolder", }); - internal_static_caffe_SPPParameter_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_caffe_SPPParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_SPPParameter_descriptor, - new java.lang.String[] { "PyramidHeight", "Pool", "Engine", }); - internal_static_caffe_V1LayerParameter_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_caffe_V1LayerParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_V1LayerParameter_descriptor, - new java.lang.String[] { "Bottom", "Top", "Name", "Include", "Exclude", "Type", "Blobs", "Param", "BlobShareMode", "BlobsLr", "WeightDecay", "LossWeight", "AccuracyParam", "ArgmaxParam", "ConcatParam", "ContrastiveLossParam", "ConvolutionParam", "DataParam", "DropoutParam", "DummyDataParam", "EltwiseParam", "ExpParam", "Hdf5DataParam", "Hdf5OutputParam", "HingeLossParam", "ImageDataParam", "InfogainLossParam", "InnerProductParam", "LrnParam", "MemoryDataParam", "MvnParam", "PoolingParam", "PowerParam", "ReluParam", "SigmoidParam", "SoftmaxParam", "SliceParam", "TanhParam", "ThresholdParam", "WindowDataParam", "TransformParam", "LossParam", "Layer", }); - internal_static_caffe_V0LayerParameter_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_caffe_V0LayerParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_V0LayerParameter_descriptor, - new java.lang.String[] { "Name", "Type", "NumOutput", "Biasterm", "WeightFiller", "BiasFiller", "Pad", "Kernelsize", "Group", "Stride", "Pool", "DropoutRatio", "LocalSize", "Alpha", "Beta", "K", "Source", "Scale", "Meanfile", "Batchsize", "Cropsize", "Mirror", "Blobs", "BlobsLr", "WeightDecay", "RandSkip", "DetFgThreshold", "DetBgThreshold", "DetFgFraction", "DetContextPad", "DetCropMode", "NewNum", "NewChannels", "NewHeight", "NewWidth", "ShuffleImages", "ConcatDim", "Hdf5OutputParam", }); - internal_static_caffe_PReLUParameter_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_caffe_PReLUParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_caffe_PReLUParameter_descriptor, - new java.lang.String[] { "Filler", "ChannelShared", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} +// 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 final com.google.protobuf.Internal.EnumLiteMap< + Phase> 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 + // @@protoc_insertion_point(interface_extends:caffe.BlobShape) + com.google.protobuf.MessageOrBuilder { + + /** + * 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 + // @@protoc_insertion_point(message_implements:caffe.BlobShape) + BlobShapeOrBuilder { + // Use BlobShape.newBuilder() to construct. + private BlobShape(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BlobShape() { + dim_ = java.util.Collections.emptyList(); + } + + @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) { + this(); + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getDimList().size() > 0) { + output.writeRawVarint32(10); + output.writeRawVarint32(dimMemoizedSerializedSize); + } + for (int i = 0; i < dim_.size(); i++) { + output.writeInt64NoTag(dim_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.BlobShape prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.BlobShape) + 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) { + } + } + public Builder clear() { + super.clear(); + dim_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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) + } + + // @@protoc_insertion_point(class_scope:caffe.BlobShape) + private static final caffe.Caffe.BlobShape DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.BlobShape(); + } + + public static caffe.Caffe.BlobShape getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new BlobShape(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.BlobShape getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlobProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.BlobProto) + com.google.protobuf.MessageOrBuilder { + + /** + * 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]; + */ + 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]; + */ + 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]; + */ + 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]; + */ + 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]; + * + *
+     * 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]; + */ + boolean hasChannels(); + /** + * optional int32 channels = 2 [default = 0]; + */ + int getChannels(); + + /** + * optional int32 height = 3 [default = 0]; + */ + boolean hasHeight(); + /** + * optional int32 height = 3 [default = 0]; + */ + int getHeight(); + + /** + * 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 + // @@protoc_insertion_point(message_implements:caffe.BlobProto) + BlobProtoOrBuilder { + // Use BlobProto.newBuilder() to construct. + private BlobProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BlobProto() { + 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; + } + + @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) { + this(); + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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); + } + + private int bitField0_; + 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_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } + /** + * optional .caffe.BlobShape shape = 7; + */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { + return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } + + 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; + + 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; + + 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; + + 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; + + 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_; + } + + 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_; + } + + 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_; + } + + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + 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, getShape()); + } + 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)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + 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, getShape()); + } + { + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.BlobProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.BlobProto) + 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(); + } + } + public Builder clear() { + super.clear(); + if (shapeBuilder_ == null) { + shape_ = null; + } 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 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + private caffe.Caffe.BlobShape shape_ = null; + 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_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : 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_ != null && + 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_ = null; + 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_ == null ? + caffe.Caffe.BlobShape.getDefaultInstance() : 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>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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; + } + + 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; + } + + 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; + } + + 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) + } + + // @@protoc_insertion_point(class_scope:caffe.BlobProto) + private static final caffe.Caffe.BlobProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.BlobProto(); + } + + public static caffe.Caffe.BlobProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new BlobProto(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.BlobProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlobProtoVectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.BlobProtoVector) + com.google.protobuf.MessageOrBuilder { + + /** + * 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 + // @@protoc_insertion_point(message_implements:caffe.BlobProtoVector) + BlobProtoVectorOrBuilder { + // Use BlobProtoVector.newBuilder() to construct. + private BlobProtoVector(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BlobProtoVector() { + blobs_ = java.util.Collections.emptyList(); + } + + @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) { + this(); + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < blobs_.size(); i++) { + output.writeMessage(1, blobs_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.BlobProtoVector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.BlobProtoVector) + 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(); + } + } + public Builder clear() { + super.clear(); + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blobsBuilder_.clear(); + } + return this; + } + + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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) + } + + // @@protoc_insertion_point(class_scope:caffe.BlobProtoVector) + private static final caffe.Caffe.BlobProtoVector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.BlobProtoVector(); + } + + public static caffe.Caffe.BlobProtoVector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new BlobProtoVector(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.BlobProtoVector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DatumOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.Datum) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 channels = 1; + */ + boolean hasChannels(); + /** + * optional int32 channels = 1; + */ + int getChannels(); + + /** + * optional int32 height = 2; + */ + boolean hasHeight(); + /** + * optional int32 height = 2; + */ + int getHeight(); + + /** + * optional int32 width = 3; + */ + boolean hasWidth(); + /** + * optional int32 width = 3; + */ + int getWidth(); + + /** + * 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; + */ + boolean hasLabel(); + /** + * optional int32 label = 5; + */ + int getLabel(); + + /** + * 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]; + * + *
+     * 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 + // @@protoc_insertion_point(message_implements:caffe.Datum) + DatumOrBuilder { + // Use Datum.newBuilder() to construct. + private Datum(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Datum() { + channels_ = 0; + height_ = 0; + width_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; + label_ = 0; + floatData_ = java.util.Collections.emptyList(); + encoded_ = false; + } + + @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) { + this(); + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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); + } + + private int bitField0_; + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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); + } + + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((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_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.Datum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.Datum) + 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) { + } + } + 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 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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) + } + + // @@protoc_insertion_point(class_scope:caffe.Datum) + private static final caffe.Caffe.Datum DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.Datum(); + } + + public static caffe.Caffe.Datum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new Datum(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.Datum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FillerParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.FillerParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * 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]; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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]; + */ + 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 + // @@protoc_insertion_point(message_implements:caffe.FillerParameter) + FillerParameterOrBuilder { + // Use FillerParameter.newBuilder() to construct. + private FillerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FillerParameter() { + type_ = "constant"; + value_ = 0F; + min_ = 0F; + max_ = 1F; + mean_ = 0F; + std_ = 1F; + sparse_ = -1; + varianceNorm_ = 0; + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + type_ = bs; + 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_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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); + } + + /** + * 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 final com.google.protobuf.Internal.EnumLiteMap< + VarianceNorm> 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_; + public static final int TYPE_FIELD_NUMBER = 1; + private volatile 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; + } + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + public static final int VARIANCE_NORM_FIELD_NUMBER = 8; + private int 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() { + caffe.Caffe.FillerParameter.VarianceNorm result = caffe.Caffe.FillerParameter.VarianceNorm.valueOf(varianceNorm_); + return result == null ? caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); + } + 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_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); + } + 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_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.FillerParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.FillerParameter) + 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) { + } + } + 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_ = 0; + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + private int varianceNorm_ = 0; + /** + * 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() { + caffe.Caffe.FillerParameter.VarianceNorm result = caffe.Caffe.FillerParameter.VarianceNorm.valueOf(varianceNorm_); + return result == null ? caffe.Caffe.FillerParameter.VarianceNorm.FAN_IN : result; + } + /** + * 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.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN]; + */ + public Builder clearVarianceNorm() { + bitField0_ = (bitField0_ & ~0x00000080); + varianceNorm_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.FillerParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.FillerParameter) + private static final caffe.Caffe.FillerParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.FillerParameter(); + } + + public static caffe.Caffe.FillerParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new FillerParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.FillerParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.NetParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * DEPRECATED. See InputParameter. The input blobs to the network.
+     * 
+ */ + com.google.protobuf.ProtocolStringList + 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; + * + *
+     * 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; + * + *
+     * 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]; + * + *
+     * 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; + * + *
+     * 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]; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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 + // @@protoc_insertion_point(message_implements:caffe.NetParameter) + NetParameterOrBuilder { + // Use NetParameter.newBuilder() to construct. + private NetParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private NetParameter() { + name_ = ""; + input_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inputShape_ = java.util.Collections.emptyList(); + inputDim_ = java.util.Collections.emptyList(); + forceBackward_ = false; + debugInfo_ = false; + layer_ = java.util.Collections.emptyList(); + layers_ = java.util.Collections.emptyList(); + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + name_ = bs; + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + input_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + input_.add(bs); + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ = input_.getUnmodifiableView(); + } + 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); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile 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; + } + } + + 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 com.google.protobuf.ProtocolStringList + 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); + } + + 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); + } + + 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); + } + + 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_; + } + + 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : state_; + } + + 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_; + } + + 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); + } + + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < layers_.size(); i++) { + output.writeMessage(2, layers_.get(i)); + } + for (int i = 0; i < input_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, input_.getRaw(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, getState()); + } + 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)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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 += computeStringSizeNoTag(input_.getRaw(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, getState()); + } + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.NetParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.NetParameter) + 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(); + } + } + 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_ = null; + } 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 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_ = input_.getUnmodifiableView(); + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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 com.google.protobuf.ProtocolStringList + getInputList() { + return input_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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; + } + + private caffe.Caffe.NetState state_ = null; + 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_ == null ? caffe.Caffe.NetState.getDefaultInstance() : 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_ != null && + 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_ = null; + 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_ == null ? + caffe.Caffe.NetState.getDefaultInstance() : 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>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + 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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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) + } + + // @@protoc_insertion_point(class_scope:caffe.NetParameter) + private static final caffe.Caffe.NetParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.NetParameter(); + } + + public static caffe.Caffe.NetParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new NetParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.NetParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SolverParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SolverParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * Proto filenames for the test nets.
+     * 
+ */ + com.google.protobuf.ProtocolStringList + 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + boolean hasTrainState(); + /** + * optional .caffe.NetState train_state = 26; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + caffe.Caffe.NetState getTrainState(); + /** + * optional .caffe.NetState train_state = 26; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder(); + + /** + * repeated .caffe.NetState test_state = 27; + */ + 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; + * + *
+     * 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]; + * + *
+     * 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]; + */ + boolean hasTestComputeLoss(); + /** + * optional bool test_compute_loss = 19 [default = false]; + */ + boolean getTestComputeLoss(); + + /** + * 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; + * + *
+     * The base learning rate
+     * 
+ */ + boolean hasBaseLr(); + /** + * optional float base_lr = 5; + * + *
+     * The base learning rate
+     * 
+ */ + float getBaseLr(); + + /** + * 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]; + * + *
+     * 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; + * + *
+     * 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]; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * The momentum value.
+     * 
+ */ + boolean hasMomentum(); + /** + * optional float momentum = 11; + * + *
+     * The momentum value.
+     * 
+ */ + float getMomentum(); + + /** + * 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"]; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * The snapshot interval
+     * 
+ */ + boolean hasSnapshot(); + /** + * optional int32 snapshot = 14 [default = 0]; + * + *
+     * The snapshot interval
+     * 
+ */ + int getSnapshot(); + + /** + * 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]; + * + *
+     * 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]; + */ + 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]; + */ + boolean hasSolverMode(); + /** + * optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU]; + */ + caffe.Caffe.SolverParameter.SolverMode getSolverMode(); + + /** + * 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]; + * + *
+     * 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"]; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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; + * + *
+     * RMSProp decay value
+     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
+     * 
+ */ + boolean hasRmsDecay(); + /** + * optional float rms_decay = 38; + * + *
+     * RMSProp decay value
+     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
+     * 
+ */ + float getRmsDecay(); + + /** + * 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]; + * + *
+     * 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]; + * + *
+     * DEPRECATED: use type instead of solver_type
+     * 
+ */ + boolean hasSolverType(); + /** + * optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD]; + * + *
+     * DEPRECATED: use type instead of solver_type
+     * 
+ */ + caffe.Caffe.SolverParameter.SolverType getSolverType(); + } + /** + * Protobuf type {@code caffe.SolverParameter} + * + *
+   * NOTE
+   * Update the next available ID when you add a new SolverParameter field.
+   * SolverParameter next available ID: 41 (last added: type)
+   * 
+ */ + public static final class SolverParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.SolverParameter) + SolverParameterOrBuilder { + // Use SolverParameter.newBuilder() to construct. + private SolverParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SolverParameter() { + net_ = ""; + trainNet_ = ""; + testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + testNetParam_ = java.util.Collections.emptyList(); + 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_ = 1; + solverMode_ = 1; + deviceId_ = 0; + randomSeed_ = -1L; + type_ = "SGD"; + delta_ = 1e-08F; + momentum2_ = 0.999F; + rmsDecay_ = 0F; + debugInfo_ = false; + snapshotAfterTrain_ = true; + solverType_ = 0; + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + trainNet_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + testNet_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + testNet_.add(bs); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00002000; + lrPolicy_ = bs; + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00400000; + snapshotPrefix_ = bs; + 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_ = rawValue; + } + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + net_ = bs; + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00040000; + regularizationType_ = bs; + 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_ = rawValue; + } + 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_ = rawValue; + } + break; + } + case 309: { + bitField0_ |= 0x80000000; + rmsDecay_ = input.readFloat(); + break; + } + case 317: { + bitField0_ |= 0x40000000; + momentum2_ = input.readFloat(); + break; + } + case 322: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x10000000; + type_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + testNet_ = testNet_.getUnmodifiableView(); + } + 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); + } + + /** + * 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 final com.google.protobuf.Internal.EnumLiteMap< + SnapshotFormat> 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 final com.google.protobuf.Internal.EnumLiteMap< + SolverMode> 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 final com.google.protobuf.Internal.EnumLiteMap< + SolverType> 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_; + public static final int NET_FIELD_NUMBER = 24; + private volatile 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; + } + } + + 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : netParam_; + } + + public static final int TRAIN_NET_FIELD_NUMBER = 1; + private volatile 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; + } + } + + 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 com.google.protobuf.ProtocolStringList + 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); + } + + 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : trainNetParam_; + } + /** + * optional .caffe.NetParameter train_net_param = 21; + * + *
+     * Inline train net params.
+     * 
+ */ + public caffe.Caffe.NetParameterOrBuilder getTrainNetParamOrBuilder() { + return trainNetParam_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : trainNetParam_; + } + + 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); + } + + public static final int TRAIN_STATE_FIELD_NUMBER = 26; + private caffe.Caffe.NetState trainState_; + /** + * optional .caffe.NetState train_state = 26; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + public boolean hasTrainState() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + public caffe.Caffe.NetState getTrainState() { + return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+     * The states for the train/test nets. Must be unspecified or
+     * specified once per net.
+     * By default, all states will have solver = true;
+     * train_state will have phase = TRAIN,
+     * and all test_state's will have phase = TEST.
+     * Other defaults are set according to the NetState defaults.
+     * 
+ */ + public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() { + return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; + } + + 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); + } + + 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); + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + public static final int LR_POLICY_FIELD_NUMBER = 8; + private volatile 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; + } + } + + 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_; + } + + 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_; + } + + 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_; + } + + 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_; + } + + public static final int REGULARIZATION_TYPE_FIELD_NUMBER = 29; + private volatile 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; + } + } + + 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_; + } + + 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); + } + + 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_; + } + + 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_; + } + + public static final int SNAPSHOT_PREFIX_FIELD_NUMBER = 15; + private volatile 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; + } + } + + 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_; + } + + public static final int SNAPSHOT_FORMAT_FIELD_NUMBER = 37; + private int 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() { + caffe.Caffe.SolverParameter.SnapshotFormat result = caffe.Caffe.SolverParameter.SnapshotFormat.valueOf(snapshotFormat_); + return result == null ? caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO : result; + } + + public static final int SOLVER_MODE_FIELD_NUMBER = 17; + private int 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() { + caffe.Caffe.SolverParameter.SolverMode result = caffe.Caffe.SolverParameter.SolverMode.valueOf(solverMode_); + return result == null ? caffe.Caffe.SolverParameter.SolverMode.GPU : result; + } + + 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_; + } + + 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_; + } + + public static final int TYPE_FIELD_NUMBER = 40; + private volatile 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; + } + } + + 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_; + } + + 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_; + } + + public static final int RMS_DECAY_FIELD_NUMBER = 38; + private float rmsDecay_; + /** + * optional float rms_decay = 38; + * + *
+     * 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; + * + *
+     * RMSProp decay value
+     * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
+     * 
+ */ + public float getRmsDecay() { + return rmsDecay_; + } + + 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_; + } + + 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_; + } + + public static final int SOLVER_TYPE_FIELD_NUMBER = 30; + private int 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() { + caffe.Caffe.SolverParameter.SolverType result = caffe.Caffe.SolverParameter.SolverType.valueOf(solverType_); + return result == null ? caffe.Caffe.SolverParameter.SolverType.SGD : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trainNet_); + } + for (int i = 0; i < testNet_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, testNet_.getRaw(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)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, lrPolicy_); + } + 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)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, snapshotPrefix_); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + output.writeBool(16, snapshotDiff_); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + output.writeEnum(17, solverMode_); + } + 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, getTrainNetParam()); + } + 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)) { + com.google.protobuf.GeneratedMessage.writeString(output, 24, net_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(25, getNetParam()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(26, getTrainState()); + } + 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)) { + com.google.protobuf.GeneratedMessage.writeString(output, 29, regularizationType_); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + output.writeEnum(30, solverType_); + } + 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_); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + output.writeFloat(38, rmsDecay_); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + output.writeFloat(39, momentum2_); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + com.google.protobuf.GeneratedMessage.writeString(output, 40, type_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trainNet_); + } + { + int dataSize = 0; + for (int i = 0; i < testNet_.size(); i++) { + dataSize += computeStringSizeNoTag(testNet_.getRaw(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.GeneratedMessage.computeStringSize(8, lrPolicy_); + } + 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.GeneratedMessage.computeStringSize(15, snapshotPrefix_); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, snapshotDiff_); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(17, solverMode_); + } + 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, getTrainNetParam()); + } + 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.GeneratedMessage.computeStringSize(24, net_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getNetParam()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(26, getTrainState()); + } + 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.GeneratedMessage.computeStringSize(29, regularizationType_); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(30, solverType_); + } + 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_); + } + 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.GeneratedMessage.computeStringSize(40, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SolverParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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: 41 (last added: type)
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.SolverParameter) + 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(); + } + } + public Builder clear() { + super.clear(); + net_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (netParamBuilder_ == null) { + netParam_ = null; + } else { + netParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + trainNet_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + testNet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (trainNetParamBuilder_ == null) { + trainNetParam_ = null; + } else { + trainNetParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (testNetParamBuilder_ == null) { + testNetParam_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + testNetParamBuilder_.clear(); + } + if (trainStateBuilder_ == null) { + trainState_ = null; + } 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_ = 1; + bitField0_ = (bitField0_ & ~0x20000000); + solverMode_ = 1; + 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_ = 0F; + bitField1_ = (bitField1_ & ~0x00000010); + debugInfo_ = false; + bitField1_ = (bitField1_ & ~0x00000020); + snapshotAfterTrain_ = true; + bitField1_ = (bitField1_ & ~0x00000040); + solverType_ = 0; + bitField1_ = (bitField1_ & ~0x00000080); + return this; + } + + 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_ = testNet_.getUnmodifiableView(); + 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_; + 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()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + private caffe.Caffe.NetParameter netParam_ = null; + 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ != null && + 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_ = null; + 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_ == null ? + caffe.Caffe.NetParameter.getDefaultInstance() : 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>( + getNetParam(), + getParentForChildren(), + isClean()); + netParam_ = null; + } + return netParamBuilder_; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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 com.google.protobuf.ProtocolStringList + getTestNetList() { + return testNet_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + private caffe.Caffe.NetParameter trainNetParam_ = null; + 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_ == null ? caffe.Caffe.NetParameter.getDefaultInstance() : 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_ != null && + 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_ = null; + 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_ == null ? + caffe.Caffe.NetParameter.getDefaultInstance() : 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>( + getTrainNetParam(), + getParentForChildren(), + isClean()); + trainNetParam_ = null; + } + return trainNetParamBuilder_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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_; + } + + private caffe.Caffe.NetState trainState_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> trainStateBuilder_; + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public boolean hasTrainState() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public caffe.Caffe.NetState getTrainState() { + if (trainStateBuilder_ == null) { + return trainState_ == null ? caffe.Caffe.NetState.getDefaultInstance() : trainState_; + } else { + return trainStateBuilder_.getMessage(); + } + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public Builder setTrainState(caffe.Caffe.NetState value) { + if (trainStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainState_ = value; + onChanged(); + } else { + trainStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public Builder setTrainState( + caffe.Caffe.NetState.Builder builderForValue) { + if (trainStateBuilder_ == null) { + trainState_ = builderForValue.build(); + onChanged(); + } else { + trainStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public Builder mergeTrainState(caffe.Caffe.NetState value) { + if (trainStateBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040) && + trainState_ != null && + trainState_ != caffe.Caffe.NetState.getDefaultInstance()) { + trainState_ = + caffe.Caffe.NetState.newBuilder(trainState_).mergeFrom(value).buildPartial(); + } else { + trainState_ = value; + } + onChanged(); + } else { + trainStateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public Builder clearTrainState() { + if (trainStateBuilder_ == null) { + trainState_ = null; + onChanged(); + } else { + trainStateBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public caffe.Caffe.NetState.Builder getTrainStateBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getTrainStateFieldBuilder().getBuilder(); + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + public caffe.Caffe.NetStateOrBuilder getTrainStateOrBuilder() { + if (trainStateBuilder_ != null) { + return trainStateBuilder_.getMessageOrBuilder(); + } else { + return trainState_ == null ? + caffe.Caffe.NetState.getDefaultInstance() : trainState_; + } + } + /** + * optional .caffe.NetState train_state = 26; + * + *
+       * The states for the train/test nets. Must be unspecified or
+       * specified once per net.
+       * By default, all states will have solver = true;
+       * train_state will have phase = TRAIN,
+       * and all test_state's will have phase = TEST.
+       * Other defaults are set according to the NetState defaults.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder> + getTrainStateFieldBuilder() { + if (trainStateBuilder_ == null) { + trainStateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.NetState, caffe.Caffe.NetState.Builder, caffe.Caffe.NetStateOrBuilder>( + getTrainState(), + getParentForChildren(), + isClean()); + trainState_ = null; + } + return trainStateBuilder_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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_; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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; + } + + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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; + } + + private int snapshotFormat_ = 1; + /** + * 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() { + caffe.Caffe.SolverParameter.SnapshotFormat result = caffe.Caffe.SolverParameter.SnapshotFormat.valueOf(snapshotFormat_); + return result == null ? caffe.Caffe.SolverParameter.SnapshotFormat.BINARYPROTO : result; + } + /** + * 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.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO]; + */ + public Builder clearSnapshotFormat() { + bitField0_ = (bitField0_ & ~0x20000000); + snapshotFormat_ = 1; + onChanged(); + return this; + } + + private int solverMode_ = 1; + /** + * 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() { + caffe.Caffe.SolverParameter.SolverMode result = caffe.Caffe.SolverParameter.SolverMode.valueOf(solverMode_); + return result == null ? caffe.Caffe.SolverParameter.SolverMode.GPU : result; + } + /** + * 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.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU]; + */ + public Builder clearSolverMode() { + bitField0_ = (bitField0_ & ~0x40000000); + solverMode_ = 1; + onChanged(); + return this; + } + + 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; + } + + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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; + } + + 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; + } + + private float rmsDecay_ ; + /** + * optional float rms_decay = 38; + * + *
+       * 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; + * + *
+       * 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; + * + *
+       * 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; + * + *
+       * RMSProp decay value
+       * MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
+       * 
+ */ + public Builder clearRmsDecay() { + bitField1_ = (bitField1_ & ~0x00000010); + rmsDecay_ = 0F; + onChanged(); + return this; + } + + 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; + } + + 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; + } + + private int solverType_ = 0; + /** + * 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() { + caffe.Caffe.SolverParameter.SolverType result = caffe.Caffe.SolverParameter.SolverType.valueOf(solverType_); + return result == null ? caffe.Caffe.SolverParameter.SolverType.SGD : result; + } + /** + * 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.getNumber(); + 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_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.SolverParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.SolverParameter) + private static final caffe.Caffe.SolverParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SolverParameter(); + } + + public static caffe.Caffe.SolverParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new SolverParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SolverParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SolverStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SolverState) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 iter = 1; + * + *
+     * The current iteration
+     * 
+ */ + boolean hasIter(); + /** + * optional int32 iter = 1; + * + *
+     * The current iteration
+     * 
+ */ + int getIter(); + + /** + * 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; + * + *
+     * 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]; + * + *
+     * 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 + // @@protoc_insertion_point(message_implements:caffe.SolverState) + SolverStateOrBuilder { + // Use SolverState.newBuilder() to construct. + private SolverState(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SolverState() { + iter_ = 0; + learnedNet_ = ""; + history_ = java.util.Collections.emptyList(); + currentStep_ = 0; + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + learnedNet_ = bs; + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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); + } + + private int bitField0_; + 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_; + } + + public static final int LEARNED_NET_FIELD_NUMBER = 2; + private volatile 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; + } + } + + 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); + } + + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, iter_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, learnedNet_); + } + for (int i = 0; i < history_.size(); i++) { + output.writeMessage(3, history_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(4, currentStep_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + 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.GeneratedMessage.computeStringSize(2, learnedNet_); + } + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SolverState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.SolverState) + 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(); + } + } + 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 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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(); + com.google.protobuf.AbstractMessageLite.Builder.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_; + } + + 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) + } + + // @@protoc_insertion_point(class_scope:caffe.SolverState) + private static final caffe.Caffe.SolverState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SolverState(); + } + + public static caffe.Caffe.SolverState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new SolverState(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SolverState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.NetState) + com.google.protobuf.MessageOrBuilder { + + /** + * 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]; + */ + boolean hasLevel(); + /** + * optional int32 level = 2 [default = 0]; + */ + int getLevel(); + + /** + * repeated string stage = 3; + */ + com.google.protobuf.ProtocolStringList + 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 + // @@protoc_insertion_point(message_implements:caffe.NetState) + NetStateOrBuilder { + // Use NetState.newBuilder() to construct. + private NetState(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private NetState() { + phase_ = 1; + level_ = 0; + stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @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) { + this(); + 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_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + level_ = input.readInt32(); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + stage_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + stage_.add(bs); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + stage_ = stage_.getUnmodifiableView(); + } + 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); + } + + private int bitField0_; + public static final int PHASE_FIELD_NUMBER = 1; + private int 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TEST : result; + } + + 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_; + } + + public static final int STAGE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList stage_; + /** + * repeated string stage = 3; + */ + public com.google.protobuf.ProtocolStringList + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, phase_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, level_); + } + for (int i = 0; i < stage_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, stage_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, phase_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, level_); + } + { + int dataSize = 0; + for (int i = 0; i < stage_.size(); i++) { + dataSize += computeStringSizeNoTag(stage_.getRaw(i)); + } + size += dataSize; + size += 1 * getStageList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.NetState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.NetState) + 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) { + } + } + public Builder clear() { + super.clear(); + phase_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + level_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + 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_ = stage_.getUnmodifiableView(); + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + private int phase_ = 1; + /** + * 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TEST : result; + } + /** + * optional .caffe.Phase phase = 1 [default = TEST]; + */ + public Builder setPhase(caffe.Caffe.Phase value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + phase_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.Phase phase = 1 [default = TEST]; + */ + public Builder clearPhase() { + bitField0_ = (bitField0_ & ~0x00000001); + phase_ = 1; + onChanged(); + return this; + } + + 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; + } + + 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 com.google.protobuf.ProtocolStringList + getStageList() { + return stage_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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) + } + + // @@protoc_insertion_point(class_scope:caffe.NetState) + private static final caffe.Caffe.NetState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.NetState(); + } + + public static caffe.Caffe.NetState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new NetState(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.NetState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetStateRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.NetStateRule) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * 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; + */ + boolean hasMaxLevel(); + /** + * optional int32 max_level = 3; + */ + int getMaxLevel(); + + /** + * 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.ProtocolStringList + 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; + */ + com.google.protobuf.ProtocolStringList + 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 + // @@protoc_insertion_point(message_implements:caffe.NetStateRule) + NetStateRuleOrBuilder { + // Use NetStateRule.newBuilder() to construct. + private NetStateRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private NetStateRule() { + phase_ = 0; + minLevel_ = 0; + maxLevel_ = 0; + stage_ = com.google.protobuf.LazyStringArrayList.EMPTY; + notStage_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @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) { + this(); + 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_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + minLevel_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + maxLevel_ = input.readInt32(); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + stage_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + stage_.add(bs); + break; + } + case 42: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + notStage_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000010; + } + notStage_.add(bs); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + stage_ = stage_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + notStage_ = notStage_.getUnmodifiableView(); + } + 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); + } + + private int bitField0_; + public static final int PHASE_FIELD_NUMBER = 1; + private int 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TRAIN : result; + } + + 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_; + } + + 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_; + } + + 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 com.google.protobuf.ProtocolStringList + 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); + } + + public static final int NOT_STAGE_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList notStage_; + /** + * repeated string not_stage = 5; + */ + public com.google.protobuf.ProtocolStringList + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, phase_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, minLevel_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, maxLevel_); + } + for (int i = 0; i < stage_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, stage_.getRaw(i)); + } + for (int i = 0; i < notStage_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, notStage_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, phase_); + } + 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 += computeStringSizeNoTag(stage_.getRaw(i)); + } + size += dataSize; + size += 1 * getStageList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < notStage_.size(); i++) { + dataSize += computeStringSizeNoTag(notStage_.getRaw(i)); + } + size += dataSize; + size += 1 * getNotStageList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.NetStateRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.NetStateRule) + 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) { + } + } + public Builder clear() { + super.clear(); + phase_ = 0; + 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 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_ = stage_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.stage_ = stage_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + notStage_ = notStage_.getUnmodifiableView(); + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + private int phase_ = 0; + /** + * 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TRAIN : result; + } + /** + * 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.getNumber(); + 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_ = 0; + onChanged(); + return this; + } + + 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; + } + + 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; + } + + 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 com.google.protobuf.ProtocolStringList + getStageList() { + return stage_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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 com.google.protobuf.ProtocolStringList + getNotStageList() { + return notStage_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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) + } + + // @@protoc_insertion_point(class_scope:caffe.NetStateRule) + private static final caffe.Caffe.NetStateRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.NetStateRule(); + } + + public static caffe.Caffe.NetStateRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new NetStateRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.NetStateRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ParamSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ParamSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * 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]; + * + *
+     * 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]; + * + *
+     * 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 + // @@protoc_insertion_point(message_implements:caffe.ParamSpec) + ParamSpecOrBuilder { + // Use ParamSpec.newBuilder() to construct. + private ParamSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ParamSpec() { + name_ = ""; + shareMode_ = 0; + lrMult_ = 1F; + decayMult_ = 1F; + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + name_ = bs; + 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_ = rawValue; + } + break; + } + case 29: { + bitField0_ |= 0x00000004; + lrMult_ = input.readFloat(); + break; + } + case 37: { + bitField0_ |= 0x00000008; + decayMult_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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); + } + + /** + * 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 final com.google.protobuf.Internal.EnumLiteMap< + DimCheckMode> 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_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile 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; + } + } + + public static final int SHARE_MODE_FIELD_NUMBER = 2; + private int 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() { + caffe.Caffe.ParamSpec.DimCheckMode result = caffe.Caffe.ParamSpec.DimCheckMode.valueOf(shareMode_); + return result == null ? caffe.Caffe.ParamSpec.DimCheckMode.STRICT : result; + } + + 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_; + } + + 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 byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, shareMode_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, lrMult_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeFloat(4, decayMult_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, shareMode_); + } + 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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ParamSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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 + // @@protoc_insertion_point(builder_implements:caffe.ParamSpec) + 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) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + shareMode_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + lrMult_ = 1F; + bitField0_ = (bitField0_ & ~0x00000004); + decayMult_ = 1F; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + private int shareMode_ = 0; + /** + * 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() { + caffe.Caffe.ParamSpec.DimCheckMode result = caffe.Caffe.ParamSpec.DimCheckMode.valueOf(shareMode_); + return result == null ? caffe.Caffe.ParamSpec.DimCheckMode.STRICT : result; + } + /** + * 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.getNumber(); + 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_ = 0; + onChanged(); + return this; + } + + 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; + } + + 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) + } + + // @@protoc_insertion_point(class_scope:caffe.ParamSpec) + private static final caffe.Caffe.ParamSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ParamSpec(); + } + + public static caffe.Caffe.ParamSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new ParamSpec(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ParamSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LayerParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.LayerParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * 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; + * + *
+     * the name of each bottom blob
+     * 
+ */ + com.google.protobuf.ProtocolStringList + 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; + * + *
+     * the name of each top blob
+     * 
+ */ + com.google.protobuf.ProtocolStringList + 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * Specifies on which bottoms the backpropagation should be skipped.
+     * The size must be either 0 or equal to the number of bottoms.
+     * 
+ */ + java.util.List getPropagateDownList(); + /** + * repeated bool propagate_down = 11; + * + *
+     * Specifies on which bottoms the backpropagation should be skipped.
+     * The size must be either 0 or equal to the number of bottoms.
+     * 
+ */ + int getPropagateDownCount(); + /** + * repeated bool propagate_down = 11; + * + *
+     * Specifies on which bottoms the backpropagation should be skipped.
+     * The size must be either 0 or equal to the number of bottoms.
+     * 
+ */ + boolean getPropagateDown(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.
+     * 
+ */ + 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; + */ + 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; + * + *
+     * 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; + * + *
+     * 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; + * + *
+     * 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + boolean hasMvnParam(); + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + caffe.Caffe.MVNParameter getMvnParam(); + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder(); + + /** + * 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; + */ + 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; + */ + 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; + */ + boolean hasPythonParam(); + /** + * optional .caffe.PythonParameter python_param = 130; + */ + caffe.Caffe.PythonParameter getPythonParam(); + /** + * optional .caffe.PythonParameter python_param = 130; + */ + caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder(); + + /** + * 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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; + */ + 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: 145 (last added: crop_param)
+   * 
+ */ + public static final class LayerParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.LayerParameter) + LayerParameterOrBuilder { + // Use LayerParameter.newBuilder() to construct. + private LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LayerParameter() { + name_ = ""; + type_ = ""; + bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; + top_ = com.google.protobuf.LazyStringArrayList.EMPTY; + phase_ = 0; + 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(); + } + + @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) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + name_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + type_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + bottom_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + bottom_.add(bs); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + top_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + top_.add(bs); + 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_ = rawValue; + } + 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_ & 0x00000001) == 0x00000001)) { + subBuilder = poolingParam_.toBuilder(); + } + poolingParam_ = input.readMessage(caffe.Caffe.PoolingParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(poolingParam_); + poolingParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000001; + break; + } + case 978: { + caffe.Caffe.PowerParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000002) == 0x00000002)) { + subBuilder = powerParam_.toBuilder(); + } + powerParam_ = input.readMessage(caffe.Caffe.PowerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(powerParam_); + powerParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000002; + break; + } + case 986: { + caffe.Caffe.ReLUParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000020) == 0x00000020)) { + subBuilder = reluParam_.toBuilder(); + } + reluParam_ = input.readMessage(caffe.Caffe.ReLUParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reluParam_); + reluParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000020; + break; + } + case 994: { + caffe.Caffe.SigmoidParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000100) == 0x00000100)) { + subBuilder = sigmoidParam_.toBuilder(); + } + sigmoidParam_ = input.readMessage(caffe.Caffe.SigmoidParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sigmoidParam_); + sigmoidParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000100; + break; + } + case 1002: { + caffe.Caffe.SoftmaxParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000200) == 0x00000200)) { + subBuilder = softmaxParam_.toBuilder(); + } + softmaxParam_ = input.readMessage(caffe.Caffe.SoftmaxParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softmaxParam_); + softmaxParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000200; + break; + } + case 1010: { + caffe.Caffe.SliceParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000800) == 0x00000800)) { + subBuilder = sliceParam_.toBuilder(); + } + sliceParam_ = input.readMessage(caffe.Caffe.SliceParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sliceParam_); + sliceParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000800; + break; + } + case 1018: { + caffe.Caffe.TanHParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00001000) == 0x00001000)) { + subBuilder = tanhParam_.toBuilder(); + } + tanhParam_ = input.readMessage(caffe.Caffe.TanHParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tanhParam_); + tanhParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00001000; + break; + } + case 1026: { + caffe.Caffe.ThresholdParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00002000) == 0x00002000)) { + subBuilder = thresholdParam_.toBuilder(); + } + thresholdParam_ = input.readMessage(caffe.Caffe.ThresholdParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(thresholdParam_); + thresholdParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00002000; + break; + } + case 1034: { + caffe.Caffe.WindowDataParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00008000) == 0x00008000)) { + subBuilder = windowDataParam_.toBuilder(); + } + windowDataParam_ = input.readMessage(caffe.Caffe.WindowDataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowDataParam_); + windowDataParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00008000; + break; + } + case 1042: { + caffe.Caffe.PythonParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000008) == 0x00000008)) { + subBuilder = pythonParam_.toBuilder(); + } + pythonParam_ = input.readMessage(caffe.Caffe.PythonParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pythonParam_); + pythonParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000008; + break; + } + case 1050: { + caffe.Caffe.PReLUParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000004) == 0x00000004)) { + subBuilder = preluParam_.toBuilder(); + } + preluParam_ = input.readMessage(caffe.Caffe.PReLUParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(preluParam_); + preluParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000004; + break; + } + case 1058: { + caffe.Caffe.SPPParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000400) == 0x00000400)) { + subBuilder = sppParam_.toBuilder(); + } + sppParam_ = input.readMessage(caffe.Caffe.SPPParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sppParam_); + sppParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000400; + break; + } + case 1066: { + caffe.Caffe.ReshapeParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000040) == 0x00000040)) { + subBuilder = reshapeParam_.toBuilder(); + } + reshapeParam_ = input.readMessage(caffe.Caffe.ReshapeParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reshapeParam_); + reshapeParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000040; + 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_ & 0x00000010) == 0x00000010)) { + subBuilder = reductionParam_.toBuilder(); + } + reductionParam_ = input.readMessage(caffe.Caffe.ReductionParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reductionParam_); + reductionParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000010; + 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_ & 0x00004000) == 0x00004000)) { + subBuilder = tileParam_.toBuilder(); + } + tileParam_ = input.readMessage(caffe.Caffe.TileParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tileParam_); + tileParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00004000; + 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_ & 0x00000080) == 0x00000080)) { + subBuilder = scaleParam_.toBuilder(); + } + scaleParam_ = input.readMessage(caffe.Caffe.ScaleParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scaleParam_); + scaleParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000080; + 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; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + bottom_ = bottom_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + top_ = top_.getUnmodifiableView(); + } + 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); + } + + private int bitField0_; + private int bitField1_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile 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; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile 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; + } + } + + 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 com.google.protobuf.ProtocolStringList + 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); + } + + 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 com.google.protobuf.ProtocolStringList + 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); + } + + public static final int PHASE_FIELD_NUMBER = 10; + private int 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TRAIN : result; + } + + 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); + } + + 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); + } + + 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); + } + + public static final int PROPAGATE_DOWN_FIELD_NUMBER = 11; + private java.util.List propagateDown_; + /** + * repeated bool propagate_down = 11; + * + *
+     * Specifies on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be skipped.
+     * The size must be either 0 or equal to the number of bottoms.
+     * 
+ */ + public boolean getPropagateDown(int index) { + return propagateDown_.get(index); + } + + 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); + } + + 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); + } + + 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_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+     * Parameters for data pre-processing.
+     * 
+ */ + public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { + return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + + 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_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+     * Parameters shared by loss layers.
+     * 
+ */ + public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { + return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + + 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_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : 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_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } + + 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_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { + return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + + 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_ == null ? caffe.Caffe.BatchNormParameter.getDefaultInstance() : batchNormParam_; + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public caffe.Caffe.BatchNormParameterOrBuilder getBatchNormParamOrBuilder() { + return batchNormParam_ == null ? caffe.Caffe.BatchNormParameter.getDefaultInstance() : batchNormParam_; + } + + 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_ == null ? caffe.Caffe.BiasParameter.getDefaultInstance() : biasParam_; + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public caffe.Caffe.BiasParameterOrBuilder getBiasParamOrBuilder() { + return biasParam_ == null ? caffe.Caffe.BiasParameter.getDefaultInstance() : biasParam_; + } + + 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_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { + return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + + 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_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { + return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + + 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_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { + return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + + 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_ == null ? caffe.Caffe.CropParameter.getDefaultInstance() : cropParam_; + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public caffe.Caffe.CropParameterOrBuilder getCropParamOrBuilder() { + return cropParam_ == null ? caffe.Caffe.CropParameter.getDefaultInstance() : cropParam_; + } + + 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_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { + return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + + 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_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { + return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + + 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_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { + return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + + 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_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { + return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + + 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_ == null ? caffe.Caffe.ELUParameter.getDefaultInstance() : eluParam_; + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public caffe.Caffe.ELUParameterOrBuilder getEluParamOrBuilder() { + return eluParam_ == null ? caffe.Caffe.ELUParameter.getDefaultInstance() : eluParam_; + } + + 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_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder() { + return embedParam_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; + } + + 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_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { + return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + + 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_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder() { + return flattenParam_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; + } + + 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_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { + return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + + 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_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + + 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_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { + return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + + 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_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { + return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + + 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_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { + return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + + 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_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { + return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + + 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_ == null ? caffe.Caffe.InputParameter.getDefaultInstance() : inputParam_; + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public caffe.Caffe.InputParameterOrBuilder getInputParamOrBuilder() { + return inputParam_ == null ? caffe.Caffe.InputParameter.getDefaultInstance() : inputParam_; + } + + 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_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder() { + return logParam_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; + } + + 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_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { + return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + + 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_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { + return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + + 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_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { + return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + + 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_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public caffe.Caffe.PoolingParameter getPoolingParam() { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + + 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_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public caffe.Caffe.PowerParameter getPowerParam() { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + + 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_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public caffe.Caffe.PReLUParameter getPreluParam() { + return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder() { + return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; + } + + 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_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public caffe.Caffe.PythonParameter getPythonParam() { + return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder() { + return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; + } + + 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_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public caffe.Caffe.ReductionParameter getReductionParam() { + return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder() { + return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; + } + + 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_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public caffe.Caffe.ReLUParameter getReluParam() { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + + 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_ & 0x00000040) == 0x00000040); + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public caffe.Caffe.ReshapeParameter getReshapeParam() { + return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder() { + return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; + } + + 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_ & 0x00000080) == 0x00000080); + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public caffe.Caffe.ScaleParameter getScaleParam() { + return scaleParam_ == null ? caffe.Caffe.ScaleParameter.getDefaultInstance() : scaleParam_; + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public caffe.Caffe.ScaleParameterOrBuilder getScaleParamOrBuilder() { + return scaleParam_ == null ? caffe.Caffe.ScaleParameter.getDefaultInstance() : scaleParam_; + } + + 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_ & 0x00000100) == 0x00000100); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public caffe.Caffe.SigmoidParameter getSigmoidParam() { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + + 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_ & 0x00000200) == 0x00000200); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + + 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_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public caffe.Caffe.SPPParameter getSppParam() { + return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder() { + return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; + } + + 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_ & 0x00000800) == 0x00000800); + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public caffe.Caffe.SliceParameter getSliceParam() { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + + 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_ & 0x00001000) == 0x00001000); + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public caffe.Caffe.TanHParameter getTanhParam() { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + + 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_ & 0x00002000) == 0x00002000); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public caffe.Caffe.ThresholdParameter getThresholdParam() { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + + 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_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public caffe.Caffe.TileParameter getTileParam() { + return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder() { + return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; + } + + 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_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public caffe.Caffe.WindowDataParameter getWindowDataParam() { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); + } + for (int i = 0; i < bottom_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, bottom_.getRaw(i)); + } + for (int i = 0; i < top_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, top_.getRaw(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_); + } + for (int i = 0; i < propagateDown_.size(); i++) { + output.writeBool(11, propagateDown_.get(i)); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(100, getTransformParam()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(101, getLossParam()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(102, getAccuracyParam()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(103, getArgmaxParam()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(104, getConcatParam()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeMessage(105, getContrastiveLossParam()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeMessage(106, getConvolutionParam()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeMessage(107, getDataParam()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + output.writeMessage(108, getDropoutParam()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeMessage(109, getDummyDataParam()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + output.writeMessage(110, getEltwiseParam()); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + output.writeMessage(111, getExpParam()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + output.writeMessage(112, getHdf5DataParam()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + output.writeMessage(113, getHdf5OutputParam()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + output.writeMessage(114, getHingeLossParam()); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + output.writeMessage(115, getImageDataParam()); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + output.writeMessage(116, getInfogainLossParam()); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + output.writeMessage(117, getInnerProductParam()); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + output.writeMessage(118, getLrnParam()); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + output.writeMessage(119, getMemoryDataParam()); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + output.writeMessage(120, getMvnParam()); + } + if (((bitField1_ & 0x00000001) == 0x00000001)) { + output.writeMessage(121, getPoolingParam()); + } + if (((bitField1_ & 0x00000002) == 0x00000002)) { + output.writeMessage(122, getPowerParam()); + } + if (((bitField1_ & 0x00000020) == 0x00000020)) { + output.writeMessage(123, getReluParam()); + } + if (((bitField1_ & 0x00000100) == 0x00000100)) { + output.writeMessage(124, getSigmoidParam()); + } + if (((bitField1_ & 0x00000200) == 0x00000200)) { + output.writeMessage(125, getSoftmaxParam()); + } + if (((bitField1_ & 0x00000800) == 0x00000800)) { + output.writeMessage(126, getSliceParam()); + } + if (((bitField1_ & 0x00001000) == 0x00001000)) { + output.writeMessage(127, getTanhParam()); + } + if (((bitField1_ & 0x00002000) == 0x00002000)) { + output.writeMessage(128, getThresholdParam()); + } + if (((bitField1_ & 0x00008000) == 0x00008000)) { + output.writeMessage(129, getWindowDataParam()); + } + if (((bitField1_ & 0x00000008) == 0x00000008)) { + output.writeMessage(130, getPythonParam()); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + output.writeMessage(131, getPreluParam()); + } + if (((bitField1_ & 0x00000400) == 0x00000400)) { + output.writeMessage(132, getSppParam()); + } + if (((bitField1_ & 0x00000040) == 0x00000040)) { + output.writeMessage(133, getReshapeParam()); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + output.writeMessage(134, getLogParam()); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + output.writeMessage(135, getFlattenParam()); + } + if (((bitField1_ & 0x00000010) == 0x00000010)) { + output.writeMessage(136, getReductionParam()); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + output.writeMessage(137, getEmbedParam()); + } + if (((bitField1_ & 0x00004000) == 0x00004000)) { + output.writeMessage(138, getTileParam()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(139, getBatchNormParam()); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeMessage(140, getEluParam()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeMessage(141, getBiasParam()); + } + if (((bitField1_ & 0x00000080) == 0x00000080)) { + output.writeMessage(142, getScaleParam()); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + output.writeMessage(143, getInputParam()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeMessage(144, getCropParam()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); + } + { + int dataSize = 0; + for (int i = 0; i < bottom_.size(); i++) { + dataSize += computeStringSizeNoTag(bottom_.getRaw(i)); + } + size += dataSize; + size += 1 * getBottomList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < top_.size(); i++) { + dataSize += computeStringSizeNoTag(top_.getRaw(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_); + } + { + int dataSize = 0; + dataSize = 1 * getPropagateDownList().size(); + size += dataSize; + size += 1 * getPropagateDownList().size(); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getTransformParam()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(101, getLossParam()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(102, getAccuracyParam()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(103, getArgmaxParam()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(104, getConcatParam()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(105, getContrastiveLossParam()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(106, getConvolutionParam()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(107, getDataParam()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(108, getDropoutParam()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(109, getDummyDataParam()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(110, getEltwiseParam()); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(111, getExpParam()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(112, getHdf5DataParam()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(113, getHdf5OutputParam()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(114, getHingeLossParam()); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(115, getImageDataParam()); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(116, getInfogainLossParam()); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(117, getInnerProductParam()); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(118, getLrnParam()); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(119, getMemoryDataParam()); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(120, getMvnParam()); + } + if (((bitField1_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(121, getPoolingParam()); + } + if (((bitField1_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(122, getPowerParam()); + } + if (((bitField1_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(123, getReluParam()); + } + if (((bitField1_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(124, getSigmoidParam()); + } + if (((bitField1_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(125, getSoftmaxParam()); + } + if (((bitField1_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(126, getSliceParam()); + } + if (((bitField1_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(127, getTanhParam()); + } + if (((bitField1_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(128, getThresholdParam()); + } + if (((bitField1_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(129, getWindowDataParam()); + } + if (((bitField1_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(130, getPythonParam()); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(131, getPreluParam()); + } + if (((bitField1_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(132, getSppParam()); + } + if (((bitField1_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(133, getReshapeParam()); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(134, getLogParam()); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(135, getFlattenParam()); + } + if (((bitField1_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(136, getReductionParam()); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(137, getEmbedParam()); + } + if (((bitField1_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(138, getTileParam()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(139, getBatchNormParam()); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(140, getEluParam()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(141, getBiasParam()); + } + if (((bitField1_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(142, getScaleParam()); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(143, getInputParam()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(144, getCropParam()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.LayerParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.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: 145 (last added: crop_param)
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.LayerParameter) + 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(); + getPoolingParamFieldBuilder(); + getPowerParamFieldBuilder(); + getPreluParamFieldBuilder(); + getPythonParamFieldBuilder(); + getReductionParamFieldBuilder(); + getReluParamFieldBuilder(); + getReshapeParamFieldBuilder(); + getScaleParamFieldBuilder(); + getSigmoidParamFieldBuilder(); + getSoftmaxParamFieldBuilder(); + getSppParamFieldBuilder(); + getSliceParamFieldBuilder(); + getTanhParamFieldBuilder(); + getThresholdParamFieldBuilder(); + getTileParamFieldBuilder(); + getWindowDataParamFieldBuilder(); + } + } + 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_ = 0; + 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_ = null; + } else { + transformParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (lossParamBuilder_ == null) { + lossParam_ = null; + } else { + lossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + if (accuracyParamBuilder_ == null) { + accuracyParam_ = null; + } else { + accuracyParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (argmaxParamBuilder_ == null) { + argmaxParam_ = null; + } else { + argmaxParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + if (batchNormParamBuilder_ == null) { + batchNormParam_ = null; + } else { + batchNormParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + if (biasParamBuilder_ == null) { + biasParam_ = null; + } else { + biasParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + if (concatParamBuilder_ == null) { + concatParam_ = null; + } else { + concatParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = null; + } else { + contrastiveLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + if (convolutionParamBuilder_ == null) { + convolutionParam_ = null; + } else { + convolutionParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + if (cropParamBuilder_ == null) { + cropParam_ = null; + } else { + cropParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + if (dataParamBuilder_ == null) { + dataParam_ = null; + } else { + dataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00200000); + if (dropoutParamBuilder_ == null) { + dropoutParam_ = null; + } else { + dropoutParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = null; + } else { + dummyDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00800000); + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = null; + } else { + eltwiseParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); + if (eluParamBuilder_ == null) { + eluParam_ = null; + } else { + eluParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); + if (embedParamBuilder_ == null) { + embedParam_ = null; + } else { + embedParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x04000000); + if (expParamBuilder_ == null) { + expParam_ = null; + } else { + expParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x08000000); + if (flattenParamBuilder_ == null) { + flattenParam_ = null; + } else { + flattenParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = null; + } else { + hdf5DataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x40000000); + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = null; + } else { + hingeLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + if (imageDataParamBuilder_ == null) { + imageDataParam_ = null; + } else { + imageDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = null; + } else { + infogainLossParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000002); + if (innerProductParamBuilder_ == null) { + innerProductParam_ = null; + } else { + innerProductParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000004); + if (inputParamBuilder_ == null) { + inputParam_ = null; + } else { + inputParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000008); + if (logParamBuilder_ == null) { + logParam_ = null; + } else { + logParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000010); + if (lrnParamBuilder_ == null) { + lrnParam_ = null; + } else { + lrnParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = null; + } else { + memoryDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000040); + if (mvnParamBuilder_ == null) { + mvnParam_ = null; + } else { + mvnParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000080); + if (poolingParamBuilder_ == null) { + poolingParam_ = null; + } else { + poolingParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000100); + if (powerParamBuilder_ == null) { + powerParam_ = null; + } else { + powerParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000200); + if (preluParamBuilder_ == null) { + preluParam_ = null; + } else { + preluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000400); + if (pythonParamBuilder_ == null) { + pythonParam_ = null; + } else { + pythonParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000800); + if (reductionParamBuilder_ == null) { + reductionParam_ = null; + } else { + reductionParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00001000); + if (reluParamBuilder_ == null) { + reluParam_ = null; + } else { + reluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00002000); + if (reshapeParamBuilder_ == null) { + reshapeParam_ = null; + } else { + reshapeParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00004000); + if (scaleParamBuilder_ == null) { + scaleParam_ = null; + } else { + scaleParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00008000); + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = null; + } else { + sigmoidParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00010000); + if (softmaxParamBuilder_ == null) { + softmaxParam_ = null; + } else { + softmaxParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00020000); + if (sppParamBuilder_ == null) { + sppParam_ = null; + } else { + sppParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00040000); + if (sliceParamBuilder_ == null) { + sliceParam_ = null; + } else { + sliceParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00080000); + if (tanhParamBuilder_ == null) { + tanhParam_ = null; + } else { + tanhParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00100000); + if (thresholdParamBuilder_ == null) { + thresholdParam_ = null; + } else { + thresholdParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00200000); + if (tileParamBuilder_ == null) { + tileParam_ = null; + } else { + tileParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00400000); + if (windowDataParamBuilder_ == null) { + windowDataParam_ = null; + } else { + windowDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00800000); + return this; + } + + 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_ = bottom_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.bottom_ = bottom_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + top_ = top_.getUnmodifiableView(); + 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 (poolingParamBuilder_ == null) { + result.poolingParam_ = poolingParam_; + } else { + result.poolingParam_ = poolingParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000200) == 0x00000200)) { + to_bitField1_ |= 0x00000002; + } + if (powerParamBuilder_ == null) { + result.powerParam_ = powerParam_; + } else { + result.powerParam_ = powerParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000400) == 0x00000400)) { + to_bitField1_ |= 0x00000004; + } + if (preluParamBuilder_ == null) { + result.preluParam_ = preluParam_; + } else { + result.preluParam_ = preluParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000800) == 0x00000800)) { + to_bitField1_ |= 0x00000008; + } + if (pythonParamBuilder_ == null) { + result.pythonParam_ = pythonParam_; + } else { + result.pythonParam_ = pythonParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00001000) == 0x00001000)) { + to_bitField1_ |= 0x00000010; + } + if (reductionParamBuilder_ == null) { + result.reductionParam_ = reductionParam_; + } else { + result.reductionParam_ = reductionParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00002000) == 0x00002000)) { + to_bitField1_ |= 0x00000020; + } + if (reluParamBuilder_ == null) { + result.reluParam_ = reluParam_; + } else { + result.reluParam_ = reluParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00004000) == 0x00004000)) { + to_bitField1_ |= 0x00000040; + } + if (reshapeParamBuilder_ == null) { + result.reshapeParam_ = reshapeParam_; + } else { + result.reshapeParam_ = reshapeParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00008000) == 0x00008000)) { + to_bitField1_ |= 0x00000080; + } + if (scaleParamBuilder_ == null) { + result.scaleParam_ = scaleParam_; + } else { + result.scaleParam_ = scaleParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00010000) == 0x00010000)) { + to_bitField1_ |= 0x00000100; + } + if (sigmoidParamBuilder_ == null) { + result.sigmoidParam_ = sigmoidParam_; + } else { + result.sigmoidParam_ = sigmoidParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00020000) == 0x00020000)) { + to_bitField1_ |= 0x00000200; + } + if (softmaxParamBuilder_ == null) { + result.softmaxParam_ = softmaxParam_; + } else { + result.softmaxParam_ = softmaxParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00040000) == 0x00040000)) { + to_bitField1_ |= 0x00000400; + } + if (sppParamBuilder_ == null) { + result.sppParam_ = sppParam_; + } else { + result.sppParam_ = sppParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00080000) == 0x00080000)) { + to_bitField1_ |= 0x00000800; + } + if (sliceParamBuilder_ == null) { + result.sliceParam_ = sliceParam_; + } else { + result.sliceParam_ = sliceParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00100000) == 0x00100000)) { + to_bitField1_ |= 0x00001000; + } + if (tanhParamBuilder_ == null) { + result.tanhParam_ = tanhParam_; + } else { + result.tanhParam_ = tanhParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00200000) == 0x00200000)) { + to_bitField1_ |= 0x00002000; + } + if (thresholdParamBuilder_ == null) { + result.thresholdParam_ = thresholdParam_; + } else { + result.thresholdParam_ = thresholdParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00400000) == 0x00400000)) { + to_bitField1_ |= 0x00004000; + } + if (tileParamBuilder_ == null) { + result.tileParam_ = tileParam_; + } else { + result.tileParam_ = tileParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00800000) == 0x00800000)) { + to_bitField1_ |= 0x00008000; + } + 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.hasPoolingParam()) { + mergePoolingParam(other.getPoolingParam()); + } + if (other.hasPowerParam()) { + mergePowerParam(other.getPowerParam()); + } + if (other.hasPreluParam()) { + mergePreluParam(other.getPreluParam()); + } + if (other.hasPythonParam()) { + mergePythonParam(other.getPythonParam()); + } + 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.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + 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 com.google.protobuf.ProtocolStringList + getBottomList() { + return bottom_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + 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 com.google.protobuf.ProtocolStringList + getTopList() { + return top_.getUnmodifiableView(); + } + /** + * 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(); + com.google.protobuf.AbstractMessageLite.Builder.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; + } + + private int phase_ = 0; + /** + * 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() { + caffe.Caffe.Phase result = caffe.Caffe.Phase.valueOf(phase_); + return result == null ? caffe.Caffe.Phase.TRAIN : result; + } + /** + * 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.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.Phase phase = 10; + * + *
+       * The train / test phase for computation.
+       * 
+ */ + public Builder clearPhase() { + bitField0_ = (bitField0_ & ~0x00000010); + phase_ = 0; + onChanged(); + return this; + } + + 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_); + } + /** + * 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 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 Builder setLossWeight( + int index, float value) { + ensureLossWeightIsMutable(); + lossWeight_.set(index, value); + onChanged(); + return this; + } + /** + * 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 Builder addLossWeight(float value) { + ensureLossWeightIsMutable(); + lossWeight_.add(value); + onChanged(); + return this; + } + /** + * 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 Builder addAllLossWeight( + java.lang.Iterable values) { + ensureLossWeightIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, lossWeight_); + onChanged(); + return this; + } + /** + * 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 Builder clearLossWeight() { + lossWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + private java.util.List param_ = + java.util.Collections.emptyList(); + private void ensureParamIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + param_ = new java.util.ArrayList(param_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder> paramBuilder_; + + /** + * 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() { + if (paramBuilder_ == null) { + return java.util.Collections.unmodifiableList(param_); + } else { + return paramBuilder_.getMessageList(); + } + } + /** + * 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() { + if (paramBuilder_ == null) { + return param_.size(); + } else { + return paramBuilder_.getCount(); + } + } + /** + * 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) { + if (paramBuilder_ == null) { + return param_.get(index); + } else { + return paramBuilder_.getMessage(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 Builder setParam( + int index, caffe.Caffe.ParamSpec value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.set(index, value); + onChanged(); + } else { + paramBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder setParam( + int index, caffe.Caffe.ParamSpec.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.set(index, builderForValue.build()); + onChanged(); + } else { + paramBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder addParam(caffe.Caffe.ParamSpec value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(value); + onChanged(); + } else { + paramBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder addParam( + int index, caffe.Caffe.ParamSpec value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(index, value); + onChanged(); + } else { + paramBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder addParam( + caffe.Caffe.ParamSpec.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.add(builderForValue.build()); + onChanged(); + } else { + paramBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder addParam( + int index, caffe.Caffe.ParamSpec.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.add(index, builderForValue.build()); + onChanged(); + } else { + paramBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder addAllParam( + java.lang.Iterable values) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, param_); + onChanged(); + } else { + paramBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder clearParam() { + if (paramBuilder_ == null) { + param_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + paramBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.ParamSpec param = 6; + * + *
+       * Specifies training parameters (multipliers on global learning constants,
+       * and the name and other settings used for weight sharing).
+       * 
+ */ + public Builder removeParam(int index) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.remove(index); + onChanged(); + } else { + paramBuilder_.remove(index); + } + return this; + } + /** + * 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.Builder getParamBuilder( + int index) { + return getParamFieldBuilder().getBuilder(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) { + if (paramBuilder_ == null) { + return param_.get(index); } else { + return paramBuilder_.getMessageOrBuilder(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 java.util.List + getParamOrBuilderList() { + if (paramBuilder_ != null) { + return paramBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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 caffe.Caffe.ParamSpec.Builder addParamBuilder() { + return getParamFieldBuilder().addBuilder( + caffe.Caffe.ParamSpec.getDefaultInstance()); + } + /** + * 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.Builder addParamBuilder( + int index) { + return getParamFieldBuilder().addBuilder( + index, caffe.Caffe.ParamSpec.getDefaultInstance()); + } + /** + * 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 + getParamBuilderList() { + return getParamFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder> + getParamFieldBuilder() { + if (paramBuilder_ == null) { + paramBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.ParamSpec, caffe.Caffe.ParamSpec.Builder, caffe.Caffe.ParamSpecOrBuilder>( + param_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + param_ = null; + } + return paramBuilder_; + } + + private java.util.List blobs_ = + java.util.Collections.emptyList(); + private void ensureBlobsIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + blobs_ = new java.util.ArrayList(blobs_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; + + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public java.util.List getBlobsList() { + if (blobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobs_); + } else { + return blobsBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public int getBlobsCount() { + if (blobsBuilder_ == null) { + return blobs_.size(); + } else { + return blobsBuilder_.getCount(); + } + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public caffe.Caffe.BlobProto getBlobs(int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); + } else { + return blobsBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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 = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public Builder addAllBlobs( + java.lang.Iterable values) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blobs_); + onChanged(); + } else { + blobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public Builder clearBlobs() { + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + blobsBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public Builder removeBlobs(int index) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + blobs_.remove(index); + onChanged(); + } else { + blobsBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder getBlobsBuilder( + int index) { + return getBlobsFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); } else { + return blobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public java.util.List + getBlobsOrBuilderList() { + if (blobsBuilder_ != null) { + return blobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blobs_); + } + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { + return getBlobsFieldBuilder().addBuilder( + caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder( + int index) { + return getBlobsFieldBuilder().addBuilder( + index, caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 7; + * + *
+       * The blobs containing the numeric parameters of the layer.
+       * 
+ */ + 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_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + blobs_ = null; + } + return blobsBuilder_; + } + + private java.util.List propagateDown_ = java.util.Collections.emptyList(); + private void ensurePropagateDownIsMutable() { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { + propagateDown_ = new java.util.ArrayList(propagateDown_); + bitField0_ |= 0x00000100; + } + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public java.util.List + getPropagateDownList() { + return java.util.Collections.unmodifiableList(propagateDown_); + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be 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 on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public boolean getPropagateDown(int index) { + return propagateDown_.get(index); + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public Builder setPropagateDown( + int index, boolean value) { + ensurePropagateDownIsMutable(); + propagateDown_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public Builder addPropagateDown(boolean value) { + ensurePropagateDownIsMutable(); + propagateDown_.add(value); + onChanged(); + return this; + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public Builder addAllPropagateDown( + java.lang.Iterable values) { + ensurePropagateDownIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, propagateDown_); + onChanged(); + return this; + } + /** + * repeated bool propagate_down = 11; + * + *
+       * Specifies on which bottoms the backpropagation should be skipped.
+       * The size must be either 0 or equal to the number of bottoms.
+       * 
+ */ + public Builder clearPropagateDown() { + propagateDown_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + private java.util.List include_ = + java.util.Collections.emptyList(); + private void ensureIncludeIsMutable() { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { + include_ = new java.util.ArrayList(include_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> includeBuilder_; + + /** + * 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() { + if (includeBuilder_ == null) { + return java.util.Collections.unmodifiableList(include_); + } else { + return includeBuilder_.getMessageList(); + } + } + /** + * 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() { + if (includeBuilder_ == null) { + return include_.size(); + } else { + return includeBuilder_.getCount(); + } + } + /** + * 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) { + if (includeBuilder_ == null) { + return include_.get(index); + } else { + return includeBuilder_.getMessage(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 Builder setInclude( + int index, caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.set(index, value); + onChanged(); + } else { + includeBuilder_.setMessage(index, value); + } + return this; + } + /** + * 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 Builder setInclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.set(index, builderForValue.build()); + onChanged(); + } else { + includeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * 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 Builder addInclude(caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.add(value); + onChanged(); + } else { + includeBuilder_.addMessage(value); + } + return this; + } + /** + * 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 Builder addInclude( + int index, caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.add(index, value); + onChanged(); + } else { + includeBuilder_.addMessage(index, value); + } + return this; + } + /** + * 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 Builder addInclude( + caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.add(builderForValue.build()); + onChanged(); + } else { + includeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * 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 Builder addInclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.add(index, builderForValue.build()); + onChanged(); + } else { + includeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * 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 Builder addAllInclude( + java.lang.Iterable values) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, include_); + onChanged(); + } else { + includeBuilder_.addAllMessages(values); + } + return this; + } + /** + * 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 Builder clearInclude() { + if (includeBuilder_ == null) { + include_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + includeBuilder_.clear(); + } + return this; + } + /** + * 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 Builder removeInclude(int index) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.remove(index); + onChanged(); + } else { + includeBuilder_.remove(index); + } + return this; + } + /** + * 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.Builder getIncludeBuilder( + int index) { + return getIncludeFieldBuilder().getBuilder(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) { + if (includeBuilder_ == null) { + return include_.get(index); } else { + return includeBuilder_.getMessageOrBuilder(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 java.util.List + getIncludeOrBuilderList() { + if (includeBuilder_ != null) { + return includeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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 caffe.Caffe.NetStateRule.Builder addIncludeBuilder() { + return getIncludeFieldBuilder().addBuilder( + caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * 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.Builder addIncludeBuilder( + int index) { + return getIncludeFieldBuilder().addBuilder( + index, caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * 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 + getIncludeBuilderList() { + return getIncludeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> + getIncludeFieldBuilder() { + if (includeBuilder_ == null) { + includeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( + include_, + ((bitField0_ & 0x00000200) == 0x00000200), + getParentForChildren(), + isClean()); + include_ = null; + } + return includeBuilder_; + } + + private java.util.List exclude_ = + java.util.Collections.emptyList(); + private void ensureExcludeIsMutable() { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { + exclude_ = new java.util.ArrayList(exclude_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> excludeBuilder_; + + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public java.util.List getExcludeList() { + if (excludeBuilder_ == null) { + return java.util.Collections.unmodifiableList(exclude_); + } else { + return excludeBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public int getExcludeCount() { + if (excludeBuilder_ == null) { + return exclude_.size(); + } else { + return excludeBuilder_.getCount(); + } + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public caffe.Caffe.NetStateRule getExclude(int index) { + if (excludeBuilder_ == null) { + return exclude_.get(index); + } else { + return excludeBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder setExclude( + int index, caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.set(index, value); + onChanged(); + } else { + excludeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder setExclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.set(index, builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder addExclude(caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.add(value); + onChanged(); + } else { + excludeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder addExclude( + int index, caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.add(index, value); + onChanged(); + } else { + excludeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder addExclude( + caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.add(builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder addExclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.add(index, builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder addAllExclude( + java.lang.Iterable values) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, exclude_); + onChanged(); + } else { + excludeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder clearExclude() { + if (excludeBuilder_ == null) { + exclude_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + excludeBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public Builder removeExclude(int index) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.remove(index); + onChanged(); + } else { + excludeBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public caffe.Caffe.NetStateRule.Builder getExcludeBuilder( + int index) { + return getExcludeFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( + int index) { + if (excludeBuilder_ == null) { + return exclude_.get(index); } else { + return excludeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public java.util.List + getExcludeOrBuilderList() { + if (excludeBuilder_ != null) { + return excludeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exclude_); + } + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public caffe.Caffe.NetStateRule.Builder addExcludeBuilder() { + return getExcludeFieldBuilder().addBuilder( + caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public caffe.Caffe.NetStateRule.Builder addExcludeBuilder( + int index) { + return getExcludeFieldBuilder().addBuilder( + index, caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule exclude = 9; + */ + public java.util.List + getExcludeBuilderList() { + return getExcludeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> + getExcludeFieldBuilder() { + if (excludeBuilder_ == null) { + excludeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( + exclude_, + ((bitField0_ & 0x00000400) == 0x00000400), + getParentForChildren(), + isClean()); + exclude_ = null; + } + return excludeBuilder_; + } + + private caffe.Caffe.TransformationParameter transformParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> transformParamBuilder_; + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public boolean hasTransformParam() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public caffe.Caffe.TransformationParameter getTransformParam() { + if (transformParamBuilder_ == null) { + return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } else { + return transformParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public Builder setTransformParam(caffe.Caffe.TransformationParameter value) { + if (transformParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformParam_ = value; + onChanged(); + } else { + transformParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public Builder setTransformParam( + caffe.Caffe.TransformationParameter.Builder builderForValue) { + if (transformParamBuilder_ == null) { + transformParam_ = builderForValue.build(); + onChanged(); + } else { + transformParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public Builder mergeTransformParam(caffe.Caffe.TransformationParameter value) { + if (transformParamBuilder_ == null) { + if (((bitField0_ & 0x00000800) == 0x00000800) && + transformParam_ != null && + transformParam_ != caffe.Caffe.TransformationParameter.getDefaultInstance()) { + transformParam_ = + caffe.Caffe.TransformationParameter.newBuilder(transformParam_).mergeFrom(value).buildPartial(); + } else { + transformParam_ = value; + } + onChanged(); + } else { + transformParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public Builder clearTransformParam() { + if (transformParamBuilder_ == null) { + transformParam_ = null; + onChanged(); + } else { + transformParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public caffe.Caffe.TransformationParameter.Builder getTransformParamBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getTransformParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { + if (transformParamBuilder_ != null) { + return transformParamBuilder_.getMessageOrBuilder(); + } else { + return transformParam_ == null ? + caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + } + /** + * optional .caffe.TransformationParameter transform_param = 100; + * + *
+       * Parameters for data pre-processing.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> + getTransformParamFieldBuilder() { + if (transformParamBuilder_ == null) { + transformParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder>( + getTransformParam(), + getParentForChildren(), + isClean()); + transformParam_ = null; + } + return transformParamBuilder_; + } + + private caffe.Caffe.LossParameter lossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> lossParamBuilder_; + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public boolean hasLossParam() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public caffe.Caffe.LossParameter getLossParam() { + if (lossParamBuilder_ == null) { + return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } else { + return lossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public Builder setLossParam(caffe.Caffe.LossParameter value) { + if (lossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lossParam_ = value; + onChanged(); + } else { + lossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public Builder setLossParam( + caffe.Caffe.LossParameter.Builder builderForValue) { + if (lossParamBuilder_ == null) { + lossParam_ = builderForValue.build(); + onChanged(); + } else { + lossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public Builder mergeLossParam(caffe.Caffe.LossParameter value) { + if (lossParamBuilder_ == null) { + if (((bitField0_ & 0x00001000) == 0x00001000) && + lossParam_ != null && + lossParam_ != caffe.Caffe.LossParameter.getDefaultInstance()) { + lossParam_ = + caffe.Caffe.LossParameter.newBuilder(lossParam_).mergeFrom(value).buildPartial(); + } else { + lossParam_ = value; + } + onChanged(); + } else { + lossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public Builder clearLossParam() { + if (lossParamBuilder_ == null) { + lossParam_ = null; + onChanged(); + } else { + lossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public caffe.Caffe.LossParameter.Builder getLossParamBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { + if (lossParamBuilder_ != null) { + return lossParamBuilder_.getMessageOrBuilder(); + } else { + return lossParam_ == null ? + caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + } + /** + * optional .caffe.LossParameter loss_param = 101; + * + *
+       * Parameters shared by loss layers.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> + getLossParamFieldBuilder() { + if (lossParamBuilder_ == null) { + lossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder>( + getLossParam(), + getParentForChildren(), + isClean()); + lossParam_ = null; + } + return lossParamBuilder_; + } + + private caffe.Caffe.AccuracyParameter accuracyParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> accuracyParamBuilder_; + /** + * 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_ & 0x00002000) == 0x00002000); + } + /** + * 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() { + if (accuracyParamBuilder_ == null) { + return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } else { + return accuracyParamBuilder_.getMessage(); + } + } + /** + * 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 Builder setAccuracyParam(caffe.Caffe.AccuracyParameter value) { + if (accuracyParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accuracyParam_ = value; + onChanged(); + } else { + accuracyParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * 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 Builder setAccuracyParam( + caffe.Caffe.AccuracyParameter.Builder builderForValue) { + if (accuracyParamBuilder_ == null) { + accuracyParam_ = builderForValue.build(); + onChanged(); + } else { + accuracyParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * 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 Builder mergeAccuracyParam(caffe.Caffe.AccuracyParameter value) { + if (accuracyParamBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000) && + accuracyParam_ != null && + accuracyParam_ != caffe.Caffe.AccuracyParameter.getDefaultInstance()) { + accuracyParam_ = + caffe.Caffe.AccuracyParameter.newBuilder(accuracyParam_).mergeFrom(value).buildPartial(); + } else { + accuracyParam_ = value; + } + onChanged(); + } else { + accuracyParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * 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 Builder clearAccuracyParam() { + if (accuracyParamBuilder_ == null) { + accuracyParam_ = null; + onChanged(); + } else { + accuracyParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + return this; + } + /** + * 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.Builder getAccuracyParamBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getAccuracyParamFieldBuilder().getBuilder(); + } + /** + * 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() { + if (accuracyParamBuilder_ != null) { + return accuracyParamBuilder_.getMessageOrBuilder(); + } else { + return accuracyParam_ == null ? + caffe.Caffe.AccuracyParameter.getDefaultInstance() : 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.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> + getAccuracyParamFieldBuilder() { + if (accuracyParamBuilder_ == null) { + accuracyParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder>( + getAccuracyParam(), + getParentForChildren(), + isClean()); + accuracyParam_ = null; + } + return accuracyParamBuilder_; + } + + private caffe.Caffe.ArgMaxParameter argmaxParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> argmaxParamBuilder_; + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public boolean hasArgmaxParam() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public caffe.Caffe.ArgMaxParameter getArgmaxParam() { + if (argmaxParamBuilder_ == null) { + return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } else { + return argmaxParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public Builder setArgmaxParam(caffe.Caffe.ArgMaxParameter value) { + if (argmaxParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argmaxParam_ = value; + onChanged(); + } else { + argmaxParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public Builder setArgmaxParam( + caffe.Caffe.ArgMaxParameter.Builder builderForValue) { + if (argmaxParamBuilder_ == null) { + argmaxParam_ = builderForValue.build(); + onChanged(); + } else { + argmaxParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public Builder mergeArgmaxParam(caffe.Caffe.ArgMaxParameter value) { + if (argmaxParamBuilder_ == null) { + if (((bitField0_ & 0x00004000) == 0x00004000) && + argmaxParam_ != null && + argmaxParam_ != caffe.Caffe.ArgMaxParameter.getDefaultInstance()) { + argmaxParam_ = + caffe.Caffe.ArgMaxParameter.newBuilder(argmaxParam_).mergeFrom(value).buildPartial(); + } else { + argmaxParam_ = value; + } + onChanged(); + } else { + argmaxParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public Builder clearArgmaxParam() { + if (argmaxParamBuilder_ == null) { + argmaxParam_ = null; + onChanged(); + } else { + argmaxParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public caffe.Caffe.ArgMaxParameter.Builder getArgmaxParamBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getArgmaxParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { + if (argmaxParamBuilder_ != null) { + return argmaxParamBuilder_.getMessageOrBuilder(); + } else { + return argmaxParam_ == null ? + caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 103; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> + getArgmaxParamFieldBuilder() { + if (argmaxParamBuilder_ == null) { + argmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder>( + getArgmaxParam(), + getParentForChildren(), + isClean()); + argmaxParam_ = null; + } + return argmaxParamBuilder_; + } + + private caffe.Caffe.BatchNormParameter batchNormParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BatchNormParameter, caffe.Caffe.BatchNormParameter.Builder, caffe.Caffe.BatchNormParameterOrBuilder> batchNormParamBuilder_; + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public boolean hasBatchNormParam() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public caffe.Caffe.BatchNormParameter getBatchNormParam() { + if (batchNormParamBuilder_ == null) { + return batchNormParam_ == null ? caffe.Caffe.BatchNormParameter.getDefaultInstance() : batchNormParam_; + } else { + return batchNormParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public Builder setBatchNormParam(caffe.Caffe.BatchNormParameter value) { + if (batchNormParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + batchNormParam_ = value; + onChanged(); + } else { + batchNormParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public Builder setBatchNormParam( + caffe.Caffe.BatchNormParameter.Builder builderForValue) { + if (batchNormParamBuilder_ == null) { + batchNormParam_ = builderForValue.build(); + onChanged(); + } else { + batchNormParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public Builder mergeBatchNormParam(caffe.Caffe.BatchNormParameter value) { + if (batchNormParamBuilder_ == null) { + if (((bitField0_ & 0x00008000) == 0x00008000) && + batchNormParam_ != null && + batchNormParam_ != caffe.Caffe.BatchNormParameter.getDefaultInstance()) { + batchNormParam_ = + caffe.Caffe.BatchNormParameter.newBuilder(batchNormParam_).mergeFrom(value).buildPartial(); + } else { + batchNormParam_ = value; + } + onChanged(); + } else { + batchNormParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public Builder clearBatchNormParam() { + if (batchNormParamBuilder_ == null) { + batchNormParam_ = null; + onChanged(); + } else { + batchNormParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + return this; + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public caffe.Caffe.BatchNormParameter.Builder getBatchNormParamBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getBatchNormParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + public caffe.Caffe.BatchNormParameterOrBuilder getBatchNormParamOrBuilder() { + if (batchNormParamBuilder_ != null) { + return batchNormParamBuilder_.getMessageOrBuilder(); + } else { + return batchNormParam_ == null ? + caffe.Caffe.BatchNormParameter.getDefaultInstance() : batchNormParam_; + } + } + /** + * optional .caffe.BatchNormParameter batch_norm_param = 139; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BatchNormParameter, caffe.Caffe.BatchNormParameter.Builder, caffe.Caffe.BatchNormParameterOrBuilder> + getBatchNormParamFieldBuilder() { + if (batchNormParamBuilder_ == null) { + batchNormParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BatchNormParameter, caffe.Caffe.BatchNormParameter.Builder, caffe.Caffe.BatchNormParameterOrBuilder>( + getBatchNormParam(), + getParentForChildren(), + isClean()); + batchNormParam_ = null; + } + return batchNormParamBuilder_; + } + + private caffe.Caffe.BiasParameter biasParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BiasParameter, caffe.Caffe.BiasParameter.Builder, caffe.Caffe.BiasParameterOrBuilder> biasParamBuilder_; + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public boolean hasBiasParam() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public caffe.Caffe.BiasParameter getBiasParam() { + if (biasParamBuilder_ == null) { + return biasParam_ == null ? caffe.Caffe.BiasParameter.getDefaultInstance() : biasParam_; + } else { + return biasParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public Builder setBiasParam(caffe.Caffe.BiasParameter value) { + if (biasParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasParam_ = value; + onChanged(); + } else { + biasParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public Builder setBiasParam( + caffe.Caffe.BiasParameter.Builder builderForValue) { + if (biasParamBuilder_ == null) { + biasParam_ = builderForValue.build(); + onChanged(); + } else { + biasParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public Builder mergeBiasParam(caffe.Caffe.BiasParameter value) { + if (biasParamBuilder_ == null) { + if (((bitField0_ & 0x00010000) == 0x00010000) && + biasParam_ != null && + biasParam_ != caffe.Caffe.BiasParameter.getDefaultInstance()) { + biasParam_ = + caffe.Caffe.BiasParameter.newBuilder(biasParam_).mergeFrom(value).buildPartial(); + } else { + biasParam_ = value; + } + onChanged(); + } else { + biasParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public Builder clearBiasParam() { + if (biasParamBuilder_ == null) { + biasParam_ = null; + onChanged(); + } else { + biasParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + return this; + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public caffe.Caffe.BiasParameter.Builder getBiasParamBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getBiasParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + public caffe.Caffe.BiasParameterOrBuilder getBiasParamOrBuilder() { + if (biasParamBuilder_ != null) { + return biasParamBuilder_.getMessageOrBuilder(); + } else { + return biasParam_ == null ? + caffe.Caffe.BiasParameter.getDefaultInstance() : biasParam_; + } + } + /** + * optional .caffe.BiasParameter bias_param = 141; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BiasParameter, caffe.Caffe.BiasParameter.Builder, caffe.Caffe.BiasParameterOrBuilder> + getBiasParamFieldBuilder() { + if (biasParamBuilder_ == null) { + biasParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BiasParameter, caffe.Caffe.BiasParameter.Builder, caffe.Caffe.BiasParameterOrBuilder>( + getBiasParam(), + getParentForChildren(), + isClean()); + biasParam_ = null; + } + return biasParamBuilder_; + } + + private caffe.Caffe.ConcatParameter concatParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> concatParamBuilder_; + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public boolean hasConcatParam() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public caffe.Caffe.ConcatParameter getConcatParam() { + if (concatParamBuilder_ == null) { + return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } else { + return concatParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public Builder setConcatParam(caffe.Caffe.ConcatParameter value) { + if (concatParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + concatParam_ = value; + onChanged(); + } else { + concatParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public Builder setConcatParam( + caffe.Caffe.ConcatParameter.Builder builderForValue) { + if (concatParamBuilder_ == null) { + concatParam_ = builderForValue.build(); + onChanged(); + } else { + concatParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public Builder mergeConcatParam(caffe.Caffe.ConcatParameter value) { + if (concatParamBuilder_ == null) { + if (((bitField0_ & 0x00020000) == 0x00020000) && + concatParam_ != null && + concatParam_ != caffe.Caffe.ConcatParameter.getDefaultInstance()) { + concatParam_ = + caffe.Caffe.ConcatParameter.newBuilder(concatParam_).mergeFrom(value).buildPartial(); + } else { + concatParam_ = value; + } + onChanged(); + } else { + concatParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public Builder clearConcatParam() { + if (concatParamBuilder_ == null) { + concatParam_ = null; + onChanged(); + } else { + concatParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public caffe.Caffe.ConcatParameter.Builder getConcatParamBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getConcatParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { + if (concatParamBuilder_ != null) { + return concatParamBuilder_.getMessageOrBuilder(); + } else { + return concatParam_ == null ? + caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + } + /** + * optional .caffe.ConcatParameter concat_param = 104; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> + getConcatParamFieldBuilder() { + if (concatParamBuilder_ == null) { + concatParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder>( + getConcatParam(), + getParentForChildren(), + isClean()); + concatParam_ = null; + } + return concatParamBuilder_; + } + + private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> contrastiveLossParamBuilder_; + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public boolean hasContrastiveLossParam() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { + if (contrastiveLossParamBuilder_ == null) { + return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } else { + return contrastiveLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public Builder setContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { + if (contrastiveLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contrastiveLossParam_ = value; + onChanged(); + } else { + contrastiveLossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public Builder setContrastiveLossParam( + caffe.Caffe.ContrastiveLossParameter.Builder builderForValue) { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = builderForValue.build(); + onChanged(); + } else { + contrastiveLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public Builder mergeContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { + if (contrastiveLossParamBuilder_ == null) { + if (((bitField0_ & 0x00040000) == 0x00040000) && + contrastiveLossParam_ != null && + contrastiveLossParam_ != caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) { + contrastiveLossParam_ = + caffe.Caffe.ContrastiveLossParameter.newBuilder(contrastiveLossParam_).mergeFrom(value).buildPartial(); + } else { + contrastiveLossParam_ = value; + } + onChanged(); + } else { + contrastiveLossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public Builder clearContrastiveLossParam() { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = null; + onChanged(); + } else { + contrastiveLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public caffe.Caffe.ContrastiveLossParameter.Builder getContrastiveLossParamBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getContrastiveLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { + if (contrastiveLossParamBuilder_ != null) { + return contrastiveLossParamBuilder_.getMessageOrBuilder(); + } else { + return contrastiveLossParam_ == null ? + caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> + getContrastiveLossParamFieldBuilder() { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder>( + getContrastiveLossParam(), + getParentForChildren(), + isClean()); + contrastiveLossParam_ = null; + } + return contrastiveLossParamBuilder_; + } + + private caffe.Caffe.ConvolutionParameter convolutionParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> convolutionParamBuilder_; + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public boolean hasConvolutionParam() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public caffe.Caffe.ConvolutionParameter getConvolutionParam() { + if (convolutionParamBuilder_ == null) { + return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } else { + return convolutionParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public Builder setConvolutionParam(caffe.Caffe.ConvolutionParameter value) { + if (convolutionParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + convolutionParam_ = value; + onChanged(); + } else { + convolutionParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public Builder setConvolutionParam( + caffe.Caffe.ConvolutionParameter.Builder builderForValue) { + if (convolutionParamBuilder_ == null) { + convolutionParam_ = builderForValue.build(); + onChanged(); + } else { + convolutionParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public Builder mergeConvolutionParam(caffe.Caffe.ConvolutionParameter value) { + if (convolutionParamBuilder_ == null) { + if (((bitField0_ & 0x00080000) == 0x00080000) && + convolutionParam_ != null && + convolutionParam_ != caffe.Caffe.ConvolutionParameter.getDefaultInstance()) { + convolutionParam_ = + caffe.Caffe.ConvolutionParameter.newBuilder(convolutionParam_).mergeFrom(value).buildPartial(); + } else { + convolutionParam_ = value; + } + onChanged(); + } else { + convolutionParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public Builder clearConvolutionParam() { + if (convolutionParamBuilder_ == null) { + convolutionParam_ = null; + onChanged(); + } else { + convolutionParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public caffe.Caffe.ConvolutionParameter.Builder getConvolutionParamBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getConvolutionParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { + if (convolutionParamBuilder_ != null) { + return convolutionParamBuilder_.getMessageOrBuilder(); + } else { + return convolutionParam_ == null ? + caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 106; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> + getConvolutionParamFieldBuilder() { + if (convolutionParamBuilder_ == null) { + convolutionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder>( + getConvolutionParam(), + getParentForChildren(), + isClean()); + convolutionParam_ = null; + } + return convolutionParamBuilder_; + } + + private caffe.Caffe.CropParameter cropParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.CropParameter, caffe.Caffe.CropParameter.Builder, caffe.Caffe.CropParameterOrBuilder> cropParamBuilder_; + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public boolean hasCropParam() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public caffe.Caffe.CropParameter getCropParam() { + if (cropParamBuilder_ == null) { + return cropParam_ == null ? caffe.Caffe.CropParameter.getDefaultInstance() : cropParam_; + } else { + return cropParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public Builder setCropParam(caffe.Caffe.CropParameter value) { + if (cropParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropParam_ = value; + onChanged(); + } else { + cropParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public Builder setCropParam( + caffe.Caffe.CropParameter.Builder builderForValue) { + if (cropParamBuilder_ == null) { + cropParam_ = builderForValue.build(); + onChanged(); + } else { + cropParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public Builder mergeCropParam(caffe.Caffe.CropParameter value) { + if (cropParamBuilder_ == null) { + if (((bitField0_ & 0x00100000) == 0x00100000) && + cropParam_ != null && + cropParam_ != caffe.Caffe.CropParameter.getDefaultInstance()) { + cropParam_ = + caffe.Caffe.CropParameter.newBuilder(cropParam_).mergeFrom(value).buildPartial(); + } else { + cropParam_ = value; + } + onChanged(); + } else { + cropParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public Builder clearCropParam() { + if (cropParamBuilder_ == null) { + cropParam_ = null; + onChanged(); + } else { + cropParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + return this; + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public caffe.Caffe.CropParameter.Builder getCropParamBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getCropParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + public caffe.Caffe.CropParameterOrBuilder getCropParamOrBuilder() { + if (cropParamBuilder_ != null) { + return cropParamBuilder_.getMessageOrBuilder(); + } else { + return cropParam_ == null ? + caffe.Caffe.CropParameter.getDefaultInstance() : cropParam_; + } + } + /** + * optional .caffe.CropParameter crop_param = 144; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.CropParameter, caffe.Caffe.CropParameter.Builder, caffe.Caffe.CropParameterOrBuilder> + getCropParamFieldBuilder() { + if (cropParamBuilder_ == null) { + cropParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.CropParameter, caffe.Caffe.CropParameter.Builder, caffe.Caffe.CropParameterOrBuilder>( + getCropParam(), + getParentForChildren(), + isClean()); + cropParam_ = null; + } + return cropParamBuilder_; + } + + private caffe.Caffe.DataParameter dataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> dataParamBuilder_; + /** + * optional .caffe.DataParameter data_param = 107; + */ + public boolean hasDataParam() { + return ((bitField0_ & 0x00200000) == 0x00200000); + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public caffe.Caffe.DataParameter getDataParam() { + if (dataParamBuilder_ == null) { + return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } else { + return dataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public Builder setDataParam(caffe.Caffe.DataParameter value) { + if (dataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataParam_ = value; + onChanged(); + } else { + dataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public Builder setDataParam( + caffe.Caffe.DataParameter.Builder builderForValue) { + if (dataParamBuilder_ == null) { + dataParam_ = builderForValue.build(); + onChanged(); + } else { + dataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public Builder mergeDataParam(caffe.Caffe.DataParameter value) { + if (dataParamBuilder_ == null) { + if (((bitField0_ & 0x00200000) == 0x00200000) && + dataParam_ != null && + dataParam_ != caffe.Caffe.DataParameter.getDefaultInstance()) { + dataParam_ = + caffe.Caffe.DataParameter.newBuilder(dataParam_).mergeFrom(value).buildPartial(); + } else { + dataParam_ = value; + } + onChanged(); + } else { + dataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public Builder clearDataParam() { + if (dataParamBuilder_ == null) { + dataParam_ = null; + onChanged(); + } else { + dataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00200000); + return this; + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public caffe.Caffe.DataParameter.Builder getDataParamBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { + if (dataParamBuilder_ != null) { + return dataParamBuilder_.getMessageOrBuilder(); + } else { + return dataParam_ == null ? + caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + } + /** + * optional .caffe.DataParameter data_param = 107; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> + getDataParamFieldBuilder() { + if (dataParamBuilder_ == null) { + dataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder>( + getDataParam(), + getParentForChildren(), + isClean()); + dataParam_ = null; + } + return dataParamBuilder_; + } + + private caffe.Caffe.DropoutParameter dropoutParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> dropoutParamBuilder_; + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public boolean hasDropoutParam() { + return ((bitField0_ & 0x00400000) == 0x00400000); + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public caffe.Caffe.DropoutParameter getDropoutParam() { + if (dropoutParamBuilder_ == null) { + return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } else { + return dropoutParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public Builder setDropoutParam(caffe.Caffe.DropoutParameter value) { + if (dropoutParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dropoutParam_ = value; + onChanged(); + } else { + dropoutParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public Builder setDropoutParam( + caffe.Caffe.DropoutParameter.Builder builderForValue) { + if (dropoutParamBuilder_ == null) { + dropoutParam_ = builderForValue.build(); + onChanged(); + } else { + dropoutParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public Builder mergeDropoutParam(caffe.Caffe.DropoutParameter value) { + if (dropoutParamBuilder_ == null) { + if (((bitField0_ & 0x00400000) == 0x00400000) && + dropoutParam_ != null && + dropoutParam_ != caffe.Caffe.DropoutParameter.getDefaultInstance()) { + dropoutParam_ = + caffe.Caffe.DropoutParameter.newBuilder(dropoutParam_).mergeFrom(value).buildPartial(); + } else { + dropoutParam_ = value; + } + onChanged(); + } else { + dropoutParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public Builder clearDropoutParam() { + if (dropoutParamBuilder_ == null) { + dropoutParam_ = null; + onChanged(); + } else { + dropoutParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public caffe.Caffe.DropoutParameter.Builder getDropoutParamBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getDropoutParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { + if (dropoutParamBuilder_ != null) { + return dropoutParamBuilder_.getMessageOrBuilder(); + } else { + return dropoutParam_ == null ? + caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + } + /** + * optional .caffe.DropoutParameter dropout_param = 108; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> + getDropoutParamFieldBuilder() { + if (dropoutParamBuilder_ == null) { + dropoutParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder>( + getDropoutParam(), + getParentForChildren(), + isClean()); + dropoutParam_ = null; + } + return dropoutParamBuilder_; + } + + private caffe.Caffe.DummyDataParameter dummyDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> dummyDataParamBuilder_; + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public boolean hasDummyDataParam() { + return ((bitField0_ & 0x00800000) == 0x00800000); + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public caffe.Caffe.DummyDataParameter getDummyDataParam() { + if (dummyDataParamBuilder_ == null) { + return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } else { + return dummyDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public Builder setDummyDataParam(caffe.Caffe.DummyDataParameter value) { + if (dummyDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dummyDataParam_ = value; + onChanged(); + } else { + dummyDataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public Builder setDummyDataParam( + caffe.Caffe.DummyDataParameter.Builder builderForValue) { + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = builderForValue.build(); + onChanged(); + } else { + dummyDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public Builder mergeDummyDataParam(caffe.Caffe.DummyDataParameter value) { + if (dummyDataParamBuilder_ == null) { + if (((bitField0_ & 0x00800000) == 0x00800000) && + dummyDataParam_ != null && + dummyDataParam_ != caffe.Caffe.DummyDataParameter.getDefaultInstance()) { + dummyDataParam_ = + caffe.Caffe.DummyDataParameter.newBuilder(dummyDataParam_).mergeFrom(value).buildPartial(); + } else { + dummyDataParam_ = value; + } + onChanged(); + } else { + dummyDataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public Builder clearDummyDataParam() { + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = null; + onChanged(); + } else { + dummyDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00800000); + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public caffe.Caffe.DummyDataParameter.Builder getDummyDataParamBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getDummyDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { + if (dummyDataParamBuilder_ != null) { + return dummyDataParamBuilder_.getMessageOrBuilder(); + } else { + return dummyDataParam_ == null ? + caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 109; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> + getDummyDataParamFieldBuilder() { + if (dummyDataParamBuilder_ == null) { + dummyDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder>( + getDummyDataParam(), + getParentForChildren(), + isClean()); + dummyDataParam_ = null; + } + return dummyDataParamBuilder_; + } + + private caffe.Caffe.EltwiseParameter eltwiseParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> eltwiseParamBuilder_; + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public boolean hasEltwiseParam() { + return ((bitField0_ & 0x01000000) == 0x01000000); + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public caffe.Caffe.EltwiseParameter getEltwiseParam() { + if (eltwiseParamBuilder_ == null) { + return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } else { + return eltwiseParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public Builder setEltwiseParam(caffe.Caffe.EltwiseParameter value) { + if (eltwiseParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eltwiseParam_ = value; + onChanged(); + } else { + eltwiseParamBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public Builder setEltwiseParam( + caffe.Caffe.EltwiseParameter.Builder builderForValue) { + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = builderForValue.build(); + onChanged(); + } else { + eltwiseParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public Builder mergeEltwiseParam(caffe.Caffe.EltwiseParameter value) { + if (eltwiseParamBuilder_ == null) { + if (((bitField0_ & 0x01000000) == 0x01000000) && + eltwiseParam_ != null && + eltwiseParam_ != caffe.Caffe.EltwiseParameter.getDefaultInstance()) { + eltwiseParam_ = + caffe.Caffe.EltwiseParameter.newBuilder(eltwiseParam_).mergeFrom(value).buildPartial(); + } else { + eltwiseParam_ = value; + } + onChanged(); + } else { + eltwiseParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public Builder clearEltwiseParam() { + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = null; + onChanged(); + } else { + eltwiseParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public caffe.Caffe.EltwiseParameter.Builder getEltwiseParamBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getEltwiseParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { + if (eltwiseParamBuilder_ != null) { + return eltwiseParamBuilder_.getMessageOrBuilder(); + } else { + return eltwiseParam_ == null ? + caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 110; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> + getEltwiseParamFieldBuilder() { + if (eltwiseParamBuilder_ == null) { + eltwiseParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder>( + getEltwiseParam(), + getParentForChildren(), + isClean()); + eltwiseParam_ = null; + } + return eltwiseParamBuilder_; + } + + private caffe.Caffe.ELUParameter eluParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ELUParameter, caffe.Caffe.ELUParameter.Builder, caffe.Caffe.ELUParameterOrBuilder> eluParamBuilder_; + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public boolean hasEluParam() { + return ((bitField0_ & 0x02000000) == 0x02000000); + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public caffe.Caffe.ELUParameter getEluParam() { + if (eluParamBuilder_ == null) { + return eluParam_ == null ? caffe.Caffe.ELUParameter.getDefaultInstance() : eluParam_; + } else { + return eluParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public Builder setEluParam(caffe.Caffe.ELUParameter value) { + if (eluParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eluParam_ = value; + onChanged(); + } else { + eluParamBuilder_.setMessage(value); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public Builder setEluParam( + caffe.Caffe.ELUParameter.Builder builderForValue) { + if (eluParamBuilder_ == null) { + eluParam_ = builderForValue.build(); + onChanged(); + } else { + eluParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public Builder mergeEluParam(caffe.Caffe.ELUParameter value) { + if (eluParamBuilder_ == null) { + if (((bitField0_ & 0x02000000) == 0x02000000) && + eluParam_ != null && + eluParam_ != caffe.Caffe.ELUParameter.getDefaultInstance()) { + eluParam_ = + caffe.Caffe.ELUParameter.newBuilder(eluParam_).mergeFrom(value).buildPartial(); + } else { + eluParam_ = value; + } + onChanged(); + } else { + eluParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public Builder clearEluParam() { + if (eluParamBuilder_ == null) { + eluParam_ = null; + onChanged(); + } else { + eluParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); + return this; + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public caffe.Caffe.ELUParameter.Builder getEluParamBuilder() { + bitField0_ |= 0x02000000; + onChanged(); + return getEluParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + public caffe.Caffe.ELUParameterOrBuilder getEluParamOrBuilder() { + if (eluParamBuilder_ != null) { + return eluParamBuilder_.getMessageOrBuilder(); + } else { + return eluParam_ == null ? + caffe.Caffe.ELUParameter.getDefaultInstance() : eluParam_; + } + } + /** + * optional .caffe.ELUParameter elu_param = 140; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ELUParameter, caffe.Caffe.ELUParameter.Builder, caffe.Caffe.ELUParameterOrBuilder> + getEluParamFieldBuilder() { + if (eluParamBuilder_ == null) { + eluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ELUParameter, caffe.Caffe.ELUParameter.Builder, caffe.Caffe.ELUParameterOrBuilder>( + getEluParam(), + getParentForChildren(), + isClean()); + eluParam_ = null; + } + return eluParamBuilder_; + } + + private caffe.Caffe.EmbedParameter embedParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder> embedParamBuilder_; + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public boolean hasEmbedParam() { + return ((bitField0_ & 0x04000000) == 0x04000000); + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public caffe.Caffe.EmbedParameter getEmbedParam() { + if (embedParamBuilder_ == null) { + return embedParam_ == null ? caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; + } else { + return embedParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public Builder setEmbedParam(caffe.Caffe.EmbedParameter value) { + if (embedParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + embedParam_ = value; + onChanged(); + } else { + embedParamBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public Builder setEmbedParam( + caffe.Caffe.EmbedParameter.Builder builderForValue) { + if (embedParamBuilder_ == null) { + embedParam_ = builderForValue.build(); + onChanged(); + } else { + embedParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public Builder mergeEmbedParam(caffe.Caffe.EmbedParameter value) { + if (embedParamBuilder_ == null) { + if (((bitField0_ & 0x04000000) == 0x04000000) && + embedParam_ != null && + embedParam_ != caffe.Caffe.EmbedParameter.getDefaultInstance()) { + embedParam_ = + caffe.Caffe.EmbedParameter.newBuilder(embedParam_).mergeFrom(value).buildPartial(); + } else { + embedParam_ = value; + } + onChanged(); + } else { + embedParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public Builder clearEmbedParam() { + if (embedParamBuilder_ == null) { + embedParam_ = null; + onChanged(); + } else { + embedParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x04000000); + return this; + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public caffe.Caffe.EmbedParameter.Builder getEmbedParamBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getEmbedParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + public caffe.Caffe.EmbedParameterOrBuilder getEmbedParamOrBuilder() { + if (embedParamBuilder_ != null) { + return embedParamBuilder_.getMessageOrBuilder(); + } else { + return embedParam_ == null ? + caffe.Caffe.EmbedParameter.getDefaultInstance() : embedParam_; + } + } + /** + * optional .caffe.EmbedParameter embed_param = 137; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder> + getEmbedParamFieldBuilder() { + if (embedParamBuilder_ == null) { + embedParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EmbedParameter, caffe.Caffe.EmbedParameter.Builder, caffe.Caffe.EmbedParameterOrBuilder>( + getEmbedParam(), + getParentForChildren(), + isClean()); + embedParam_ = null; + } + return embedParamBuilder_; + } + + private caffe.Caffe.ExpParameter expParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> expParamBuilder_; + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public boolean hasExpParam() { + return ((bitField0_ & 0x08000000) == 0x08000000); + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public caffe.Caffe.ExpParameter getExpParam() { + if (expParamBuilder_ == null) { + return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } else { + return expParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public Builder setExpParam(caffe.Caffe.ExpParameter value) { + if (expParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expParam_ = value; + onChanged(); + } else { + expParamBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public Builder setExpParam( + caffe.Caffe.ExpParameter.Builder builderForValue) { + if (expParamBuilder_ == null) { + expParam_ = builderForValue.build(); + onChanged(); + } else { + expParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public Builder mergeExpParam(caffe.Caffe.ExpParameter value) { + if (expParamBuilder_ == null) { + if (((bitField0_ & 0x08000000) == 0x08000000) && + expParam_ != null && + expParam_ != caffe.Caffe.ExpParameter.getDefaultInstance()) { + expParam_ = + caffe.Caffe.ExpParameter.newBuilder(expParam_).mergeFrom(value).buildPartial(); + } else { + expParam_ = value; + } + onChanged(); + } else { + expParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public Builder clearExpParam() { + if (expParamBuilder_ == null) { + expParam_ = null; + onChanged(); + } else { + expParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x08000000); + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public caffe.Caffe.ExpParameter.Builder getExpParamBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getExpParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { + if (expParamBuilder_ != null) { + return expParamBuilder_.getMessageOrBuilder(); + } else { + return expParam_ == null ? + caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + } + /** + * optional .caffe.ExpParameter exp_param = 111; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> + getExpParamFieldBuilder() { + if (expParamBuilder_ == null) { + expParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder>( + getExpParam(), + getParentForChildren(), + isClean()); + expParam_ = null; + } + return expParamBuilder_; + } + + private caffe.Caffe.FlattenParameter flattenParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder> flattenParamBuilder_; + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public boolean hasFlattenParam() { + return ((bitField0_ & 0x10000000) == 0x10000000); + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public caffe.Caffe.FlattenParameter getFlattenParam() { + if (flattenParamBuilder_ == null) { + return flattenParam_ == null ? caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; + } else { + return flattenParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public Builder setFlattenParam(caffe.Caffe.FlattenParameter value) { + if (flattenParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + flattenParam_ = value; + onChanged(); + } else { + flattenParamBuilder_.setMessage(value); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public Builder setFlattenParam( + caffe.Caffe.FlattenParameter.Builder builderForValue) { + if (flattenParamBuilder_ == null) { + flattenParam_ = builderForValue.build(); + onChanged(); + } else { + flattenParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public Builder mergeFlattenParam(caffe.Caffe.FlattenParameter value) { + if (flattenParamBuilder_ == null) { + if (((bitField0_ & 0x10000000) == 0x10000000) && + flattenParam_ != null && + flattenParam_ != caffe.Caffe.FlattenParameter.getDefaultInstance()) { + flattenParam_ = + caffe.Caffe.FlattenParameter.newBuilder(flattenParam_).mergeFrom(value).buildPartial(); + } else { + flattenParam_ = value; + } + onChanged(); + } else { + flattenParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public Builder clearFlattenParam() { + if (flattenParamBuilder_ == null) { + flattenParam_ = null; + onChanged(); + } else { + flattenParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + return this; + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public caffe.Caffe.FlattenParameter.Builder getFlattenParamBuilder() { + bitField0_ |= 0x10000000; + onChanged(); + return getFlattenParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + public caffe.Caffe.FlattenParameterOrBuilder getFlattenParamOrBuilder() { + if (flattenParamBuilder_ != null) { + return flattenParamBuilder_.getMessageOrBuilder(); + } else { + return flattenParam_ == null ? + caffe.Caffe.FlattenParameter.getDefaultInstance() : flattenParam_; + } + } + /** + * optional .caffe.FlattenParameter flatten_param = 135; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder> + getFlattenParamFieldBuilder() { + if (flattenParamBuilder_ == null) { + flattenParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FlattenParameter, caffe.Caffe.FlattenParameter.Builder, caffe.Caffe.FlattenParameterOrBuilder>( + getFlattenParam(), + getParentForChildren(), + isClean()); + flattenParam_ = null; + } + return flattenParamBuilder_; + } + + private caffe.Caffe.HDF5DataParameter hdf5DataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> hdf5DataParamBuilder_; + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public boolean hasHdf5DataParam() { + return ((bitField0_ & 0x20000000) == 0x20000000); + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { + if (hdf5DataParamBuilder_ == null) { + return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } else { + return hdf5DataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public Builder setHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { + if (hdf5DataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hdf5DataParam_ = value; + onChanged(); + } else { + hdf5DataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public Builder setHdf5DataParam( + caffe.Caffe.HDF5DataParameter.Builder builderForValue) { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = builderForValue.build(); + onChanged(); + } else { + hdf5DataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public Builder mergeHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { + if (hdf5DataParamBuilder_ == null) { + if (((bitField0_ & 0x20000000) == 0x20000000) && + hdf5DataParam_ != null && + hdf5DataParam_ != caffe.Caffe.HDF5DataParameter.getDefaultInstance()) { + hdf5DataParam_ = + caffe.Caffe.HDF5DataParameter.newBuilder(hdf5DataParam_).mergeFrom(value).buildPartial(); + } else { + hdf5DataParam_ = value; + } + onChanged(); + } else { + hdf5DataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public Builder clearHdf5DataParam() { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = null; + onChanged(); + } else { + hdf5DataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public caffe.Caffe.HDF5DataParameter.Builder getHdf5DataParamBuilder() { + bitField0_ |= 0x20000000; + onChanged(); + return getHdf5DataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { + if (hdf5DataParamBuilder_ != null) { + return hdf5DataParamBuilder_.getMessageOrBuilder(); + } else { + return hdf5DataParam_ == null ? + caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 112; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> + getHdf5DataParamFieldBuilder() { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder>( + getHdf5DataParam(), + getParentForChildren(), + isClean()); + hdf5DataParam_ = null; + } + return hdf5DataParamBuilder_; + } + + private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public boolean hasHdf5OutputParam() { + return ((bitField0_ & 0x40000000) == 0x40000000); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } else { + return hdf5OutputParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hdf5OutputParam_ = value; + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(value); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public Builder setHdf5OutputParam( + caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = builderForValue.build(); + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (((bitField0_ & 0x40000000) == 0x40000000) && + hdf5OutputParam_ != null && + hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { + hdf5OutputParam_ = + caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); + } else { + hdf5OutputParam_ = value; + } + onChanged(); + } else { + hdf5OutputParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public Builder clearHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + onChanged(); + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x40000000); + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { + bitField0_ |= 0x40000000; + onChanged(); + return getHdf5OutputParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + if (hdf5OutputParamBuilder_ != null) { + return hdf5OutputParamBuilder_.getMessageOrBuilder(); + } else { + return hdf5OutputParam_ == null ? + caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 113; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> + getHdf5OutputParamFieldBuilder() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( + getHdf5OutputParam(), + getParentForChildren(), + isClean()); + hdf5OutputParam_ = null; + } + return hdf5OutputParamBuilder_; + } + + private caffe.Caffe.HingeLossParameter hingeLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> hingeLossParamBuilder_; + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public boolean hasHingeLossParam() { + return ((bitField0_ & 0x80000000) == 0x80000000); + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public caffe.Caffe.HingeLossParameter getHingeLossParam() { + if (hingeLossParamBuilder_ == null) { + return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } else { + return hingeLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public Builder setHingeLossParam(caffe.Caffe.HingeLossParameter value) { + if (hingeLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hingeLossParam_ = value; + onChanged(); + } else { + hingeLossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public Builder setHingeLossParam( + caffe.Caffe.HingeLossParameter.Builder builderForValue) { + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = builderForValue.build(); + onChanged(); + } else { + hingeLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public Builder mergeHingeLossParam(caffe.Caffe.HingeLossParameter value) { + if (hingeLossParamBuilder_ == null) { + if (((bitField0_ & 0x80000000) == 0x80000000) && + hingeLossParam_ != null && + hingeLossParam_ != caffe.Caffe.HingeLossParameter.getDefaultInstance()) { + hingeLossParam_ = + caffe.Caffe.HingeLossParameter.newBuilder(hingeLossParam_).mergeFrom(value).buildPartial(); + } else { + hingeLossParam_ = value; + } + onChanged(); + } else { + hingeLossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public Builder clearHingeLossParam() { + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = null; + onChanged(); + } else { + hingeLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public caffe.Caffe.HingeLossParameter.Builder getHingeLossParamBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getHingeLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { + if (hingeLossParamBuilder_ != null) { + return hingeLossParamBuilder_.getMessageOrBuilder(); + } else { + return hingeLossParam_ == null ? + caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 114; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> + getHingeLossParamFieldBuilder() { + if (hingeLossParamBuilder_ == null) { + hingeLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder>( + getHingeLossParam(), + getParentForChildren(), + isClean()); + hingeLossParam_ = null; + } + return hingeLossParamBuilder_; + } + + private caffe.Caffe.ImageDataParameter imageDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> imageDataParamBuilder_; + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public boolean hasImageDataParam() { + return ((bitField1_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public caffe.Caffe.ImageDataParameter getImageDataParam() { + if (imageDataParamBuilder_ == null) { + return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } else { + return imageDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public Builder setImageDataParam(caffe.Caffe.ImageDataParameter value) { + if (imageDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageDataParam_ = value; + onChanged(); + } else { + imageDataParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public Builder setImageDataParam( + caffe.Caffe.ImageDataParameter.Builder builderForValue) { + if (imageDataParamBuilder_ == null) { + imageDataParam_ = builderForValue.build(); + onChanged(); + } else { + imageDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public Builder mergeImageDataParam(caffe.Caffe.ImageDataParameter value) { + if (imageDataParamBuilder_ == null) { + if (((bitField1_ & 0x00000001) == 0x00000001) && + imageDataParam_ != null && + imageDataParam_ != caffe.Caffe.ImageDataParameter.getDefaultInstance()) { + imageDataParam_ = + caffe.Caffe.ImageDataParameter.newBuilder(imageDataParam_).mergeFrom(value).buildPartial(); + } else { + imageDataParam_ = value; + } + onChanged(); + } else { + imageDataParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public Builder clearImageDataParam() { + if (imageDataParamBuilder_ == null) { + imageDataParam_ = null; + onChanged(); + } else { + imageDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public caffe.Caffe.ImageDataParameter.Builder getImageDataParamBuilder() { + bitField1_ |= 0x00000001; + onChanged(); + return getImageDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { + if (imageDataParamBuilder_ != null) { + return imageDataParamBuilder_.getMessageOrBuilder(); + } else { + return imageDataParam_ == null ? + caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + } + /** + * optional .caffe.ImageDataParameter image_data_param = 115; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> + getImageDataParamFieldBuilder() { + if (imageDataParamBuilder_ == null) { + imageDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder>( + getImageDataParam(), + getParentForChildren(), + isClean()); + imageDataParam_ = null; + } + return imageDataParamBuilder_; + } + + private caffe.Caffe.InfogainLossParameter infogainLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> infogainLossParamBuilder_; + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public boolean hasInfogainLossParam() { + return ((bitField1_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { + if (infogainLossParamBuilder_ == null) { + return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } else { + return infogainLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public Builder setInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { + if (infogainLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infogainLossParam_ = value; + onChanged(); + } else { + infogainLossParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public Builder setInfogainLossParam( + caffe.Caffe.InfogainLossParameter.Builder builderForValue) { + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = builderForValue.build(); + onChanged(); + } else { + infogainLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public Builder mergeInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { + if (infogainLossParamBuilder_ == null) { + if (((bitField1_ & 0x00000002) == 0x00000002) && + infogainLossParam_ != null && + infogainLossParam_ != caffe.Caffe.InfogainLossParameter.getDefaultInstance()) { + infogainLossParam_ = + caffe.Caffe.InfogainLossParameter.newBuilder(infogainLossParam_).mergeFrom(value).buildPartial(); + } else { + infogainLossParam_ = value; + } + onChanged(); + } else { + infogainLossParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public Builder clearInfogainLossParam() { + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = null; + onChanged(); + } else { + infogainLossParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000002); + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public caffe.Caffe.InfogainLossParameter.Builder getInfogainLossParamBuilder() { + bitField1_ |= 0x00000002; + onChanged(); + return getInfogainLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { + if (infogainLossParamBuilder_ != null) { + return infogainLossParamBuilder_.getMessageOrBuilder(); + } else { + return infogainLossParam_ == null ? + caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 116; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> + getInfogainLossParamFieldBuilder() { + if (infogainLossParamBuilder_ == null) { + infogainLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder>( + getInfogainLossParam(), + getParentForChildren(), + isClean()); + infogainLossParam_ = null; + } + return infogainLossParamBuilder_; + } + + private caffe.Caffe.InnerProductParameter innerProductParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> innerProductParamBuilder_; + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public boolean hasInnerProductParam() { + return ((bitField1_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public caffe.Caffe.InnerProductParameter getInnerProductParam() { + if (innerProductParamBuilder_ == null) { + return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } else { + return innerProductParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public Builder setInnerProductParam(caffe.Caffe.InnerProductParameter value) { + if (innerProductParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + innerProductParam_ = value; + onChanged(); + } else { + innerProductParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public Builder setInnerProductParam( + caffe.Caffe.InnerProductParameter.Builder builderForValue) { + if (innerProductParamBuilder_ == null) { + innerProductParam_ = builderForValue.build(); + onChanged(); + } else { + innerProductParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public Builder mergeInnerProductParam(caffe.Caffe.InnerProductParameter value) { + if (innerProductParamBuilder_ == null) { + if (((bitField1_ & 0x00000004) == 0x00000004) && + innerProductParam_ != null && + innerProductParam_ != caffe.Caffe.InnerProductParameter.getDefaultInstance()) { + innerProductParam_ = + caffe.Caffe.InnerProductParameter.newBuilder(innerProductParam_).mergeFrom(value).buildPartial(); + } else { + innerProductParam_ = value; + } + onChanged(); + } else { + innerProductParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public Builder clearInnerProductParam() { + if (innerProductParamBuilder_ == null) { + innerProductParam_ = null; + onChanged(); + } else { + innerProductParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000004); + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public caffe.Caffe.InnerProductParameter.Builder getInnerProductParamBuilder() { + bitField1_ |= 0x00000004; + onChanged(); + return getInnerProductParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { + if (innerProductParamBuilder_ != null) { + return innerProductParamBuilder_.getMessageOrBuilder(); + } else { + return innerProductParam_ == null ? + caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 117; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> + getInnerProductParamFieldBuilder() { + if (innerProductParamBuilder_ == null) { + innerProductParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder>( + getInnerProductParam(), + getParentForChildren(), + isClean()); + innerProductParam_ = null; + } + return innerProductParamBuilder_; + } + + private caffe.Caffe.InputParameter inputParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InputParameter, caffe.Caffe.InputParameter.Builder, caffe.Caffe.InputParameterOrBuilder> inputParamBuilder_; + /** + * optional .caffe.InputParameter input_param = 143; + */ + public boolean hasInputParam() { + return ((bitField1_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public caffe.Caffe.InputParameter getInputParam() { + if (inputParamBuilder_ == null) { + return inputParam_ == null ? caffe.Caffe.InputParameter.getDefaultInstance() : inputParam_; + } else { + return inputParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public Builder setInputParam(caffe.Caffe.InputParameter value) { + if (inputParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputParam_ = value; + onChanged(); + } else { + inputParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public Builder setInputParam( + caffe.Caffe.InputParameter.Builder builderForValue) { + if (inputParamBuilder_ == null) { + inputParam_ = builderForValue.build(); + onChanged(); + } else { + inputParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public Builder mergeInputParam(caffe.Caffe.InputParameter value) { + if (inputParamBuilder_ == null) { + if (((bitField1_ & 0x00000008) == 0x00000008) && + inputParam_ != null && + inputParam_ != caffe.Caffe.InputParameter.getDefaultInstance()) { + inputParam_ = + caffe.Caffe.InputParameter.newBuilder(inputParam_).mergeFrom(value).buildPartial(); + } else { + inputParam_ = value; + } + onChanged(); + } else { + inputParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public Builder clearInputParam() { + if (inputParamBuilder_ == null) { + inputParam_ = null; + onChanged(); + } else { + inputParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000008); + return this; + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public caffe.Caffe.InputParameter.Builder getInputParamBuilder() { + bitField1_ |= 0x00000008; + onChanged(); + return getInputParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + public caffe.Caffe.InputParameterOrBuilder getInputParamOrBuilder() { + if (inputParamBuilder_ != null) { + return inputParamBuilder_.getMessageOrBuilder(); + } else { + return inputParam_ == null ? + caffe.Caffe.InputParameter.getDefaultInstance() : inputParam_; + } + } + /** + * optional .caffe.InputParameter input_param = 143; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InputParameter, caffe.Caffe.InputParameter.Builder, caffe.Caffe.InputParameterOrBuilder> + getInputParamFieldBuilder() { + if (inputParamBuilder_ == null) { + inputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InputParameter, caffe.Caffe.InputParameter.Builder, caffe.Caffe.InputParameterOrBuilder>( + getInputParam(), + getParentForChildren(), + isClean()); + inputParam_ = null; + } + return inputParamBuilder_; + } + + private caffe.Caffe.LogParameter logParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder> logParamBuilder_; + /** + * optional .caffe.LogParameter log_param = 134; + */ + public boolean hasLogParam() { + return ((bitField1_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public caffe.Caffe.LogParameter getLogParam() { + if (logParamBuilder_ == null) { + return logParam_ == null ? caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; + } else { + return logParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public Builder setLogParam(caffe.Caffe.LogParameter value) { + if (logParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logParam_ = value; + onChanged(); + } else { + logParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public Builder setLogParam( + caffe.Caffe.LogParameter.Builder builderForValue) { + if (logParamBuilder_ == null) { + logParam_ = builderForValue.build(); + onChanged(); + } else { + logParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public Builder mergeLogParam(caffe.Caffe.LogParameter value) { + if (logParamBuilder_ == null) { + if (((bitField1_ & 0x00000010) == 0x00000010) && + logParam_ != null && + logParam_ != caffe.Caffe.LogParameter.getDefaultInstance()) { + logParam_ = + caffe.Caffe.LogParameter.newBuilder(logParam_).mergeFrom(value).buildPartial(); + } else { + logParam_ = value; + } + onChanged(); + } else { + logParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public Builder clearLogParam() { + if (logParamBuilder_ == null) { + logParam_ = null; + onChanged(); + } else { + logParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000010); + return this; + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public caffe.Caffe.LogParameter.Builder getLogParamBuilder() { + bitField1_ |= 0x00000010; + onChanged(); + return getLogParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + public caffe.Caffe.LogParameterOrBuilder getLogParamOrBuilder() { + if (logParamBuilder_ != null) { + return logParamBuilder_.getMessageOrBuilder(); + } else { + return logParam_ == null ? + caffe.Caffe.LogParameter.getDefaultInstance() : logParam_; + } + } + /** + * optional .caffe.LogParameter log_param = 134; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder> + getLogParamFieldBuilder() { + if (logParamBuilder_ == null) { + logParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LogParameter, caffe.Caffe.LogParameter.Builder, caffe.Caffe.LogParameterOrBuilder>( + getLogParam(), + getParentForChildren(), + isClean()); + logParam_ = null; + } + return logParamBuilder_; + } + + private caffe.Caffe.LRNParameter lrnParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> lrnParamBuilder_; + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public boolean hasLrnParam() { + return ((bitField1_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public caffe.Caffe.LRNParameter getLrnParam() { + if (lrnParamBuilder_ == null) { + return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } else { + return lrnParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public Builder setLrnParam(caffe.Caffe.LRNParameter value) { + if (lrnParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lrnParam_ = value; + onChanged(); + } else { + lrnParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public Builder setLrnParam( + caffe.Caffe.LRNParameter.Builder builderForValue) { + if (lrnParamBuilder_ == null) { + lrnParam_ = builderForValue.build(); + onChanged(); + } else { + lrnParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public Builder mergeLrnParam(caffe.Caffe.LRNParameter value) { + if (lrnParamBuilder_ == null) { + if (((bitField1_ & 0x00000020) == 0x00000020) && + lrnParam_ != null && + lrnParam_ != caffe.Caffe.LRNParameter.getDefaultInstance()) { + lrnParam_ = + caffe.Caffe.LRNParameter.newBuilder(lrnParam_).mergeFrom(value).buildPartial(); + } else { + lrnParam_ = value; + } + onChanged(); + } else { + lrnParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public Builder clearLrnParam() { + if (lrnParamBuilder_ == null) { + lrnParam_ = null; + onChanged(); + } else { + lrnParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public caffe.Caffe.LRNParameter.Builder getLrnParamBuilder() { + bitField1_ |= 0x00000020; + onChanged(); + return getLrnParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { + if (lrnParamBuilder_ != null) { + return lrnParamBuilder_.getMessageOrBuilder(); + } else { + return lrnParam_ == null ? + caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + } + /** + * optional .caffe.LRNParameter lrn_param = 118; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> + getLrnParamFieldBuilder() { + if (lrnParamBuilder_ == null) { + lrnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder>( + getLrnParam(), + getParentForChildren(), + isClean()); + lrnParam_ = null; + } + return lrnParamBuilder_; + } + + private caffe.Caffe.MemoryDataParameter memoryDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> memoryDataParamBuilder_; + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public boolean hasMemoryDataParam() { + return ((bitField1_ & 0x00000040) == 0x00000040); + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { + if (memoryDataParamBuilder_ == null) { + return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } else { + return memoryDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public Builder setMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { + if (memoryDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memoryDataParam_ = value; + onChanged(); + } else { + memoryDataParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public Builder setMemoryDataParam( + caffe.Caffe.MemoryDataParameter.Builder builderForValue) { + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = builderForValue.build(); + onChanged(); + } else { + memoryDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public Builder mergeMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { + if (memoryDataParamBuilder_ == null) { + if (((bitField1_ & 0x00000040) == 0x00000040) && + memoryDataParam_ != null && + memoryDataParam_ != caffe.Caffe.MemoryDataParameter.getDefaultInstance()) { + memoryDataParam_ = + caffe.Caffe.MemoryDataParameter.newBuilder(memoryDataParam_).mergeFrom(value).buildPartial(); + } else { + memoryDataParam_ = value; + } + onChanged(); + } else { + memoryDataParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public Builder clearMemoryDataParam() { + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = null; + onChanged(); + } else { + memoryDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000040); + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public caffe.Caffe.MemoryDataParameter.Builder getMemoryDataParamBuilder() { + bitField1_ |= 0x00000040; + onChanged(); + return getMemoryDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { + if (memoryDataParamBuilder_ != null) { + return memoryDataParamBuilder_.getMessageOrBuilder(); + } else { + return memoryDataParam_ == null ? + caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 119; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> + getMemoryDataParamFieldBuilder() { + if (memoryDataParamBuilder_ == null) { + memoryDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder>( + getMemoryDataParam(), + getParentForChildren(), + isClean()); + memoryDataParam_ = null; + } + return memoryDataParamBuilder_; + } + + private caffe.Caffe.MVNParameter mvnParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> mvnParamBuilder_; + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public boolean hasMvnParam() { + return ((bitField1_ & 0x00000080) == 0x00000080); + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public caffe.Caffe.MVNParameter getMvnParam() { + if (mvnParamBuilder_ == null) { + return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } else { + return mvnParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public Builder setMvnParam(caffe.Caffe.MVNParameter value) { + if (mvnParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mvnParam_ = value; + onChanged(); + } else { + mvnParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public Builder setMvnParam( + caffe.Caffe.MVNParameter.Builder builderForValue) { + if (mvnParamBuilder_ == null) { + mvnParam_ = builderForValue.build(); + onChanged(); + } else { + mvnParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public Builder mergeMvnParam(caffe.Caffe.MVNParameter value) { + if (mvnParamBuilder_ == null) { + if (((bitField1_ & 0x00000080) == 0x00000080) && + mvnParam_ != null && + mvnParam_ != caffe.Caffe.MVNParameter.getDefaultInstance()) { + mvnParam_ = + caffe.Caffe.MVNParameter.newBuilder(mvnParam_).mergeFrom(value).buildPartial(); + } else { + mvnParam_ = value; + } + onChanged(); + } else { + mvnParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public Builder clearMvnParam() { + if (mvnParamBuilder_ == null) { + mvnParam_ = null; + onChanged(); + } else { + mvnParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000080); + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public caffe.Caffe.MVNParameter.Builder getMvnParamBuilder() { + bitField1_ |= 0x00000080; + onChanged(); + return getMvnParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { + if (mvnParamBuilder_ != null) { + return mvnParamBuilder_.getMessageOrBuilder(); + } else { + return mvnParam_ == null ? + caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + } + /** + * optional .caffe.MVNParameter mvn_param = 120; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> + getMvnParamFieldBuilder() { + if (mvnParamBuilder_ == null) { + mvnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder>( + getMvnParam(), + getParentForChildren(), + isClean()); + mvnParam_ = null; + } + return mvnParamBuilder_; + } + + private caffe.Caffe.PoolingParameter poolingParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> poolingParamBuilder_; + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public boolean hasPoolingParam() { + return ((bitField1_ & 0x00000100) == 0x00000100); + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public caffe.Caffe.PoolingParameter getPoolingParam() { + if (poolingParamBuilder_ == null) { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } else { + return poolingParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public Builder setPoolingParam(caffe.Caffe.PoolingParameter value) { + if (poolingParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poolingParam_ = value; + onChanged(); + } else { + poolingParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public Builder setPoolingParam( + caffe.Caffe.PoolingParameter.Builder builderForValue) { + if (poolingParamBuilder_ == null) { + poolingParam_ = builderForValue.build(); + onChanged(); + } else { + poolingParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public Builder mergePoolingParam(caffe.Caffe.PoolingParameter value) { + if (poolingParamBuilder_ == null) { + if (((bitField1_ & 0x00000100) == 0x00000100) && + poolingParam_ != null && + poolingParam_ != caffe.Caffe.PoolingParameter.getDefaultInstance()) { + poolingParam_ = + caffe.Caffe.PoolingParameter.newBuilder(poolingParam_).mergeFrom(value).buildPartial(); + } else { + poolingParam_ = value; + } + onChanged(); + } else { + poolingParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public Builder clearPoolingParam() { + if (poolingParamBuilder_ == null) { + poolingParam_ = null; + onChanged(); + } else { + poolingParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000100); + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public caffe.Caffe.PoolingParameter.Builder getPoolingParamBuilder() { + bitField1_ |= 0x00000100; + onChanged(); + return getPoolingParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { + if (poolingParamBuilder_ != null) { + return poolingParamBuilder_.getMessageOrBuilder(); + } else { + return poolingParam_ == null ? + caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + } + /** + * optional .caffe.PoolingParameter pooling_param = 121; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> + getPoolingParamFieldBuilder() { + if (poolingParamBuilder_ == null) { + poolingParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder>( + getPoolingParam(), + getParentForChildren(), + isClean()); + poolingParam_ = null; + } + return poolingParamBuilder_; + } + + private caffe.Caffe.PowerParameter powerParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> powerParamBuilder_; + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public boolean hasPowerParam() { + return ((bitField1_ & 0x00000200) == 0x00000200); + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public caffe.Caffe.PowerParameter getPowerParam() { + if (powerParamBuilder_ == null) { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } else { + return powerParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public Builder setPowerParam(caffe.Caffe.PowerParameter value) { + if (powerParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + powerParam_ = value; + onChanged(); + } else { + powerParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public Builder setPowerParam( + caffe.Caffe.PowerParameter.Builder builderForValue) { + if (powerParamBuilder_ == null) { + powerParam_ = builderForValue.build(); + onChanged(); + } else { + powerParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public Builder mergePowerParam(caffe.Caffe.PowerParameter value) { + if (powerParamBuilder_ == null) { + if (((bitField1_ & 0x00000200) == 0x00000200) && + powerParam_ != null && + powerParam_ != caffe.Caffe.PowerParameter.getDefaultInstance()) { + powerParam_ = + caffe.Caffe.PowerParameter.newBuilder(powerParam_).mergeFrom(value).buildPartial(); + } else { + powerParam_ = value; + } + onChanged(); + } else { + powerParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public Builder clearPowerParam() { + if (powerParamBuilder_ == null) { + powerParam_ = null; + onChanged(); + } else { + powerParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000200); + return this; + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public caffe.Caffe.PowerParameter.Builder getPowerParamBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getPowerParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { + if (powerParamBuilder_ != null) { + return powerParamBuilder_.getMessageOrBuilder(); + } else { + return powerParam_ == null ? + caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + } + /** + * optional .caffe.PowerParameter power_param = 122; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> + getPowerParamFieldBuilder() { + if (powerParamBuilder_ == null) { + powerParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder>( + getPowerParam(), + getParentForChildren(), + isClean()); + powerParam_ = null; + } + return powerParamBuilder_; + } + + private caffe.Caffe.PReLUParameter preluParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder> preluParamBuilder_; + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public boolean hasPreluParam() { + return ((bitField1_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public caffe.Caffe.PReLUParameter getPreluParam() { + if (preluParamBuilder_ == null) { + return preluParam_ == null ? caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; + } else { + return preluParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public Builder setPreluParam(caffe.Caffe.PReLUParameter value) { + if (preluParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preluParam_ = value; + onChanged(); + } else { + preluParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public Builder setPreluParam( + caffe.Caffe.PReLUParameter.Builder builderForValue) { + if (preluParamBuilder_ == null) { + preluParam_ = builderForValue.build(); + onChanged(); + } else { + preluParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public Builder mergePreluParam(caffe.Caffe.PReLUParameter value) { + if (preluParamBuilder_ == null) { + if (((bitField1_ & 0x00000400) == 0x00000400) && + preluParam_ != null && + preluParam_ != caffe.Caffe.PReLUParameter.getDefaultInstance()) { + preluParam_ = + caffe.Caffe.PReLUParameter.newBuilder(preluParam_).mergeFrom(value).buildPartial(); + } else { + preluParam_ = value; + } + onChanged(); + } else { + preluParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public Builder clearPreluParam() { + if (preluParamBuilder_ == null) { + preluParam_ = null; + onChanged(); + } else { + preluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000400); + return this; + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public caffe.Caffe.PReLUParameter.Builder getPreluParamBuilder() { + bitField1_ |= 0x00000400; + onChanged(); + return getPreluParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + public caffe.Caffe.PReLUParameterOrBuilder getPreluParamOrBuilder() { + if (preluParamBuilder_ != null) { + return preluParamBuilder_.getMessageOrBuilder(); + } else { + return preluParam_ == null ? + caffe.Caffe.PReLUParameter.getDefaultInstance() : preluParam_; + } + } + /** + * optional .caffe.PReLUParameter prelu_param = 131; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder> + getPreluParamFieldBuilder() { + if (preluParamBuilder_ == null) { + preluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PReLUParameter, caffe.Caffe.PReLUParameter.Builder, caffe.Caffe.PReLUParameterOrBuilder>( + getPreluParam(), + getParentForChildren(), + isClean()); + preluParam_ = null; + } + return preluParamBuilder_; + } + + private caffe.Caffe.PythonParameter pythonParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder> pythonParamBuilder_; + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public boolean hasPythonParam() { + return ((bitField1_ & 0x00000800) == 0x00000800); + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public caffe.Caffe.PythonParameter getPythonParam() { + if (pythonParamBuilder_ == null) { + return pythonParam_ == null ? caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; + } else { + return pythonParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public Builder setPythonParam(caffe.Caffe.PythonParameter value) { + if (pythonParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pythonParam_ = value; + onChanged(); + } else { + pythonParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000800; + return this; + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public Builder setPythonParam( + caffe.Caffe.PythonParameter.Builder builderForValue) { + if (pythonParamBuilder_ == null) { + pythonParam_ = builderForValue.build(); + onChanged(); + } else { + pythonParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000800; + return this; + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public Builder mergePythonParam(caffe.Caffe.PythonParameter value) { + if (pythonParamBuilder_ == null) { + if (((bitField1_ & 0x00000800) == 0x00000800) && + pythonParam_ != null && + pythonParam_ != caffe.Caffe.PythonParameter.getDefaultInstance()) { + pythonParam_ = + caffe.Caffe.PythonParameter.newBuilder(pythonParam_).mergeFrom(value).buildPartial(); + } else { + pythonParam_ = value; + } + onChanged(); + } else { + pythonParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000800; + return this; + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public Builder clearPythonParam() { + if (pythonParamBuilder_ == null) { + pythonParam_ = null; + onChanged(); + } else { + pythonParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000800); + return this; + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public caffe.Caffe.PythonParameter.Builder getPythonParamBuilder() { + bitField1_ |= 0x00000800; + onChanged(); + return getPythonParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + public caffe.Caffe.PythonParameterOrBuilder getPythonParamOrBuilder() { + if (pythonParamBuilder_ != null) { + return pythonParamBuilder_.getMessageOrBuilder(); + } else { + return pythonParam_ == null ? + caffe.Caffe.PythonParameter.getDefaultInstance() : pythonParam_; + } + } + /** + * optional .caffe.PythonParameter python_param = 130; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder> + getPythonParamFieldBuilder() { + if (pythonParamBuilder_ == null) { + pythonParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PythonParameter, caffe.Caffe.PythonParameter.Builder, caffe.Caffe.PythonParameterOrBuilder>( + getPythonParam(), + getParentForChildren(), + isClean()); + pythonParam_ = null; + } + return pythonParamBuilder_; + } + + private caffe.Caffe.ReductionParameter reductionParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder> reductionParamBuilder_; + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public boolean hasReductionParam() { + return ((bitField1_ & 0x00001000) == 0x00001000); + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public caffe.Caffe.ReductionParameter getReductionParam() { + if (reductionParamBuilder_ == null) { + return reductionParam_ == null ? caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; + } else { + return reductionParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public Builder setReductionParam(caffe.Caffe.ReductionParameter value) { + if (reductionParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reductionParam_ = value; + onChanged(); + } else { + reductionParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00001000; + return this; + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public Builder setReductionParam( + caffe.Caffe.ReductionParameter.Builder builderForValue) { + if (reductionParamBuilder_ == null) { + reductionParam_ = builderForValue.build(); + onChanged(); + } else { + reductionParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00001000; + return this; + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public Builder mergeReductionParam(caffe.Caffe.ReductionParameter value) { + if (reductionParamBuilder_ == null) { + if (((bitField1_ & 0x00001000) == 0x00001000) && + reductionParam_ != null && + reductionParam_ != caffe.Caffe.ReductionParameter.getDefaultInstance()) { + reductionParam_ = + caffe.Caffe.ReductionParameter.newBuilder(reductionParam_).mergeFrom(value).buildPartial(); + } else { + reductionParam_ = value; + } + onChanged(); + } else { + reductionParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00001000; + return this; + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public Builder clearReductionParam() { + if (reductionParamBuilder_ == null) { + reductionParam_ = null; + onChanged(); + } else { + reductionParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00001000); + return this; + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public caffe.Caffe.ReductionParameter.Builder getReductionParamBuilder() { + bitField1_ |= 0x00001000; + onChanged(); + return getReductionParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + public caffe.Caffe.ReductionParameterOrBuilder getReductionParamOrBuilder() { + if (reductionParamBuilder_ != null) { + return reductionParamBuilder_.getMessageOrBuilder(); + } else { + return reductionParam_ == null ? + caffe.Caffe.ReductionParameter.getDefaultInstance() : reductionParam_; + } + } + /** + * optional .caffe.ReductionParameter reduction_param = 136; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder> + getReductionParamFieldBuilder() { + if (reductionParamBuilder_ == null) { + reductionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReductionParameter, caffe.Caffe.ReductionParameter.Builder, caffe.Caffe.ReductionParameterOrBuilder>( + getReductionParam(), + getParentForChildren(), + isClean()); + reductionParam_ = null; + } + return reductionParamBuilder_; + } + + private caffe.Caffe.ReLUParameter reluParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> reluParamBuilder_; + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public boolean hasReluParam() { + return ((bitField1_ & 0x00002000) == 0x00002000); + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public caffe.Caffe.ReLUParameter getReluParam() { + if (reluParamBuilder_ == null) { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } else { + return reluParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public Builder setReluParam(caffe.Caffe.ReLUParameter value) { + if (reluParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reluParam_ = value; + onChanged(); + } else { + reluParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public Builder setReluParam( + caffe.Caffe.ReLUParameter.Builder builderForValue) { + if (reluParamBuilder_ == null) { + reluParam_ = builderForValue.build(); + onChanged(); + } else { + reluParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public Builder mergeReluParam(caffe.Caffe.ReLUParameter value) { + if (reluParamBuilder_ == null) { + if (((bitField1_ & 0x00002000) == 0x00002000) && + reluParam_ != null && + reluParam_ != caffe.Caffe.ReLUParameter.getDefaultInstance()) { + reluParam_ = + caffe.Caffe.ReLUParameter.newBuilder(reluParam_).mergeFrom(value).buildPartial(); + } else { + reluParam_ = value; + } + onChanged(); + } else { + reluParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public Builder clearReluParam() { + if (reluParamBuilder_ == null) { + reluParam_ = null; + onChanged(); + } else { + reluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00002000); + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public caffe.Caffe.ReLUParameter.Builder getReluParamBuilder() { + bitField1_ |= 0x00002000; + onChanged(); + return getReluParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { + if (reluParamBuilder_ != null) { + return reluParamBuilder_.getMessageOrBuilder(); + } else { + return reluParam_ == null ? + caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + } + /** + * optional .caffe.ReLUParameter relu_param = 123; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> + getReluParamFieldBuilder() { + if (reluParamBuilder_ == null) { + reluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder>( + getReluParam(), + getParentForChildren(), + isClean()); + reluParam_ = null; + } + return reluParamBuilder_; + } + + private caffe.Caffe.ReshapeParameter reshapeParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder> reshapeParamBuilder_; + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public boolean hasReshapeParam() { + return ((bitField1_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public caffe.Caffe.ReshapeParameter getReshapeParam() { + if (reshapeParamBuilder_ == null) { + return reshapeParam_ == null ? caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; + } else { + return reshapeParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public Builder setReshapeParam(caffe.Caffe.ReshapeParameter value) { + if (reshapeParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reshapeParam_ = value; + onChanged(); + } else { + reshapeParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public Builder setReshapeParam( + caffe.Caffe.ReshapeParameter.Builder builderForValue) { + if (reshapeParamBuilder_ == null) { + reshapeParam_ = builderForValue.build(); + onChanged(); + } else { + reshapeParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public Builder mergeReshapeParam(caffe.Caffe.ReshapeParameter value) { + if (reshapeParamBuilder_ == null) { + if (((bitField1_ & 0x00004000) == 0x00004000) && + reshapeParam_ != null && + reshapeParam_ != caffe.Caffe.ReshapeParameter.getDefaultInstance()) { + reshapeParam_ = + caffe.Caffe.ReshapeParameter.newBuilder(reshapeParam_).mergeFrom(value).buildPartial(); + } else { + reshapeParam_ = value; + } + onChanged(); + } else { + reshapeParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public Builder clearReshapeParam() { + if (reshapeParamBuilder_ == null) { + reshapeParam_ = null; + onChanged(); + } else { + reshapeParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00004000); + return this; + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public caffe.Caffe.ReshapeParameter.Builder getReshapeParamBuilder() { + bitField1_ |= 0x00004000; + onChanged(); + return getReshapeParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + public caffe.Caffe.ReshapeParameterOrBuilder getReshapeParamOrBuilder() { + if (reshapeParamBuilder_ != null) { + return reshapeParamBuilder_.getMessageOrBuilder(); + } else { + return reshapeParam_ == null ? + caffe.Caffe.ReshapeParameter.getDefaultInstance() : reshapeParam_; + } + } + /** + * optional .caffe.ReshapeParameter reshape_param = 133; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder> + getReshapeParamFieldBuilder() { + if (reshapeParamBuilder_ == null) { + reshapeParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReshapeParameter, caffe.Caffe.ReshapeParameter.Builder, caffe.Caffe.ReshapeParameterOrBuilder>( + getReshapeParam(), + getParentForChildren(), + isClean()); + reshapeParam_ = null; + } + return reshapeParamBuilder_; + } + + private caffe.Caffe.ScaleParameter scaleParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ScaleParameter, caffe.Caffe.ScaleParameter.Builder, caffe.Caffe.ScaleParameterOrBuilder> scaleParamBuilder_; + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public boolean hasScaleParam() { + return ((bitField1_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public caffe.Caffe.ScaleParameter getScaleParam() { + if (scaleParamBuilder_ == null) { + return scaleParam_ == null ? caffe.Caffe.ScaleParameter.getDefaultInstance() : scaleParam_; + } else { + return scaleParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public Builder setScaleParam(caffe.Caffe.ScaleParameter value) { + if (scaleParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scaleParam_ = value; + onChanged(); + } else { + scaleParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public Builder setScaleParam( + caffe.Caffe.ScaleParameter.Builder builderForValue) { + if (scaleParamBuilder_ == null) { + scaleParam_ = builderForValue.build(); + onChanged(); + } else { + scaleParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public Builder mergeScaleParam(caffe.Caffe.ScaleParameter value) { + if (scaleParamBuilder_ == null) { + if (((bitField1_ & 0x00008000) == 0x00008000) && + scaleParam_ != null && + scaleParam_ != caffe.Caffe.ScaleParameter.getDefaultInstance()) { + scaleParam_ = + caffe.Caffe.ScaleParameter.newBuilder(scaleParam_).mergeFrom(value).buildPartial(); + } else { + scaleParam_ = value; + } + onChanged(); + } else { + scaleParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public Builder clearScaleParam() { + if (scaleParamBuilder_ == null) { + scaleParam_ = null; + onChanged(); + } else { + scaleParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00008000); + return this; + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public caffe.Caffe.ScaleParameter.Builder getScaleParamBuilder() { + bitField1_ |= 0x00008000; + onChanged(); + return getScaleParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + public caffe.Caffe.ScaleParameterOrBuilder getScaleParamOrBuilder() { + if (scaleParamBuilder_ != null) { + return scaleParamBuilder_.getMessageOrBuilder(); + } else { + return scaleParam_ == null ? + caffe.Caffe.ScaleParameter.getDefaultInstance() : scaleParam_; + } + } + /** + * optional .caffe.ScaleParameter scale_param = 142; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ScaleParameter, caffe.Caffe.ScaleParameter.Builder, caffe.Caffe.ScaleParameterOrBuilder> + getScaleParamFieldBuilder() { + if (scaleParamBuilder_ == null) { + scaleParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ScaleParameter, caffe.Caffe.ScaleParameter.Builder, caffe.Caffe.ScaleParameterOrBuilder>( + getScaleParam(), + getParentForChildren(), + isClean()); + scaleParam_ = null; + } + return scaleParamBuilder_; + } + + private caffe.Caffe.SigmoidParameter sigmoidParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> sigmoidParamBuilder_; + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public boolean hasSigmoidParam() { + return ((bitField1_ & 0x00010000) == 0x00010000); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public caffe.Caffe.SigmoidParameter getSigmoidParam() { + if (sigmoidParamBuilder_ == null) { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } else { + return sigmoidParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public Builder setSigmoidParam(caffe.Caffe.SigmoidParameter value) { + if (sigmoidParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sigmoidParam_ = value; + onChanged(); + } else { + sigmoidParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00010000; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public Builder setSigmoidParam( + caffe.Caffe.SigmoidParameter.Builder builderForValue) { + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = builderForValue.build(); + onChanged(); + } else { + sigmoidParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00010000; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public Builder mergeSigmoidParam(caffe.Caffe.SigmoidParameter value) { + if (sigmoidParamBuilder_ == null) { + if (((bitField1_ & 0x00010000) == 0x00010000) && + sigmoidParam_ != null && + sigmoidParam_ != caffe.Caffe.SigmoidParameter.getDefaultInstance()) { + sigmoidParam_ = + caffe.Caffe.SigmoidParameter.newBuilder(sigmoidParam_).mergeFrom(value).buildPartial(); + } else { + sigmoidParam_ = value; + } + onChanged(); + } else { + sigmoidParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00010000; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public Builder clearSigmoidParam() { + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = null; + onChanged(); + } else { + sigmoidParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00010000); + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public caffe.Caffe.SigmoidParameter.Builder getSigmoidParamBuilder() { + bitField1_ |= 0x00010000; + onChanged(); + return getSigmoidParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { + if (sigmoidParamBuilder_ != null) { + return sigmoidParamBuilder_.getMessageOrBuilder(); + } else { + return sigmoidParam_ == null ? + caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 124; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> + getSigmoidParamFieldBuilder() { + if (sigmoidParamBuilder_ == null) { + sigmoidParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder>( + getSigmoidParam(), + getParentForChildren(), + isClean()); + sigmoidParam_ = null; + } + return sigmoidParamBuilder_; + } + + private caffe.Caffe.SoftmaxParameter softmaxParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> softmaxParamBuilder_; + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public boolean hasSoftmaxParam() { + return ((bitField1_ & 0x00020000) == 0x00020000); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { + if (softmaxParamBuilder_ == null) { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } else { + return softmaxParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public Builder setSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { + if (softmaxParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softmaxParam_ = value; + onChanged(); + } else { + softmaxParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00020000; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public Builder setSoftmaxParam( + caffe.Caffe.SoftmaxParameter.Builder builderForValue) { + if (softmaxParamBuilder_ == null) { + softmaxParam_ = builderForValue.build(); + onChanged(); + } else { + softmaxParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00020000; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public Builder mergeSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { + if (softmaxParamBuilder_ == null) { + if (((bitField1_ & 0x00020000) == 0x00020000) && + softmaxParam_ != null && + softmaxParam_ != caffe.Caffe.SoftmaxParameter.getDefaultInstance()) { + softmaxParam_ = + caffe.Caffe.SoftmaxParameter.newBuilder(softmaxParam_).mergeFrom(value).buildPartial(); + } else { + softmaxParam_ = value; + } + onChanged(); + } else { + softmaxParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00020000; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public Builder clearSoftmaxParam() { + if (softmaxParamBuilder_ == null) { + softmaxParam_ = null; + onChanged(); + } else { + softmaxParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00020000); + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public caffe.Caffe.SoftmaxParameter.Builder getSoftmaxParamBuilder() { + bitField1_ |= 0x00020000; + onChanged(); + return getSoftmaxParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { + if (softmaxParamBuilder_ != null) { + return softmaxParamBuilder_.getMessageOrBuilder(); + } else { + return softmaxParam_ == null ? + caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 125; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> + getSoftmaxParamFieldBuilder() { + if (softmaxParamBuilder_ == null) { + softmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder>( + getSoftmaxParam(), + getParentForChildren(), + isClean()); + softmaxParam_ = null; + } + return softmaxParamBuilder_; + } + + private caffe.Caffe.SPPParameter sppParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder> sppParamBuilder_; + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public boolean hasSppParam() { + return ((bitField1_ & 0x00040000) == 0x00040000); + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public caffe.Caffe.SPPParameter getSppParam() { + if (sppParamBuilder_ == null) { + return sppParam_ == null ? caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; + } else { + return sppParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public Builder setSppParam(caffe.Caffe.SPPParameter value) { + if (sppParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sppParam_ = value; + onChanged(); + } else { + sppParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00040000; + return this; + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public Builder setSppParam( + caffe.Caffe.SPPParameter.Builder builderForValue) { + if (sppParamBuilder_ == null) { + sppParam_ = builderForValue.build(); + onChanged(); + } else { + sppParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00040000; + return this; + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public Builder mergeSppParam(caffe.Caffe.SPPParameter value) { + if (sppParamBuilder_ == null) { + if (((bitField1_ & 0x00040000) == 0x00040000) && + sppParam_ != null && + sppParam_ != caffe.Caffe.SPPParameter.getDefaultInstance()) { + sppParam_ = + caffe.Caffe.SPPParameter.newBuilder(sppParam_).mergeFrom(value).buildPartial(); + } else { + sppParam_ = value; + } + onChanged(); + } else { + sppParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00040000; + return this; + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public Builder clearSppParam() { + if (sppParamBuilder_ == null) { + sppParam_ = null; + onChanged(); + } else { + sppParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00040000); + return this; + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public caffe.Caffe.SPPParameter.Builder getSppParamBuilder() { + bitField1_ |= 0x00040000; + onChanged(); + return getSppParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + public caffe.Caffe.SPPParameterOrBuilder getSppParamOrBuilder() { + if (sppParamBuilder_ != null) { + return sppParamBuilder_.getMessageOrBuilder(); + } else { + return sppParam_ == null ? + caffe.Caffe.SPPParameter.getDefaultInstance() : sppParam_; + } + } + /** + * optional .caffe.SPPParameter spp_param = 132; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder> + getSppParamFieldBuilder() { + if (sppParamBuilder_ == null) { + sppParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SPPParameter, caffe.Caffe.SPPParameter.Builder, caffe.Caffe.SPPParameterOrBuilder>( + getSppParam(), + getParentForChildren(), + isClean()); + sppParam_ = null; + } + return sppParamBuilder_; + } + + private caffe.Caffe.SliceParameter sliceParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> sliceParamBuilder_; + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public boolean hasSliceParam() { + return ((bitField1_ & 0x00080000) == 0x00080000); + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public caffe.Caffe.SliceParameter getSliceParam() { + if (sliceParamBuilder_ == null) { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } else { + return sliceParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public Builder setSliceParam(caffe.Caffe.SliceParameter value) { + if (sliceParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceParam_ = value; + onChanged(); + } else { + sliceParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00080000; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public Builder setSliceParam( + caffe.Caffe.SliceParameter.Builder builderForValue) { + if (sliceParamBuilder_ == null) { + sliceParam_ = builderForValue.build(); + onChanged(); + } else { + sliceParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00080000; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public Builder mergeSliceParam(caffe.Caffe.SliceParameter value) { + if (sliceParamBuilder_ == null) { + if (((bitField1_ & 0x00080000) == 0x00080000) && + sliceParam_ != null && + sliceParam_ != caffe.Caffe.SliceParameter.getDefaultInstance()) { + sliceParam_ = + caffe.Caffe.SliceParameter.newBuilder(sliceParam_).mergeFrom(value).buildPartial(); + } else { + sliceParam_ = value; + } + onChanged(); + } else { + sliceParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00080000; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public Builder clearSliceParam() { + if (sliceParamBuilder_ == null) { + sliceParam_ = null; + onChanged(); + } else { + sliceParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00080000); + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public caffe.Caffe.SliceParameter.Builder getSliceParamBuilder() { + bitField1_ |= 0x00080000; + onChanged(); + return getSliceParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { + if (sliceParamBuilder_ != null) { + return sliceParamBuilder_.getMessageOrBuilder(); + } else { + return sliceParam_ == null ? + caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + } + /** + * optional .caffe.SliceParameter slice_param = 126; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> + getSliceParamFieldBuilder() { + if (sliceParamBuilder_ == null) { + sliceParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder>( + getSliceParam(), + getParentForChildren(), + isClean()); + sliceParam_ = null; + } + return sliceParamBuilder_; + } + + private caffe.Caffe.TanHParameter tanhParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> tanhParamBuilder_; + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public boolean hasTanhParam() { + return ((bitField1_ & 0x00100000) == 0x00100000); + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public caffe.Caffe.TanHParameter getTanhParam() { + if (tanhParamBuilder_ == null) { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } else { + return tanhParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public Builder setTanhParam(caffe.Caffe.TanHParameter value) { + if (tanhParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tanhParam_ = value; + onChanged(); + } else { + tanhParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00100000; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public Builder setTanhParam( + caffe.Caffe.TanHParameter.Builder builderForValue) { + if (tanhParamBuilder_ == null) { + tanhParam_ = builderForValue.build(); + onChanged(); + } else { + tanhParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00100000; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public Builder mergeTanhParam(caffe.Caffe.TanHParameter value) { + if (tanhParamBuilder_ == null) { + if (((bitField1_ & 0x00100000) == 0x00100000) && + tanhParam_ != null && + tanhParam_ != caffe.Caffe.TanHParameter.getDefaultInstance()) { + tanhParam_ = + caffe.Caffe.TanHParameter.newBuilder(tanhParam_).mergeFrom(value).buildPartial(); + } else { + tanhParam_ = value; + } + onChanged(); + } else { + tanhParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00100000; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public Builder clearTanhParam() { + if (tanhParamBuilder_ == null) { + tanhParam_ = null; + onChanged(); + } else { + tanhParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00100000); + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public caffe.Caffe.TanHParameter.Builder getTanhParamBuilder() { + bitField1_ |= 0x00100000; + onChanged(); + return getTanhParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { + if (tanhParamBuilder_ != null) { + return tanhParamBuilder_.getMessageOrBuilder(); + } else { + return tanhParam_ == null ? + caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + } + /** + * optional .caffe.TanHParameter tanh_param = 127; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> + getTanhParamFieldBuilder() { + if (tanhParamBuilder_ == null) { + tanhParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder>( + getTanhParam(), + getParentForChildren(), + isClean()); + tanhParam_ = null; + } + return tanhParamBuilder_; + } + + private caffe.Caffe.ThresholdParameter thresholdParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> thresholdParamBuilder_; + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public boolean hasThresholdParam() { + return ((bitField1_ & 0x00200000) == 0x00200000); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public caffe.Caffe.ThresholdParameter getThresholdParam() { + if (thresholdParamBuilder_ == null) { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } else { + return thresholdParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public Builder setThresholdParam(caffe.Caffe.ThresholdParameter value) { + if (thresholdParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + thresholdParam_ = value; + onChanged(); + } else { + thresholdParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public Builder setThresholdParam( + caffe.Caffe.ThresholdParameter.Builder builderForValue) { + if (thresholdParamBuilder_ == null) { + thresholdParam_ = builderForValue.build(); + onChanged(); + } else { + thresholdParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public Builder mergeThresholdParam(caffe.Caffe.ThresholdParameter value) { + if (thresholdParamBuilder_ == null) { + if (((bitField1_ & 0x00200000) == 0x00200000) && + thresholdParam_ != null && + thresholdParam_ != caffe.Caffe.ThresholdParameter.getDefaultInstance()) { + thresholdParam_ = + caffe.Caffe.ThresholdParameter.newBuilder(thresholdParam_).mergeFrom(value).buildPartial(); + } else { + thresholdParam_ = value; + } + onChanged(); + } else { + thresholdParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public Builder clearThresholdParam() { + if (thresholdParamBuilder_ == null) { + thresholdParam_ = null; + onChanged(); + } else { + thresholdParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00200000); + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public caffe.Caffe.ThresholdParameter.Builder getThresholdParamBuilder() { + bitField1_ |= 0x00200000; + onChanged(); + return getThresholdParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { + if (thresholdParamBuilder_ != null) { + return thresholdParamBuilder_.getMessageOrBuilder(); + } else { + return thresholdParam_ == null ? + caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + } + /** + * optional .caffe.ThresholdParameter threshold_param = 128; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> + getThresholdParamFieldBuilder() { + if (thresholdParamBuilder_ == null) { + thresholdParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder>( + getThresholdParam(), + getParentForChildren(), + isClean()); + thresholdParam_ = null; + } + return thresholdParamBuilder_; + } + + private caffe.Caffe.TileParameter tileParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder> tileParamBuilder_; + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public boolean hasTileParam() { + return ((bitField1_ & 0x00400000) == 0x00400000); + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public caffe.Caffe.TileParameter getTileParam() { + if (tileParamBuilder_ == null) { + return tileParam_ == null ? caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; + } else { + return tileParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public Builder setTileParam(caffe.Caffe.TileParameter value) { + if (tileParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tileParam_ = value; + onChanged(); + } else { + tileParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00400000; + return this; + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public Builder setTileParam( + caffe.Caffe.TileParameter.Builder builderForValue) { + if (tileParamBuilder_ == null) { + tileParam_ = builderForValue.build(); + onChanged(); + } else { + tileParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00400000; + return this; + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public Builder mergeTileParam(caffe.Caffe.TileParameter value) { + if (tileParamBuilder_ == null) { + if (((bitField1_ & 0x00400000) == 0x00400000) && + tileParam_ != null && + tileParam_ != caffe.Caffe.TileParameter.getDefaultInstance()) { + tileParam_ = + caffe.Caffe.TileParameter.newBuilder(tileParam_).mergeFrom(value).buildPartial(); + } else { + tileParam_ = value; + } + onChanged(); + } else { + tileParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00400000; + return this; + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public Builder clearTileParam() { + if (tileParamBuilder_ == null) { + tileParam_ = null; + onChanged(); + } else { + tileParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00400000); + return this; + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public caffe.Caffe.TileParameter.Builder getTileParamBuilder() { + bitField1_ |= 0x00400000; + onChanged(); + return getTileParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + public caffe.Caffe.TileParameterOrBuilder getTileParamOrBuilder() { + if (tileParamBuilder_ != null) { + return tileParamBuilder_.getMessageOrBuilder(); + } else { + return tileParam_ == null ? + caffe.Caffe.TileParameter.getDefaultInstance() : tileParam_; + } + } + /** + * optional .caffe.TileParameter tile_param = 138; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder> + getTileParamFieldBuilder() { + if (tileParamBuilder_ == null) { + tileParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TileParameter, caffe.Caffe.TileParameter.Builder, caffe.Caffe.TileParameterOrBuilder>( + getTileParam(), + getParentForChildren(), + isClean()); + tileParam_ = null; + } + return tileParamBuilder_; + } + + private caffe.Caffe.WindowDataParameter windowDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> windowDataParamBuilder_; + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public boolean hasWindowDataParam() { + return ((bitField1_ & 0x00800000) == 0x00800000); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public caffe.Caffe.WindowDataParameter getWindowDataParam() { + if (windowDataParamBuilder_ == null) { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } else { + return windowDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public Builder setWindowDataParam(caffe.Caffe.WindowDataParameter value) { + if (windowDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowDataParam_ = value; + onChanged(); + } else { + windowDataParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00800000; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public Builder setWindowDataParam( + caffe.Caffe.WindowDataParameter.Builder builderForValue) { + if (windowDataParamBuilder_ == null) { + windowDataParam_ = builderForValue.build(); + onChanged(); + } else { + windowDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00800000; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public Builder mergeWindowDataParam(caffe.Caffe.WindowDataParameter value) { + if (windowDataParamBuilder_ == null) { + if (((bitField1_ & 0x00800000) == 0x00800000) && + windowDataParam_ != null && + windowDataParam_ != caffe.Caffe.WindowDataParameter.getDefaultInstance()) { + windowDataParam_ = + caffe.Caffe.WindowDataParameter.newBuilder(windowDataParam_).mergeFrom(value).buildPartial(); + } else { + windowDataParam_ = value; + } + onChanged(); + } else { + windowDataParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00800000; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public Builder clearWindowDataParam() { + if (windowDataParamBuilder_ == null) { + windowDataParam_ = null; + onChanged(); + } else { + windowDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00800000); + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public caffe.Caffe.WindowDataParameter.Builder getWindowDataParamBuilder() { + bitField1_ |= 0x00800000; + onChanged(); + return getWindowDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { + if (windowDataParamBuilder_ != null) { + return windowDataParamBuilder_.getMessageOrBuilder(); + } else { + return windowDataParam_ == null ? + caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + } + /** + * optional .caffe.WindowDataParameter window_data_param = 129; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> + getWindowDataParamFieldBuilder() { + if (windowDataParamBuilder_ == null) { + windowDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder>( + getWindowDataParam(), + getParentForChildren(), + isClean()); + windowDataParam_ = null; + } + return windowDataParamBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.LayerParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.LayerParameter) + private static final caffe.Caffe.LayerParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.LayerParameter(); + } + + public static caffe.Caffe.LayerParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final 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 { + try { + return new LayerParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.LayerParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransformationParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.TransformationParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float scale = 1 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + boolean hasScale(); + /** + * optional float scale = 1 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + float getScale(); + + /** + * optional bool mirror = 2 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + boolean hasMirror(); + /** + * optional bool mirror = 2 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + boolean getMirror(); + + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + boolean hasCropSize(); + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + int getCropSize(); + + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + boolean hasMeanFile(); + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + java.lang.String getMeanFile(); + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + com.google.protobuf.ByteString + getMeanFileBytes(); + + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + java.util.List getMeanValueList(); + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + int getMeanValueCount(); + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + float getMeanValue(int index); + + /** + * optional bool force_color = 6 [default = false]; + * + *
+     * Force the decoded image to have 3 color channels.
+     * 
+ */ + boolean hasForceColor(); + /** + * optional bool force_color = 6 [default = false]; + * + *
+     * Force the decoded image to have 3 color channels.
+     * 
+ */ + boolean getForceColor(); + + /** + * optional bool force_gray = 7 [default = false]; + * + *
+     * Force the decoded image to have 1 color channels.
+     * 
+ */ + boolean hasForceGray(); + /** + * optional bool force_gray = 7 [default = false]; + * + *
+     * Force the decoded image to have 1 color channels.
+     * 
+ */ + boolean getForceGray(); + } + /** + * Protobuf type {@code caffe.TransformationParameter} + * + *
+   * Message that stores parameters used to apply transformation
+   * to the data layer's data
+   * 
+ */ + public static final class TransformationParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.TransformationParameter) + TransformationParameterOrBuilder { + // Use TransformationParameter.newBuilder() to construct. + private TransformationParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TransformationParameter() { + scale_ = 1F; + mirror_ = false; + cropSize_ = 0; + meanFile_ = ""; + meanValue_ = java.util.Collections.emptyList(); + forceColor_ = false; + forceGray_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + scale_ = input.readFloat(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + mirror_ = input.readBool(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + cropSize_ = input.readUInt32(); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000008; + meanFile_ = bs; + break; + } + case 45: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + meanValue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + meanValue_.add(input.readFloat()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { + meanValue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + while (input.getBytesUntilLimit() > 0) { + meanValue_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 48: { + bitField0_ |= 0x00000010; + forceColor_ = input.readBool(); + break; + } + case 56: { + bitField0_ |= 0x00000020; + forceGray_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + meanValue_ = java.util.Collections.unmodifiableList(meanValue_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TransformationParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TransformationParameter.class, caffe.Caffe.TransformationParameter.Builder.class); + } + + private int bitField0_; + public static final int SCALE_FIELD_NUMBER = 1; + private float scale_; + /** + * optional float scale = 1 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float scale = 1 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public float getScale() { + return scale_; + } + + public static final int MIRROR_FIELD_NUMBER = 2; + private boolean mirror_; + /** + * optional bool mirror = 2 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool mirror = 2 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + public boolean getMirror() { + return mirror_; + } + + public static final int CROP_SIZE_FIELD_NUMBER = 3; + private int cropSize_; + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + public int getCropSize() { + return cropSize_; + } + + public static final int MEAN_FILE_FIELD_NUMBER = 4; + private volatile java.lang.Object meanFile_; + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + 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()) { + meanFile_ = s; + } + return s; + } + } + /** + * optional string mean_file = 4; + * + *
+     * mean_file and mean_value cannot be specified at the same time
+     * 
+ */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEAN_VALUE_FIELD_NUMBER = 5; + private java.util.List meanValue_; + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + public java.util.List + getMeanValueList() { + return meanValue_; + } + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + public int getMeanValueCount() { + return meanValue_.size(); + } + /** + * repeated float mean_value = 5; + * + *
+     * if specified can be repeated once (would substract it from all the channels)
+     * or can be repeated the same number of times as channels
+     * (would subtract them from the corresponding channel)
+     * 
+ */ + public float getMeanValue(int index) { + return meanValue_.get(index); + } + + public static final int FORCE_COLOR_FIELD_NUMBER = 6; + private boolean forceColor_; + /** + * optional bool force_color = 6 [default = false]; + * + *
+     * Force the decoded image to have 3 color channels.
+     * 
+ */ + public boolean hasForceColor() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool force_color = 6 [default = false]; + * + *
+     * Force the decoded image to have 3 color channels.
+     * 
+ */ + public boolean getForceColor() { + return forceColor_; + } + + public static final int FORCE_GRAY_FIELD_NUMBER = 7; + private boolean forceGray_; + /** + * optional bool force_gray = 7 [default = false]; + * + *
+     * Force the decoded image to have 1 color channels.
+     * 
+ */ + public boolean hasForceGray() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool force_gray = 7 [default = false]; + * + *
+     * Force the decoded image to have 1 color channels.
+     * 
+ */ + public boolean getForceGray() { + return forceGray_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, scale_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, cropSize_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, meanFile_); + } + for (int i = 0; i < meanValue_.size(); i++) { + output.writeFloat(5, meanValue_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(6, forceColor_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(7, forceGray_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, scale_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, cropSize_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, meanFile_); + } + { + int dataSize = 0; + dataSize = 4 * getMeanValueList().size(); + size += dataSize; + size += 1 * getMeanValueList().size(); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, forceColor_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, forceGray_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.TransformationParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TransformationParameter 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.TransformationParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TransformationParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.TransformationParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TransformationParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.TransformationParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.TransformationParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.TransformationParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TransformationParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.TransformationParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.TransformationParameter} + * + *
+     * Message that stores parameters used to apply transformation
+     * to the data layer's data
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.TransformationParameter) + caffe.Caffe.TransformationParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TransformationParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TransformationParameter.class, caffe.Caffe.TransformationParameter.Builder.class); + } + + // Construct using caffe.Caffe.TransformationParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000001); + mirror_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + cropSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + meanFile_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + meanValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + forceColor_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + forceGray_ = false; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_TransformationParameter_descriptor; + } + + public caffe.Caffe.TransformationParameter getDefaultInstanceForType() { + return caffe.Caffe.TransformationParameter.getDefaultInstance(); + } + + public caffe.Caffe.TransformationParameter build() { + caffe.Caffe.TransformationParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.TransformationParameter buildPartial() { + caffe.Caffe.TransformationParameter result = new caffe.Caffe.TransformationParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.mirror_ = mirror_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.cropSize_ = cropSize_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.meanFile_ = meanFile_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + meanValue_ = java.util.Collections.unmodifiableList(meanValue_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.meanValue_ = meanValue_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.forceColor_ = forceColor_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.forceGray_ = forceGray_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.TransformationParameter) { + return mergeFrom((caffe.Caffe.TransformationParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.TransformationParameter other) { + if (other == caffe.Caffe.TransformationParameter.getDefaultInstance()) return this; + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasMirror()) { + setMirror(other.getMirror()); + } + if (other.hasCropSize()) { + setCropSize(other.getCropSize()); + } + if (other.hasMeanFile()) { + bitField0_ |= 0x00000008; + meanFile_ = other.meanFile_; + onChanged(); + } + if (!other.meanValue_.isEmpty()) { + if (meanValue_.isEmpty()) { + meanValue_ = other.meanValue_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureMeanValueIsMutable(); + meanValue_.addAll(other.meanValue_); + } + onChanged(); + } + if (other.hasForceColor()) { + setForceColor(other.getForceColor()); + } + if (other.hasForceGray()) { + setForceGray(other.getForceGray()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.TransformationParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.TransformationParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float scale_ = 1F; + /** + * optional float scale = 1 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float scale = 1 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 1 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder setScale(float value) { + bitField0_ |= 0x00000001; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 1 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000001); + scale_ = 1F; + onChanged(); + return this; + } + + private boolean mirror_ ; + /** + * optional bool mirror = 2 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool mirror = 2 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public boolean getMirror() { + return mirror_; + } + /** + * optional bool mirror = 2 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public Builder setMirror(boolean value) { + bitField0_ |= 0x00000002; + mirror_ = value; + onChanged(); + return this; + } + /** + * optional bool mirror = 2 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public Builder clearMirror() { + bitField0_ = (bitField0_ & ~0x00000002); + mirror_ = false; + onChanged(); + return this; + } + + private int cropSize_ ; + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public int getCropSize() { + return cropSize_; + } + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder setCropSize(int value) { + bitField0_ |= 0x00000004; + cropSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 crop_size = 3 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder clearCropSize() { + bitField0_ = (bitField0_ & ~0x00000004); + cropSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object meanFile_ = ""; + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + meanFile_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public Builder setMeanFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + meanFile_ = value; + onChanged(); + return this; + } + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public Builder clearMeanFile() { + bitField0_ = (bitField0_ & ~0x00000008); + meanFile_ = getDefaultInstance().getMeanFile(); + onChanged(); + return this; + } + /** + * optional string mean_file = 4; + * + *
+       * mean_file and mean_value cannot be specified at the same time
+       * 
+ */ + public Builder setMeanFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + meanFile_ = value; + onChanged(); + return this; + } + + private java.util.List meanValue_ = java.util.Collections.emptyList(); + private void ensureMeanValueIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + meanValue_ = new java.util.ArrayList(meanValue_); + bitField0_ |= 0x00000010; + } + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public java.util.List + getMeanValueList() { + return java.util.Collections.unmodifiableList(meanValue_); + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public int getMeanValueCount() { + return meanValue_.size(); + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public float getMeanValue(int index) { + return meanValue_.get(index); + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public Builder setMeanValue( + int index, float value) { + ensureMeanValueIsMutable(); + meanValue_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public Builder addMeanValue(float value) { + ensureMeanValueIsMutable(); + meanValue_.add(value); + onChanged(); + return this; + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public Builder addAllMeanValue( + java.lang.Iterable values) { + ensureMeanValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, meanValue_); + onChanged(); + return this; + } + /** + * repeated float mean_value = 5; + * + *
+       * if specified can be repeated once (would substract it from all the channels)
+       * or can be repeated the same number of times as channels
+       * (would subtract them from the corresponding channel)
+       * 
+ */ + public Builder clearMeanValue() { + meanValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private boolean forceColor_ ; + /** + * optional bool force_color = 6 [default = false]; + * + *
+       * Force the decoded image to have 3 color channels.
+       * 
+ */ + public boolean hasForceColor() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool force_color = 6 [default = false]; + * + *
+       * Force the decoded image to have 3 color channels.
+       * 
+ */ + public boolean getForceColor() { + return forceColor_; + } + /** + * optional bool force_color = 6 [default = false]; + * + *
+       * Force the decoded image to have 3 color channels.
+       * 
+ */ + public Builder setForceColor(boolean value) { + bitField0_ |= 0x00000020; + forceColor_ = value; + onChanged(); + return this; + } + /** + * optional bool force_color = 6 [default = false]; + * + *
+       * Force the decoded image to have 3 color channels.
+       * 
+ */ + public Builder clearForceColor() { + bitField0_ = (bitField0_ & ~0x00000020); + forceColor_ = false; + onChanged(); + return this; + } + + private boolean forceGray_ ; + /** + * optional bool force_gray = 7 [default = false]; + * + *
+       * Force the decoded image to have 1 color channels.
+       * 
+ */ + public boolean hasForceGray() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool force_gray = 7 [default = false]; + * + *
+       * Force the decoded image to have 1 color channels.
+       * 
+ */ + public boolean getForceGray() { + return forceGray_; + } + /** + * optional bool force_gray = 7 [default = false]; + * + *
+       * Force the decoded image to have 1 color channels.
+       * 
+ */ + public Builder setForceGray(boolean value) { + bitField0_ |= 0x00000040; + forceGray_ = value; + onChanged(); + return this; + } + /** + * optional bool force_gray = 7 [default = false]; + * + *
+       * Force the decoded image to have 1 color channels.
+       * 
+ */ + public Builder clearForceGray() { + bitField0_ = (bitField0_ & ~0x00000040); + forceGray_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.TransformationParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.TransformationParameter) + private static final caffe.Caffe.TransformationParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.TransformationParameter(); + } + + public static caffe.Caffe.TransformationParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TransformationParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TransformationParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.TransformationParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LossParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.LossParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 ignore_label = 1; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + boolean hasIgnoreLabel(); + /** + * optional int32 ignore_label = 1; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + int getIgnoreLabel(); + + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + boolean hasNormalization(); + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + caffe.Caffe.LossParameter.NormalizationMode getNormalization(); + + /** + * optional bool normalize = 2; + * + *
+     * Deprecated.  Ignored if normalization is specified.  If normalization
+     * is not specified, then setting this to false will be equivalent to
+     * normalization = BATCH_SIZE to be consistent with previous behavior.
+     * 
+ */ + boolean hasNormalize(); + /** + * optional bool normalize = 2; + * + *
+     * Deprecated.  Ignored if normalization is specified.  If normalization
+     * is not specified, then setting this to false will be equivalent to
+     * normalization = BATCH_SIZE to be consistent with previous behavior.
+     * 
+ */ + boolean getNormalize(); + } + /** + * Protobuf type {@code caffe.LossParameter} + * + *
+   * Message that stores parameters shared by loss layers
+   * 
+ */ + public static final class LossParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.LossParameter) + LossParameterOrBuilder { + // Use LossParameter.newBuilder() to construct. + private LossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LossParameter() { + ignoreLabel_ = 0; + normalization_ = 1; + normalize_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LossParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + ignoreLabel_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000004; + normalize_ = input.readBool(); + break; + } + case 24: { + int rawValue = input.readEnum(); + caffe.Caffe.LossParameter.NormalizationMode value = caffe.Caffe.LossParameter.NormalizationMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000002; + normalization_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_LossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LossParameter.class, caffe.Caffe.LossParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.LossParameter.NormalizationMode} + * + *
+     * How to normalize the loss for loss layers that aggregate across batches,
+     * spatial dimensions, or other dimensions.  Currently only implemented in
+     * SoftmaxWithLoss layer.
+     * 
+ */ + public enum NormalizationMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + * FULL = 0; + * + *
+       * Divide by the number of examples in the batch times spatial dimensions.
+       * Outputs that receive the ignore label will NOT be ignored in computing
+       * the normalization factor.
+       * 
+ */ + FULL(0, 0), + /** + * VALID = 1; + * + *
+       * Divide by the total number of output locations that do not take the
+       * ignore_label.  If ignore_label is not set, this behaves like FULL.
+       * 
+ */ + VALID(1, 1), + /** + * BATCH_SIZE = 2; + * + *
+       * Divide by the batch size.
+       * 
+ */ + BATCH_SIZE(2, 2), + /** + * NONE = 3; + * + *
+       * Do not normalize the loss.
+       * 
+ */ + NONE(3, 3), + ; + + /** + * FULL = 0; + * + *
+       * Divide by the number of examples in the batch times spatial dimensions.
+       * Outputs that receive the ignore label will NOT be ignored in computing
+       * the normalization factor.
+       * 
+ */ + public static final int FULL_VALUE = 0; + /** + * VALID = 1; + * + *
+       * Divide by the total number of output locations that do not take the
+       * ignore_label.  If ignore_label is not set, this behaves like FULL.
+       * 
+ */ + public static final int VALID_VALUE = 1; + /** + * BATCH_SIZE = 2; + * + *
+       * Divide by the batch size.
+       * 
+ */ + public static final int BATCH_SIZE_VALUE = 2; + /** + * NONE = 3; + * + *
+       * Do not normalize the loss.
+       * 
+ */ + public static final int NONE_VALUE = 3; + + + public final int getNumber() { + return value; + } + + public static NormalizationMode valueOf(int value) { + switch (value) { + case 0: return FULL; + case 1: return VALID; + case 2: return BATCH_SIZE; + case 3: return NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NormalizationMode> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NormalizationMode findValueByNumber(int number) { + return NormalizationMode.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.LossParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final NormalizationMode[] VALUES = values(); + + public static NormalizationMode 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 NormalizationMode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.LossParameter.NormalizationMode) + } + + private int bitField0_; + public static final int IGNORE_LABEL_FIELD_NUMBER = 1; + private int ignoreLabel_; + /** + * optional int32 ignore_label = 1; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + public boolean hasIgnoreLabel() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 ignore_label = 1; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + public int getIgnoreLabel() { + return ignoreLabel_; + } + + public static final int NORMALIZATION_FIELD_NUMBER = 3; + private int normalization_; + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public boolean hasNormalization() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public caffe.Caffe.LossParameter.NormalizationMode getNormalization() { + caffe.Caffe.LossParameter.NormalizationMode result = caffe.Caffe.LossParameter.NormalizationMode.valueOf(normalization_); + return result == null ? caffe.Caffe.LossParameter.NormalizationMode.VALID : result; + } + + public static final int NORMALIZE_FIELD_NUMBER = 2; + private boolean normalize_; + /** + * optional bool normalize = 2; + * + *
+     * Deprecated.  Ignored if normalization is specified.  If normalization
+     * is not specified, then setting this to false will be equivalent to
+     * normalization = BATCH_SIZE to be consistent with previous behavior.
+     * 
+ */ + public boolean hasNormalize() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool normalize = 2; + * + *
+     * Deprecated.  Ignored if normalization is specified.  If normalization
+     * is not specified, then setting this to false will be equivalent to
+     * normalization = BATCH_SIZE to be consistent with previous behavior.
+     * 
+ */ + public boolean getNormalize() { + return normalize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, ignoreLabel_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(2, normalize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(3, normalization_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, ignoreLabel_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, normalize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, normalization_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.LossParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LossParameter 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.LossParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LossParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.LossParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LossParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.LossParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.LossParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.LossParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LossParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.LossParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.LossParameter} + * + *
+     * Message that stores parameters shared by loss layers
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.LossParameter) + caffe.Caffe.LossParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_LossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LossParameter.class, caffe.Caffe.LossParameter.Builder.class); + } + + // Construct using caffe.Caffe.LossParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + ignoreLabel_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + normalization_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + normalize_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_LossParameter_descriptor; + } + + public caffe.Caffe.LossParameter getDefaultInstanceForType() { + return caffe.Caffe.LossParameter.getDefaultInstance(); + } + + public caffe.Caffe.LossParameter build() { + caffe.Caffe.LossParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.LossParameter buildPartial() { + caffe.Caffe.LossParameter result = new caffe.Caffe.LossParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.ignoreLabel_ = ignoreLabel_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.normalization_ = normalization_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.normalize_ = normalize_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.LossParameter) { + return mergeFrom((caffe.Caffe.LossParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.LossParameter other) { + if (other == caffe.Caffe.LossParameter.getDefaultInstance()) return this; + if (other.hasIgnoreLabel()) { + setIgnoreLabel(other.getIgnoreLabel()); + } + if (other.hasNormalization()) { + setNormalization(other.getNormalization()); + } + if (other.hasNormalize()) { + setNormalize(other.getNormalize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.LossParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.LossParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int ignoreLabel_ ; + /** + * optional int32 ignore_label = 1; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public boolean hasIgnoreLabel() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 ignore_label = 1; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public int getIgnoreLabel() { + return ignoreLabel_; + } + /** + * optional int32 ignore_label = 1; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public Builder setIgnoreLabel(int value) { + bitField0_ |= 0x00000001; + ignoreLabel_ = value; + onChanged(); + return this; + } + /** + * optional int32 ignore_label = 1; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public Builder clearIgnoreLabel() { + bitField0_ = (bitField0_ & ~0x00000001); + ignoreLabel_ = 0; + onChanged(); + return this; + } + + private int normalization_ = 1; + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public boolean hasNormalization() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public caffe.Caffe.LossParameter.NormalizationMode getNormalization() { + caffe.Caffe.LossParameter.NormalizationMode result = caffe.Caffe.LossParameter.NormalizationMode.valueOf(normalization_); + return result == null ? caffe.Caffe.LossParameter.NormalizationMode.VALID : result; + } + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public Builder setNormalization(caffe.Caffe.LossParameter.NormalizationMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + normalization_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID]; + */ + public Builder clearNormalization() { + bitField0_ = (bitField0_ & ~0x00000002); + normalization_ = 1; + onChanged(); + return this; + } + + private boolean normalize_ ; + /** + * optional bool normalize = 2; + * + *
+       * Deprecated.  Ignored if normalization is specified.  If normalization
+       * is not specified, then setting this to false will be equivalent to
+       * normalization = BATCH_SIZE to be consistent with previous behavior.
+       * 
+ */ + public boolean hasNormalize() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool normalize = 2; + * + *
+       * Deprecated.  Ignored if normalization is specified.  If normalization
+       * is not specified, then setting this to false will be equivalent to
+       * normalization = BATCH_SIZE to be consistent with previous behavior.
+       * 
+ */ + public boolean getNormalize() { + return normalize_; + } + /** + * optional bool normalize = 2; + * + *
+       * Deprecated.  Ignored if normalization is specified.  If normalization
+       * is not specified, then setting this to false will be equivalent to
+       * normalization = BATCH_SIZE to be consistent with previous behavior.
+       * 
+ */ + public Builder setNormalize(boolean value) { + bitField0_ |= 0x00000004; + normalize_ = value; + onChanged(); + return this; + } + /** + * optional bool normalize = 2; + * + *
+       * Deprecated.  Ignored if normalization is specified.  If normalization
+       * is not specified, then setting this to false will be equivalent to
+       * normalization = BATCH_SIZE to be consistent with previous behavior.
+       * 
+ */ + public Builder clearNormalize() { + bitField0_ = (bitField0_ & ~0x00000004); + normalize_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.LossParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.LossParameter) + private static final caffe.Caffe.LossParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.LossParameter(); + } + + public static caffe.Caffe.LossParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LossParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LossParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.LossParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccuracyParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.AccuracyParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+     * When computing accuracy, count as correct by comparing the true label to
+     * the top k scoring classes.  By default, only compare to the top scoring
+     * class (i.e. argmax).
+     * 
+ */ + boolean hasTopK(); + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+     * When computing accuracy, count as correct by comparing the true label to
+     * the top k scoring classes.  By default, only compare to the top scoring
+     * class (i.e. argmax).
+     * 
+ */ + int getTopK(); + + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The "label" axis of the prediction blob, whose argmax corresponds to the
+     * predicted label -- may be negative to index from the end (e.g., -1 for the
+     * last axis).  For example, if axis == 1 and the predictions are
+     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+     * labels with integer values in {0, 1, ..., C-1}.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The "label" axis of the prediction blob, whose argmax corresponds to the
+     * predicted label -- may be negative to index from the end (e.g., -1 for the
+     * last axis).  For example, if axis == 1 and the predictions are
+     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+     * labels with integer values in {0, 1, ..., C-1}.
+     * 
+ */ + int getAxis(); + + /** + * optional int32 ignore_label = 3; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + boolean hasIgnoreLabel(); + /** + * optional int32 ignore_label = 3; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + int getIgnoreLabel(); + } + /** + * Protobuf type {@code caffe.AccuracyParameter} + */ + public static final class AccuracyParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.AccuracyParameter) + AccuracyParameterOrBuilder { + // Use AccuracyParameter.newBuilder() to construct. + private AccuracyParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccuracyParameter() { + topK_ = 1; + axis_ = 1; + ignoreLabel_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AccuracyParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + topK_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + axis_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + ignoreLabel_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_AccuracyParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_AccuracyParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.AccuracyParameter.class, caffe.Caffe.AccuracyParameter.Builder.class); + } + + private int bitField0_; + public static final int TOP_K_FIELD_NUMBER = 1; + private int topK_; + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+     * When computing accuracy, count as correct by comparing the true label to
+     * the top k scoring classes.  By default, only compare to the top scoring
+     * class (i.e. argmax).
+     * 
+ */ + public boolean hasTopK() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+     * When computing accuracy, count as correct by comparing the true label to
+     * the top k scoring classes.  By default, only compare to the top scoring
+     * class (i.e. argmax).
+     * 
+ */ + public int getTopK() { + return topK_; + } + + public static final int AXIS_FIELD_NUMBER = 2; + private int axis_; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The "label" axis of the prediction blob, whose argmax corresponds to the
+     * predicted label -- may be negative to index from the end (e.g., -1 for the
+     * last axis).  For example, if axis == 1 and the predictions are
+     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+     * labels with integer values in {0, 1, ..., C-1}.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The "label" axis of the prediction blob, whose argmax corresponds to the
+     * predicted label -- may be negative to index from the end (e.g., -1 for the
+     * last axis).  For example, if axis == 1 and the predictions are
+     * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+     * labels with integer values in {0, 1, ..., C-1}.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int IGNORE_LABEL_FIELD_NUMBER = 3; + private int ignoreLabel_; + /** + * optional int32 ignore_label = 3; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + public boolean hasIgnoreLabel() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 ignore_label = 3; + * + *
+     * If specified, ignore instances with the given label.
+     * 
+ */ + public int getIgnoreLabel() { + return ignoreLabel_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, topK_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, ignoreLabel_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, topK_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, ignoreLabel_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.AccuracyParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.AccuracyParameter 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.AccuracyParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.AccuracyParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.AccuracyParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.AccuracyParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.AccuracyParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.AccuracyParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.AccuracyParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.AccuracyParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.AccuracyParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.AccuracyParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.AccuracyParameter) + caffe.Caffe.AccuracyParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_AccuracyParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_AccuracyParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.AccuracyParameter.class, caffe.Caffe.AccuracyParameter.Builder.class); + } + + // Construct using caffe.Caffe.AccuracyParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + topK_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + ignoreLabel_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_AccuracyParameter_descriptor; + } + + public caffe.Caffe.AccuracyParameter getDefaultInstanceForType() { + return caffe.Caffe.AccuracyParameter.getDefaultInstance(); + } + + public caffe.Caffe.AccuracyParameter build() { + caffe.Caffe.AccuracyParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.AccuracyParameter buildPartial() { + caffe.Caffe.AccuracyParameter result = new caffe.Caffe.AccuracyParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.topK_ = topK_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.ignoreLabel_ = ignoreLabel_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.AccuracyParameter) { + return mergeFrom((caffe.Caffe.AccuracyParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.AccuracyParameter other) { + if (other == caffe.Caffe.AccuracyParameter.getDefaultInstance()) return this; + if (other.hasTopK()) { + setTopK(other.getTopK()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasIgnoreLabel()) { + setIgnoreLabel(other.getIgnoreLabel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.AccuracyParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.AccuracyParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int topK_ = 1; + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+       * When computing accuracy, count as correct by comparing the true label to
+       * the top k scoring classes.  By default, only compare to the top scoring
+       * class (i.e. argmax).
+       * 
+ */ + public boolean hasTopK() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+       * When computing accuracy, count as correct by comparing the true label to
+       * the top k scoring classes.  By default, only compare to the top scoring
+       * class (i.e. argmax).
+       * 
+ */ + public int getTopK() { + return topK_; + } + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+       * When computing accuracy, count as correct by comparing the true label to
+       * the top k scoring classes.  By default, only compare to the top scoring
+       * class (i.e. argmax).
+       * 
+ */ + public Builder setTopK(int value) { + bitField0_ |= 0x00000001; + topK_ = value; + onChanged(); + return this; + } + /** + * optional uint32 top_k = 1 [default = 1]; + * + *
+       * When computing accuracy, count as correct by comparing the true label to
+       * the top k scoring classes.  By default, only compare to the top scoring
+       * class (i.e. argmax).
+       * 
+ */ + public Builder clearTopK() { + bitField0_ = (bitField0_ & ~0x00000001); + topK_ = 1; + onChanged(); + return this; + } + + private int axis_ = 1; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The "label" axis of the prediction blob, whose argmax corresponds to the
+       * predicted label -- may be negative to index from the end (e.g., -1 for the
+       * last axis).  For example, if axis == 1 and the predictions are
+       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+       * labels with integer values in {0, 1, ..., C-1}.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The "label" axis of the prediction blob, whose argmax corresponds to the
+       * predicted label -- may be negative to index from the end (e.g., -1 for the
+       * last axis).  For example, if axis == 1 and the predictions are
+       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+       * labels with integer values in {0, 1, ..., C-1}.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The "label" axis of the prediction blob, whose argmax corresponds to the
+       * predicted label -- may be negative to index from the end (e.g., -1 for the
+       * last axis).  For example, if axis == 1 and the predictions are
+       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+       * labels with integer values in {0, 1, ..., C-1}.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000002; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The "label" axis of the prediction blob, whose argmax corresponds to the
+       * predicted label -- may be negative to index from the end (e.g., -1 for the
+       * last axis).  For example, if axis == 1 and the predictions are
+       * (N x C x H x W), the label blob is expected to contain N*H*W ground truth
+       * labels with integer values in {0, 1, ..., C-1}.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000002); + axis_ = 1; + onChanged(); + return this; + } + + private int ignoreLabel_ ; + /** + * optional int32 ignore_label = 3; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public boolean hasIgnoreLabel() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 ignore_label = 3; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public int getIgnoreLabel() { + return ignoreLabel_; + } + /** + * optional int32 ignore_label = 3; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public Builder setIgnoreLabel(int value) { + bitField0_ |= 0x00000004; + ignoreLabel_ = value; + onChanged(); + return this; + } + /** + * optional int32 ignore_label = 3; + * + *
+       * If specified, ignore instances with the given label.
+       * 
+ */ + public Builder clearIgnoreLabel() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreLabel_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.AccuracyParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.AccuracyParameter) + private static final caffe.Caffe.AccuracyParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.AccuracyParameter(); + } + + public static caffe.Caffe.AccuracyParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AccuracyParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AccuracyParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.AccuracyParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ArgMaxParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ArgMaxParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+     * If true produce pairs (argmax, maxval)
+     * 
+ */ + boolean hasOutMaxVal(); + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+     * If true produce pairs (argmax, maxval)
+     * 
+ */ + boolean getOutMaxVal(); + + /** + * optional uint32 top_k = 2 [default = 1]; + */ + boolean hasTopK(); + /** + * optional uint32 top_k = 2 [default = 1]; + */ + int getTopK(); + + /** + * optional int32 axis = 3; + * + *
+     * The axis along which to maximise -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+     * for each index of the first / num dimension.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 3; + * + *
+     * The axis along which to maximise -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+     * for each index of the first / num dimension.
+     * 
+ */ + int getAxis(); + } + /** + * Protobuf type {@code caffe.ArgMaxParameter} + */ + public static final class ArgMaxParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ArgMaxParameter) + ArgMaxParameterOrBuilder { + // Use ArgMaxParameter.newBuilder() to construct. + private ArgMaxParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ArgMaxParameter() { + outMaxVal_ = false; + topK_ = 1; + axis_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArgMaxParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + outMaxVal_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + topK_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + axis_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ArgMaxParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ArgMaxParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ArgMaxParameter.class, caffe.Caffe.ArgMaxParameter.Builder.class); + } + + private int bitField0_; + public static final int OUT_MAX_VAL_FIELD_NUMBER = 1; + private boolean outMaxVal_; + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+     * If true produce pairs (argmax, maxval)
+     * 
+ */ + public boolean hasOutMaxVal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+     * If true produce pairs (argmax, maxval)
+     * 
+ */ + public boolean getOutMaxVal() { + return outMaxVal_; + } + + public static final int TOP_K_FIELD_NUMBER = 2; + private int topK_; + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public boolean hasTopK() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public int getTopK() { + return topK_; + } + + public static final int AXIS_FIELD_NUMBER = 3; + private int axis_; + /** + * optional int32 axis = 3; + * + *
+     * The axis along which to maximise -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+     * for each index of the first / num dimension.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 axis = 3; + * + *
+     * The axis along which to maximise -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+     * for each index of the first / num dimension.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, outMaxVal_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, topK_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, axis_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, outMaxVal_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, topK_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, axis_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ArgMaxParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ArgMaxParameter 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.ArgMaxParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ArgMaxParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ArgMaxParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ArgMaxParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ArgMaxParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ArgMaxParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ArgMaxParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ArgMaxParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ArgMaxParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ArgMaxParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ArgMaxParameter) + caffe.Caffe.ArgMaxParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ArgMaxParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ArgMaxParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ArgMaxParameter.class, caffe.Caffe.ArgMaxParameter.Builder.class); + } + + // Construct using caffe.Caffe.ArgMaxParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + outMaxVal_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + topK_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + axis_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ArgMaxParameter_descriptor; + } + + public caffe.Caffe.ArgMaxParameter getDefaultInstanceForType() { + return caffe.Caffe.ArgMaxParameter.getDefaultInstance(); + } + + public caffe.Caffe.ArgMaxParameter build() { + caffe.Caffe.ArgMaxParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ArgMaxParameter buildPartial() { + caffe.Caffe.ArgMaxParameter result = new caffe.Caffe.ArgMaxParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.outMaxVal_ = outMaxVal_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.topK_ = topK_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.axis_ = axis_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ArgMaxParameter) { + return mergeFrom((caffe.Caffe.ArgMaxParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ArgMaxParameter other) { + if (other == caffe.Caffe.ArgMaxParameter.getDefaultInstance()) return this; + if (other.hasOutMaxVal()) { + setOutMaxVal(other.getOutMaxVal()); + } + if (other.hasTopK()) { + setTopK(other.getTopK()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ArgMaxParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ArgMaxParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean outMaxVal_ ; + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+       * If true produce pairs (argmax, maxval)
+       * 
+ */ + public boolean hasOutMaxVal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+       * If true produce pairs (argmax, maxval)
+       * 
+ */ + public boolean getOutMaxVal() { + return outMaxVal_; + } + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+       * If true produce pairs (argmax, maxval)
+       * 
+ */ + public Builder setOutMaxVal(boolean value) { + bitField0_ |= 0x00000001; + outMaxVal_ = value; + onChanged(); + return this; + } + /** + * optional bool out_max_val = 1 [default = false]; + * + *
+       * If true produce pairs (argmax, maxval)
+       * 
+ */ + public Builder clearOutMaxVal() { + bitField0_ = (bitField0_ & ~0x00000001); + outMaxVal_ = false; + onChanged(); + return this; + } + + private int topK_ = 1; + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public boolean hasTopK() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public int getTopK() { + return topK_; + } + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public Builder setTopK(int value) { + bitField0_ |= 0x00000002; + topK_ = value; + onChanged(); + return this; + } + /** + * optional uint32 top_k = 2 [default = 1]; + */ + public Builder clearTopK() { + bitField0_ = (bitField0_ & ~0x00000002); + topK_ = 1; + onChanged(); + return this; + } + + private int axis_ ; + /** + * optional int32 axis = 3; + * + *
+       * The axis along which to maximise -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+       * for each index of the first / num dimension.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 axis = 3; + * + *
+       * The axis along which to maximise -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+       * for each index of the first / num dimension.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 3; + * + *
+       * The axis along which to maximise -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+       * for each index of the first / num dimension.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000004; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 3; + * + *
+       * The axis along which to maximise -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * By default ArgMaxLayer maximizes over the flattened trailing dimensions
+       * for each index of the first / num dimension.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000004); + axis_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ArgMaxParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ArgMaxParameter) + private static final caffe.Caffe.ArgMaxParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ArgMaxParameter(); + } + + public static caffe.Caffe.ArgMaxParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ArgMaxParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ArgMaxParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ArgMaxParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConcatParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ConcatParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to concatenate -- may be negative to index from the
+     * end (e.g., -1 for the last axis).  Other axes must have the
+     * same dimension for all the bottom blobs.
+     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to concatenate -- may be negative to index from the
+     * end (e.g., -1 for the last axis).  Other axes must have the
+     * same dimension for all the bottom blobs.
+     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + int getAxis(); + + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + boolean hasConcatDim(); + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + int getConcatDim(); + } + /** + * Protobuf type {@code caffe.ConcatParameter} + */ + public static final class ConcatParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ConcatParameter) + ConcatParameterOrBuilder { + // Use ConcatParameter.newBuilder() to construct. + private ConcatParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ConcatParameter() { + axis_ = 1; + concatDim_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConcatParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + concatDim_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000001; + axis_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ConcatParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ConcatParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ConcatParameter.class, caffe.Caffe.ConcatParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 2; + private int axis_; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to concatenate -- may be negative to index from the
+     * end (e.g., -1 for the last axis).  Other axes must have the
+     * same dimension for all the bottom blobs.
+     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to concatenate -- may be negative to index from the
+     * end (e.g., -1 for the last axis).  Other axes must have the
+     * same dimension for all the bottom blobs.
+     * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int CONCAT_DIM_FIELD_NUMBER = 1; + private int concatDim_; + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + public boolean hasConcatDim() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + public int getConcatDim() { + return concatDim_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(1, concatDim_); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(2, axis_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, concatDim_); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, axis_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ConcatParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ConcatParameter 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.ConcatParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ConcatParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ConcatParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ConcatParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ConcatParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ConcatParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ConcatParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ConcatParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ConcatParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ConcatParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ConcatParameter) + caffe.Caffe.ConcatParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ConcatParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ConcatParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ConcatParameter.class, caffe.Caffe.ConcatParameter.Builder.class); + } + + // Construct using caffe.Caffe.ConcatParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + concatDim_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ConcatParameter_descriptor; + } + + public caffe.Caffe.ConcatParameter getDefaultInstanceForType() { + return caffe.Caffe.ConcatParameter.getDefaultInstance(); + } + + public caffe.Caffe.ConcatParameter build() { + caffe.Caffe.ConcatParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ConcatParameter buildPartial() { + caffe.Caffe.ConcatParameter result = new caffe.Caffe.ConcatParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.concatDim_ = concatDim_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ConcatParameter) { + return mergeFrom((caffe.Caffe.ConcatParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ConcatParameter other) { + if (other == caffe.Caffe.ConcatParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasConcatDim()) { + setConcatDim(other.getConcatDim()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ConcatParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ConcatParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to concatenate -- may be negative to index from the
+       * end (e.g., -1 for the last axis).  Other axes must have the
+       * same dimension for all the bottom blobs.
+       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to concatenate -- may be negative to index from the
+       * end (e.g., -1 for the last axis).  Other axes must have the
+       * same dimension for all the bottom blobs.
+       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to concatenate -- may be negative to index from the
+       * end (e.g., -1 for the last axis).  Other axes must have the
+       * same dimension for all the bottom blobs.
+       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to concatenate -- may be negative to index from the
+       * end (e.g., -1 for the last axis).  Other axes must have the
+       * same dimension for all the bottom blobs.
+       * By default, ConcatLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private int concatDim_ = 1; + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public boolean hasConcatDim() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public int getConcatDim() { + return concatDim_; + } + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public Builder setConcatDim(int value) { + bitField0_ |= 0x00000002; + concatDim_ = value; + onChanged(); + return this; + } + /** + * optional uint32 concat_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public Builder clearConcatDim() { + bitField0_ = (bitField0_ & ~0x00000002); + concatDim_ = 1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ConcatParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ConcatParameter) + private static final caffe.Caffe.ConcatParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ConcatParameter(); + } + + public static caffe.Caffe.ConcatParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ConcatParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ConcatParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ConcatParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BatchNormParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.BatchNormParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool use_global_stats = 1; + * + *
+     * If false, accumulate global mean/variance values via a moving average. If
+     * true, use those accumulated values instead of computing mean/variance
+     * across the batch.
+     * 
+ */ + boolean hasUseGlobalStats(); + /** + * optional bool use_global_stats = 1; + * + *
+     * If false, accumulate global mean/variance values via a moving average. If
+     * true, use those accumulated values instead of computing mean/variance
+     * across the batch.
+     * 
+ */ + boolean getUseGlobalStats(); + + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+     * How much does the moving average decay each iteration?
+     * 
+ */ + boolean hasMovingAverageFraction(); + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+     * How much does the moving average decay each iteration?
+     * 
+ */ + float getMovingAverageFraction(); + + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+     * Small value to add to the variance estimate so that we don't divide by
+     * zero.
+     * 
+ */ + boolean hasEps(); + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+     * Small value to add to the variance estimate so that we don't divide by
+     * zero.
+     * 
+ */ + float getEps(); + } + /** + * Protobuf type {@code caffe.BatchNormParameter} + */ + public static final class BatchNormParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.BatchNormParameter) + BatchNormParameterOrBuilder { + // Use BatchNormParameter.newBuilder() to construct. + private BatchNormParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BatchNormParameter() { + useGlobalStats_ = false; + movingAverageFraction_ = 0.999F; + eps_ = 1e-05F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchNormParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + useGlobalStats_ = input.readBool(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + movingAverageFraction_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + eps_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_BatchNormParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_BatchNormParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.BatchNormParameter.class, caffe.Caffe.BatchNormParameter.Builder.class); + } + + private int bitField0_; + public static final int USE_GLOBAL_STATS_FIELD_NUMBER = 1; + private boolean useGlobalStats_; + /** + * optional bool use_global_stats = 1; + * + *
+     * If false, accumulate global mean/variance values via a moving average. If
+     * true, use those accumulated values instead of computing mean/variance
+     * across the batch.
+     * 
+ */ + public boolean hasUseGlobalStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool use_global_stats = 1; + * + *
+     * If false, accumulate global mean/variance values via a moving average. If
+     * true, use those accumulated values instead of computing mean/variance
+     * across the batch.
+     * 
+ */ + public boolean getUseGlobalStats() { + return useGlobalStats_; + } + + public static final int MOVING_AVERAGE_FRACTION_FIELD_NUMBER = 2; + private float movingAverageFraction_; + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+     * How much does the moving average decay each iteration?
+     * 
+ */ + public boolean hasMovingAverageFraction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+     * How much does the moving average decay each iteration?
+     * 
+ */ + public float getMovingAverageFraction() { + return movingAverageFraction_; + } + + public static final int EPS_FIELD_NUMBER = 3; + private float eps_; + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+     * Small value to add to the variance estimate so that we don't divide by
+     * zero.
+     * 
+ */ + public boolean hasEps() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+     * Small value to add to the variance estimate so that we don't divide by
+     * zero.
+     * 
+ */ + public float getEps() { + return eps_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, useGlobalStats_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, movingAverageFraction_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, eps_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, useGlobalStats_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, movingAverageFraction_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, eps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.BatchNormParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.BatchNormParameter 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.BatchNormParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.BatchNormParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.BatchNormParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.BatchNormParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.BatchNormParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.BatchNormParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.BatchNormParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.BatchNormParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.BatchNormParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.BatchNormParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.BatchNormParameter) + caffe.Caffe.BatchNormParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_BatchNormParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_BatchNormParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.BatchNormParameter.class, caffe.Caffe.BatchNormParameter.Builder.class); + } + + // Construct using caffe.Caffe.BatchNormParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + useGlobalStats_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + movingAverageFraction_ = 0.999F; + bitField0_ = (bitField0_ & ~0x00000002); + eps_ = 1e-05F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_BatchNormParameter_descriptor; + } + + public caffe.Caffe.BatchNormParameter getDefaultInstanceForType() { + return caffe.Caffe.BatchNormParameter.getDefaultInstance(); + } + + public caffe.Caffe.BatchNormParameter build() { + caffe.Caffe.BatchNormParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.BatchNormParameter buildPartial() { + caffe.Caffe.BatchNormParameter result = new caffe.Caffe.BatchNormParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.useGlobalStats_ = useGlobalStats_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.movingAverageFraction_ = movingAverageFraction_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.eps_ = eps_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.BatchNormParameter) { + return mergeFrom((caffe.Caffe.BatchNormParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.BatchNormParameter other) { + if (other == caffe.Caffe.BatchNormParameter.getDefaultInstance()) return this; + if (other.hasUseGlobalStats()) { + setUseGlobalStats(other.getUseGlobalStats()); + } + if (other.hasMovingAverageFraction()) { + setMovingAverageFraction(other.getMovingAverageFraction()); + } + if (other.hasEps()) { + setEps(other.getEps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.BatchNormParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.BatchNormParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean useGlobalStats_ ; + /** + * optional bool use_global_stats = 1; + * + *
+       * If false, accumulate global mean/variance values via a moving average. If
+       * true, use those accumulated values instead of computing mean/variance
+       * across the batch.
+       * 
+ */ + public boolean hasUseGlobalStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool use_global_stats = 1; + * + *
+       * If false, accumulate global mean/variance values via a moving average. If
+       * true, use those accumulated values instead of computing mean/variance
+       * across the batch.
+       * 
+ */ + public boolean getUseGlobalStats() { + return useGlobalStats_; + } + /** + * optional bool use_global_stats = 1; + * + *
+       * If false, accumulate global mean/variance values via a moving average. If
+       * true, use those accumulated values instead of computing mean/variance
+       * across the batch.
+       * 
+ */ + public Builder setUseGlobalStats(boolean value) { + bitField0_ |= 0x00000001; + useGlobalStats_ = value; + onChanged(); + return this; + } + /** + * optional bool use_global_stats = 1; + * + *
+       * If false, accumulate global mean/variance values via a moving average. If
+       * true, use those accumulated values instead of computing mean/variance
+       * across the batch.
+       * 
+ */ + public Builder clearUseGlobalStats() { + bitField0_ = (bitField0_ & ~0x00000001); + useGlobalStats_ = false; + onChanged(); + return this; + } + + private float movingAverageFraction_ = 0.999F; + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+       * How much does the moving average decay each iteration?
+       * 
+ */ + public boolean hasMovingAverageFraction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+       * How much does the moving average decay each iteration?
+       * 
+ */ + public float getMovingAverageFraction() { + return movingAverageFraction_; + } + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+       * How much does the moving average decay each iteration?
+       * 
+ */ + public Builder setMovingAverageFraction(float value) { + bitField0_ |= 0x00000002; + movingAverageFraction_ = value; + onChanged(); + return this; + } + /** + * optional float moving_average_fraction = 2 [default = 0.999]; + * + *
+       * How much does the moving average decay each iteration?
+       * 
+ */ + public Builder clearMovingAverageFraction() { + bitField0_ = (bitField0_ & ~0x00000002); + movingAverageFraction_ = 0.999F; + onChanged(); + return this; + } + + private float eps_ = 1e-05F; + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+       * Small value to add to the variance estimate so that we don't divide by
+       * zero.
+       * 
+ */ + public boolean hasEps() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+       * Small value to add to the variance estimate so that we don't divide by
+       * zero.
+       * 
+ */ + public float getEps() { + return eps_; + } + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+       * Small value to add to the variance estimate so that we don't divide by
+       * zero.
+       * 
+ */ + public Builder setEps(float value) { + bitField0_ |= 0x00000004; + eps_ = value; + onChanged(); + return this; + } + /** + * optional float eps = 3 [default = 1e-05]; + * + *
+       * Small value to add to the variance estimate so that we don't divide by
+       * zero.
+       * 
+ */ + public Builder clearEps() { + bitField0_ = (bitField0_ & ~0x00000004); + eps_ = 1e-05F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.BatchNormParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.BatchNormParameter) + private static final caffe.Caffe.BatchNormParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.BatchNormParameter(); + } + + public static caffe.Caffe.BatchNormParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BatchNormParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BatchNormParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.BatchNormParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BiasParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.BiasParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar bias.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar bias.
+     * 
+ */ + int getAxis(); + + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the bias
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+     * 
+ */ + boolean hasNumAxes(); + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the bias
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+     * 
+ */ + int getNumAxes(); + + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + boolean hasFiller(); + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + caffe.Caffe.FillerParameter getFiller(); + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder(); + } + /** + * Protobuf type {@code caffe.BiasParameter} + */ + public static final class BiasParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.BiasParameter) + BiasParameterOrBuilder { + // Use BiasParameter.newBuilder() to construct. + private BiasParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BiasParameter() { + axis_ = 1; + numAxes_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BiasParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + axis_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + numAxes_ = input.readInt32(); + break; + } + case 26: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = filler_.toBuilder(); + } + filler_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filler_); + filler_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_BiasParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_BiasParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.BiasParameter.class, caffe.Caffe.BiasParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 1; + private int axis_; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar bias.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar bias.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int NUM_AXES_FIELD_NUMBER = 2; + private int numAxes_; + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the bias
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+     * 
+ */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the bias
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+     * 
+ */ + public int getNumAxes() { + return numAxes_; + } + + public static final int FILLER_FIELD_NUMBER = 3; + private caffe.Caffe.FillerParameter filler_; + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the bias is
+     * a learned parameter of the layer.)
+     * The initialization for the learned bias parameter.
+     * Default is the zero (0) initialization, resulting in the BiasLayer
+     * initially performing the identity operation.
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, numAxes_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, getFiller()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, numAxes_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFiller()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.BiasParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.BiasParameter 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.BiasParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.BiasParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.BiasParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.BiasParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.BiasParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.BiasParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.BiasParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.BiasParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.BiasParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.BiasParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.BiasParameter) + caffe.Caffe.BiasParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_BiasParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_BiasParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.BiasParameter.class, caffe.Caffe.BiasParameter.Builder.class); + } + + // Construct using caffe.Caffe.BiasParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + numAxes_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + if (fillerBuilder_ == null) { + filler_ = null; + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_BiasParameter_descriptor; + } + + public caffe.Caffe.BiasParameter getDefaultInstanceForType() { + return caffe.Caffe.BiasParameter.getDefaultInstance(); + } + + public caffe.Caffe.BiasParameter build() { + caffe.Caffe.BiasParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.BiasParameter buildPartial() { + caffe.Caffe.BiasParameter result = new caffe.Caffe.BiasParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.numAxes_ = numAxes_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (fillerBuilder_ == null) { + result.filler_ = filler_; + } else { + result.filler_ = fillerBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.BiasParameter) { + return mergeFrom((caffe.Caffe.BiasParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.BiasParameter other) { + if (other == caffe.Caffe.BiasParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasNumAxes()) { + setNumAxes(other.getNumAxes()); + } + if (other.hasFiller()) { + mergeFiller(other.getFiller()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.BiasParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.BiasParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar bias.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar bias.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar bias.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar bias.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private int numAxes_ = 1; + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the bias
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+       * 
+ */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the bias
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+       * 
+ */ + public int getNumAxes() { + return numAxes_; + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the bias
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+       * 
+ */ + public Builder setNumAxes(int value) { + bitField0_ |= 0x00000002; + numAxes_ = value; + onChanged(); + return this; + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the bias
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to add a zero-axis Blob: a scalar.
+       * 
+ */ + public Builder clearNumAxes() { + bitField0_ = (bitField0_ & ~0x00000002); + numAxes_ = 1; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter filler_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> fillerBuilder_; + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + if (fillerBuilder_ == null) { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } else { + return fillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder setFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filler_ = value; + onChanged(); + } else { + fillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder setFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (fillerBuilder_ == null) { + filler_ = builderForValue.build(); + onChanged(); + } else { + fillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder mergeFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + filler_ != null && + filler_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + filler_ = + caffe.Caffe.FillerParameter.newBuilder(filler_).mergeFrom(value).buildPartial(); + } else { + filler_ = value; + } + onChanged(); + } else { + fillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder clearFiller() { + if (fillerBuilder_ == null) { + filler_ = null; + onChanged(); + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getFillerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + if (fillerBuilder_ != null) { + return fillerBuilder_.getMessageOrBuilder(); + } else { + return filler_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the bias is
+       * a learned parameter of the layer.)
+       * The initialization for the learned bias parameter.
+       * Default is the zero (0) initialization, resulting in the BiasLayer
+       * initially performing the identity operation.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getFillerFieldBuilder() { + if (fillerBuilder_ == null) { + fillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getFiller(), + getParentForChildren(), + isClean()); + filler_ = null; + } + return fillerBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.BiasParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.BiasParameter) + private static final caffe.Caffe.BiasParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.BiasParameter(); + } + + public static caffe.Caffe.BiasParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BiasParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BiasParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.BiasParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ContrastiveLossParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ContrastiveLossParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float margin = 1 [default = 1]; + * + *
+     * margin for dissimilar pair
+     * 
+ */ + boolean hasMargin(); + /** + * optional float margin = 1 [default = 1]; + * + *
+     * margin for dissimilar pair
+     * 
+ */ + float getMargin(); + + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+     * The first implementation of this cost did not exactly match the cost of
+     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+     * Hadsell paper. New models should probably use this version.
+     * legacy_version = true uses (margin - d^2). This is kept to support /
+     * reproduce existing models and results
+     * 
+ */ + boolean hasLegacyVersion(); + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+     * The first implementation of this cost did not exactly match the cost of
+     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+     * Hadsell paper. New models should probably use this version.
+     * legacy_version = true uses (margin - d^2). This is kept to support /
+     * reproduce existing models and results
+     * 
+ */ + boolean getLegacyVersion(); + } + /** + * Protobuf type {@code caffe.ContrastiveLossParameter} + */ + public static final class ContrastiveLossParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ContrastiveLossParameter) + ContrastiveLossParameterOrBuilder { + // Use ContrastiveLossParameter.newBuilder() to construct. + private ContrastiveLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ContrastiveLossParameter() { + margin_ = 1F; + legacyVersion_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContrastiveLossParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + margin_ = input.readFloat(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + legacyVersion_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ContrastiveLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ContrastiveLossParameter.class, caffe.Caffe.ContrastiveLossParameter.Builder.class); + } + + private int bitField0_; + public static final int MARGIN_FIELD_NUMBER = 1; + private float margin_; + /** + * optional float margin = 1 [default = 1]; + * + *
+     * margin for dissimilar pair
+     * 
+ */ + public boolean hasMargin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float margin = 1 [default = 1]; + * + *
+     * margin for dissimilar pair
+     * 
+ */ + public float getMargin() { + return margin_; + } + + public static final int LEGACY_VERSION_FIELD_NUMBER = 2; + private boolean legacyVersion_; + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+     * The first implementation of this cost did not exactly match the cost of
+     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+     * Hadsell paper. New models should probably use this version.
+     * legacy_version = true uses (margin - d^2). This is kept to support /
+     * reproduce existing models and results
+     * 
+ */ + public boolean hasLegacyVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+     * The first implementation of this cost did not exactly match the cost of
+     * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+     * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+     * Hadsell paper. New models should probably use this version.
+     * legacy_version = true uses (margin - d^2). This is kept to support /
+     * reproduce existing models and results
+     * 
+ */ + public boolean getLegacyVersion() { + return legacyVersion_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, margin_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, legacyVersion_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, margin_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, legacyVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ContrastiveLossParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ContrastiveLossParameter 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.ContrastiveLossParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ContrastiveLossParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ContrastiveLossParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ContrastiveLossParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ContrastiveLossParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ContrastiveLossParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ContrastiveLossParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ContrastiveLossParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ContrastiveLossParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ContrastiveLossParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ContrastiveLossParameter) + caffe.Caffe.ContrastiveLossParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ContrastiveLossParameter.class, caffe.Caffe.ContrastiveLossParameter.Builder.class); + } + + // Construct using caffe.Caffe.ContrastiveLossParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + margin_ = 1F; + bitField0_ = (bitField0_ & ~0x00000001); + legacyVersion_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ContrastiveLossParameter_descriptor; + } + + public caffe.Caffe.ContrastiveLossParameter getDefaultInstanceForType() { + return caffe.Caffe.ContrastiveLossParameter.getDefaultInstance(); + } + + public caffe.Caffe.ContrastiveLossParameter build() { + caffe.Caffe.ContrastiveLossParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ContrastiveLossParameter buildPartial() { + caffe.Caffe.ContrastiveLossParameter result = new caffe.Caffe.ContrastiveLossParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.margin_ = margin_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.legacyVersion_ = legacyVersion_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ContrastiveLossParameter) { + return mergeFrom((caffe.Caffe.ContrastiveLossParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ContrastiveLossParameter other) { + if (other == caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) return this; + if (other.hasMargin()) { + setMargin(other.getMargin()); + } + if (other.hasLegacyVersion()) { + setLegacyVersion(other.getLegacyVersion()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ContrastiveLossParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ContrastiveLossParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float margin_ = 1F; + /** + * optional float margin = 1 [default = 1]; + * + *
+       * margin for dissimilar pair
+       * 
+ */ + public boolean hasMargin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float margin = 1 [default = 1]; + * + *
+       * margin for dissimilar pair
+       * 
+ */ + public float getMargin() { + return margin_; + } + /** + * optional float margin = 1 [default = 1]; + * + *
+       * margin for dissimilar pair
+       * 
+ */ + public Builder setMargin(float value) { + bitField0_ |= 0x00000001; + margin_ = value; + onChanged(); + return this; + } + /** + * optional float margin = 1 [default = 1]; + * + *
+       * margin for dissimilar pair
+       * 
+ */ + public Builder clearMargin() { + bitField0_ = (bitField0_ & ~0x00000001); + margin_ = 1F; + onChanged(); + return this; + } + + private boolean legacyVersion_ ; + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+       * The first implementation of this cost did not exactly match the cost of
+       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+       * Hadsell paper. New models should probably use this version.
+       * legacy_version = true uses (margin - d^2). This is kept to support /
+       * reproduce existing models and results
+       * 
+ */ + public boolean hasLegacyVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+       * The first implementation of this cost did not exactly match the cost of
+       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+       * Hadsell paper. New models should probably use this version.
+       * legacy_version = true uses (margin - d^2). This is kept to support /
+       * reproduce existing models and results
+       * 
+ */ + public boolean getLegacyVersion() { + return legacyVersion_; + } + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+       * The first implementation of this cost did not exactly match the cost of
+       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+       * Hadsell paper. New models should probably use this version.
+       * legacy_version = true uses (margin - d^2). This is kept to support /
+       * reproduce existing models and results
+       * 
+ */ + public Builder setLegacyVersion(boolean value) { + bitField0_ |= 0x00000002; + legacyVersion_ = value; + onChanged(); + return this; + } + /** + * optional bool legacy_version = 2 [default = false]; + * + *
+       * The first implementation of this cost did not exactly match the cost of
+       * Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
+       * legacy_version = false (the default) uses (margin - d)^2 as proposed in the
+       * Hadsell paper. New models should probably use this version.
+       * legacy_version = true uses (margin - d^2). This is kept to support /
+       * reproduce existing models and results
+       * 
+ */ + public Builder clearLegacyVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + legacyVersion_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ContrastiveLossParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ContrastiveLossParameter) + private static final caffe.Caffe.ContrastiveLossParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ContrastiveLossParameter(); + } + + public static caffe.Caffe.ContrastiveLossParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ContrastiveLossParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ContrastiveLossParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ContrastiveLossParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConvolutionParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ConvolutionParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + boolean hasNumOutput(); + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + int getNumOutput(); + + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean hasBiasTerm(); + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean getBiasTerm(); + + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + java.util.List getPadList(); + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + int getPadCount(); + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + int getPad(int index); + + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + java.util.List getKernelSizeList(); + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + int getKernelSizeCount(); + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + int getKernelSize(int index); + + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + java.util.List getStrideList(); + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + int getStrideCount(); + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + int getStride(int index); + + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + java.util.List getDilationList(); + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + int getDilationCount(); + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + int getDilation(int index); + + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * For 2D convolution only, the *_h and *_w versions may also be used to
+     * specify both spatial dimensions.
+     * 
+ */ + boolean hasPadH(); + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * For 2D convolution only, the *_h and *_w versions may also be used to
+     * specify both spatial dimensions.
+     * 
+ */ + int getPadH(); + + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width (2D only)
+     * 
+ */ + boolean hasPadW(); + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width (2D only)
+     * 
+ */ + int getPadW(); + + /** + * optional uint32 kernel_h = 11; + * + *
+     * The kernel height (2D only)
+     * 
+ */ + boolean hasKernelH(); + /** + * optional uint32 kernel_h = 11; + * + *
+     * The kernel height (2D only)
+     * 
+ */ + int getKernelH(); + + /** + * optional uint32 kernel_w = 12; + * + *
+     * The kernel width (2D only)
+     * 
+ */ + boolean hasKernelW(); + /** + * optional uint32 kernel_w = 12; + * + *
+     * The kernel width (2D only)
+     * 
+ */ + int getKernelW(); + + /** + * optional uint32 stride_h = 13; + * + *
+     * The stride height (2D only)
+     * 
+ */ + boolean hasStrideH(); + /** + * optional uint32 stride_h = 13; + * + *
+     * The stride height (2D only)
+     * 
+ */ + int getStrideH(); + + /** + * optional uint32 stride_w = 14; + * + *
+     * The stride width (2D only)
+     * 
+ */ + boolean hasStrideW(); + /** + * optional uint32 stride_w = 14; + * + *
+     * The stride width (2D only)
+     * 
+ */ + int getStrideW(); + + /** + * optional uint32 group = 5 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + boolean hasGroup(); + /** + * optional uint32 group = 5 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + int getGroup(); + + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + boolean hasWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameter getWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); + + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + boolean hasBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameter getBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); + + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + caffe.Caffe.ConvolutionParameter.Engine getEngine(); + + /** + * optional int32 axis = 16 [default = 1]; + * + *
+     * The axis to interpret as "channels" when performing convolution.
+     * Preceding dimensions are treated as independent inputs;
+     * succeeding dimensions are treated as "spatial".
+     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+     * groups g>1) filters across the spatial axes (H, W) of the input.
+     * With (N, C, D, H, W) inputs, and axis == 1, we perform
+     * N independent 3D convolutions, sliding (C/g)-channels
+     * filters across the spatial axes (D, H, W) of the input.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 16 [default = 1]; + * + *
+     * The axis to interpret as "channels" when performing convolution.
+     * Preceding dimensions are treated as independent inputs;
+     * succeeding dimensions are treated as "spatial".
+     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+     * groups g>1) filters across the spatial axes (H, W) of the input.
+     * With (N, C, D, H, W) inputs, and axis == 1, we perform
+     * N independent 3D convolutions, sliding (C/g)-channels
+     * filters across the spatial axes (D, H, W) of the input.
+     * 
+ */ + int getAxis(); + + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+     * Whether to force use of the general ND convolution, even if a specific
+     * implementation for blobs of the appropriate number of spatial dimensions
+     * is available. (Currently, there is only a 2D-specific convolution
+     * implementation; for input blobs with num_axes != 2, this option is
+     * ignored and the ND implementation will be used.)
+     * 
+ */ + boolean hasForceNdIm2Col(); + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+     * Whether to force use of the general ND convolution, even if a specific
+     * implementation for blobs of the appropriate number of spatial dimensions
+     * is available. (Currently, there is only a 2D-specific convolution
+     * implementation; for input blobs with num_axes != 2, this option is
+     * ignored and the ND implementation will be used.)
+     * 
+ */ + boolean getForceNdIm2Col(); + } + /** + * Protobuf type {@code caffe.ConvolutionParameter} + */ + public static final class ConvolutionParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ConvolutionParameter) + ConvolutionParameterOrBuilder { + // Use ConvolutionParameter.newBuilder() to construct. + private ConvolutionParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ConvolutionParameter() { + numOutput_ = 0; + biasTerm_ = true; + pad_ = java.util.Collections.emptyList(); + kernelSize_ = java.util.Collections.emptyList(); + stride_ = java.util.Collections.emptyList(); + dilation_ = java.util.Collections.emptyList(); + padH_ = 0; + padW_ = 0; + kernelH_ = 0; + kernelW_ = 0; + strideH_ = 0; + strideW_ = 0; + group_ = 1; + engine_ = 0; + axis_ = 1; + forceNdIm2Col_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConvolutionParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + numOutput_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + biasTerm_ = input.readBool(); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + pad_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + pad_.add(input.readUInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { + pad_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + pad_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + kernelSize_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + kernelSize_.add(input.readUInt32()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { + kernelSize_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + kernelSize_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 40: { + bitField0_ |= 0x00000100; + group_ = input.readUInt32(); + break; + } + case 48: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + stride_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + stride_.add(input.readUInt32()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { + stride_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + while (input.getBytesUntilLimit() > 0) { + stride_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 58: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + subBuilder = weightFiller_.toBuilder(); + } + weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(weightFiller_); + weightFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000200; + break; + } + case 66: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000400) == 0x00000400)) { + subBuilder = biasFiller_.toBuilder(); + } + biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(biasFiller_); + biasFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000400; + break; + } + case 72: { + bitField0_ |= 0x00000004; + padH_ = input.readUInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000008; + padW_ = input.readUInt32(); + break; + } + case 88: { + bitField0_ |= 0x00000010; + kernelH_ = input.readUInt32(); + break; + } + case 96: { + bitField0_ |= 0x00000020; + kernelW_ = input.readUInt32(); + break; + } + case 104: { + bitField0_ |= 0x00000040; + strideH_ = input.readUInt32(); + break; + } + case 112: { + bitField0_ |= 0x00000080; + strideW_ = input.readUInt32(); + break; + } + case 120: { + int rawValue = input.readEnum(); + caffe.Caffe.ConvolutionParameter.Engine value = caffe.Caffe.ConvolutionParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(15, rawValue); + } else { + bitField0_ |= 0x00000800; + engine_ = rawValue; + } + break; + } + case 128: { + bitField0_ |= 0x00001000; + axis_ = input.readInt32(); + break; + } + case 136: { + bitField0_ |= 0x00002000; + forceNdIm2Col_ = input.readBool(); + break; + } + case 144: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + dilation_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + dilation_.add(input.readUInt32()); + break; + } + case 146: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + dilation_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + dilation_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + pad_ = java.util.Collections.unmodifiableList(pad_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + kernelSize_ = java.util.Collections.unmodifiableList(kernelSize_); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + stride_ = java.util.Collections.unmodifiableList(stride_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + dilation_ = java.util.Collections.unmodifiableList(dilation_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ConvolutionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ConvolutionParameter.class, caffe.Caffe.ConvolutionParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.ConvolutionParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.ConvolutionParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.ConvolutionParameter.Engine) + } + + private int bitField0_; + public static final int NUM_OUTPUT_FIELD_NUMBER = 1; + private int numOutput_; + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public int getNumOutput() { + return numOutput_; + } + + public static final int BIAS_TERM_FIELD_NUMBER = 2; + private boolean biasTerm_; + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + + public static final int PAD_FIELD_NUMBER = 3; + private java.util.List pad_; + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + public java.util.List + getPadList() { + return pad_; + } + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + public int getPadCount() { + return pad_.size(); + } + /** + * repeated uint32 pad = 3; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in all spatial dimensions, or once per spatial dimension.
+     * 
+ */ + public int getPad(int index) { + return pad_.get(index); + } + + public static final int KERNEL_SIZE_FIELD_NUMBER = 4; + private java.util.List kernelSize_; + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + public java.util.List + getKernelSizeList() { + return kernelSize_; + } + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + public int getKernelSizeCount() { + return kernelSize_.size(); + } + /** + * repeated uint32 kernel_size = 4; + * + *
+     * The kernel size
+     * 
+ */ + public int getKernelSize(int index) { + return kernelSize_.get(index); + } + + public static final int STRIDE_FIELD_NUMBER = 6; + private java.util.List stride_; + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + public java.util.List + getStrideList() { + return stride_; + } + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + public int getStrideCount() { + return stride_.size(); + } + /** + * repeated uint32 stride = 6; + * + *
+     * The stride; defaults to 1
+     * 
+ */ + public int getStride(int index) { + return stride_.get(index); + } + + public static final int DILATION_FIELD_NUMBER = 18; + private java.util.List dilation_; + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + public java.util.List + getDilationList() { + return dilation_; + } + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + public int getDilationCount() { + return dilation_.size(); + } + /** + * repeated uint32 dilation = 18; + * + *
+     * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+     * holes. (Kernel dilation is sometimes referred to by its use in the
+     * algorithme à trous from Holschneider et al. 1987.)
+     * 
+ */ + public int getDilation(int index) { + return dilation_.get(index); + } + + public static final int PAD_H_FIELD_NUMBER = 9; + private int padH_; + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * For 2D convolution only, the *_h and *_w versions may also be used to
+     * specify both spatial dimensions.
+     * 
+ */ + public boolean hasPadH() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * For 2D convolution only, the *_h and *_w versions may also be used to
+     * specify both spatial dimensions.
+     * 
+ */ + public int getPadH() { + return padH_; + } + + public static final int PAD_W_FIELD_NUMBER = 10; + private int padW_; + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width (2D only)
+     * 
+ */ + public boolean hasPadW() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width (2D only)
+     * 
+ */ + public int getPadW() { + return padW_; + } + + public static final int KERNEL_H_FIELD_NUMBER = 11; + private int kernelH_; + /** + * optional uint32 kernel_h = 11; + * + *
+     * The kernel height (2D only)
+     * 
+ */ + public boolean hasKernelH() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 kernel_h = 11; + * + *
+     * The kernel height (2D only)
+     * 
+ */ + public int getKernelH() { + return kernelH_; + } + + public static final int KERNEL_W_FIELD_NUMBER = 12; + private int kernelW_; + /** + * optional uint32 kernel_w = 12; + * + *
+     * The kernel width (2D only)
+     * 
+ */ + public boolean hasKernelW() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 kernel_w = 12; + * + *
+     * The kernel width (2D only)
+     * 
+ */ + public int getKernelW() { + return kernelW_; + } + + public static final int STRIDE_H_FIELD_NUMBER = 13; + private int strideH_; + /** + * optional uint32 stride_h = 13; + * + *
+     * The stride height (2D only)
+     * 
+ */ + public boolean hasStrideH() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 stride_h = 13; + * + *
+     * The stride height (2D only)
+     * 
+ */ + public int getStrideH() { + return strideH_; + } + + public static final int STRIDE_W_FIELD_NUMBER = 14; + private int strideW_; + /** + * optional uint32 stride_w = 14; + * + *
+     * The stride width (2D only)
+     * 
+ */ + public boolean hasStrideW() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 stride_w = 14; + * + *
+     * The stride width (2D only)
+     * 
+ */ + public int getStrideW() { + return strideW_; + } + + public static final int GROUP_FIELD_NUMBER = 5; + private int group_; + /** + * optional uint32 group = 5 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 group = 5 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + public int getGroup() { + return group_; + } + + public static final int WEIGHT_FILLER_FIELD_NUMBER = 7; + private caffe.Caffe.FillerParameter weightFiller_; + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + + public static final int BIAS_FILLER_FIELD_NUMBER = 8; + private caffe.Caffe.FillerParameter biasFiller_; + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + + public static final int ENGINE_FIELD_NUMBER = 15; + private int engine_; + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public caffe.Caffe.ConvolutionParameter.Engine getEngine() { + caffe.Caffe.ConvolutionParameter.Engine result = caffe.Caffe.ConvolutionParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.ConvolutionParameter.Engine.DEFAULT : result; + } + + public static final int AXIS_FIELD_NUMBER = 16; + private int axis_; + /** + * optional int32 axis = 16 [default = 1]; + * + *
+     * The axis to interpret as "channels" when performing convolution.
+     * Preceding dimensions are treated as independent inputs;
+     * succeeding dimensions are treated as "spatial".
+     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+     * groups g>1) filters across the spatial axes (H, W) of the input.
+     * With (N, C, D, H, W) inputs, and axis == 1, we perform
+     * N independent 3D convolutions, sliding (C/g)-channels
+     * filters across the spatial axes (D, H, W) of the input.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional int32 axis = 16 [default = 1]; + * + *
+     * The axis to interpret as "channels" when performing convolution.
+     * Preceding dimensions are treated as independent inputs;
+     * succeeding dimensions are treated as "spatial".
+     * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+     * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+     * groups g>1) filters across the spatial axes (H, W) of the input.
+     * With (N, C, D, H, W) inputs, and axis == 1, we perform
+     * N independent 3D convolutions, sliding (C/g)-channels
+     * filters across the spatial axes (D, H, W) of the input.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int FORCE_ND_IM2COL_FIELD_NUMBER = 17; + private boolean forceNdIm2Col_; + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+     * Whether to force use of the general ND convolution, even if a specific
+     * implementation for blobs of the appropriate number of spatial dimensions
+     * is available. (Currently, there is only a 2D-specific convolution
+     * implementation; for input blobs with num_axes != 2, this option is
+     * ignored and the ND implementation will be used.)
+     * 
+ */ + public boolean hasForceNdIm2Col() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+     * Whether to force use of the general ND convolution, even if a specific
+     * implementation for blobs of the appropriate number of spatial dimensions
+     * is available. (Currently, there is only a 2D-specific convolution
+     * implementation; for input blobs with num_axes != 2, this option is
+     * ignored and the ND implementation will be used.)
+     * 
+ */ + public boolean getForceNdIm2Col() { + return forceNdIm2Col_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, biasTerm_); + } + for (int i = 0; i < pad_.size(); i++) { + output.writeUInt32(3, pad_.get(i)); + } + for (int i = 0; i < kernelSize_.size(); i++) { + output.writeUInt32(4, kernelSize_.get(i)); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeUInt32(5, group_); + } + for (int i = 0; i < stride_.size(); i++) { + output.writeUInt32(6, stride_.get(i)); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(7, getWeightFiller()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeMessage(8, getBiasFiller()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(9, padH_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(10, padW_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeUInt32(11, kernelH_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeUInt32(12, kernelW_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(13, strideH_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeUInt32(14, strideW_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeEnum(15, engine_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeInt32(16, axis_); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeBool(17, forceNdIm2Col_); + } + for (int i = 0; i < dilation_.size(); i++) { + output.writeUInt32(18, dilation_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, biasTerm_); + } + { + int dataSize = 0; + for (int i = 0; i < pad_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(pad_.get(i)); + } + size += dataSize; + size += 1 * getPadList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < kernelSize_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(kernelSize_.get(i)); + } + size += dataSize; + size += 1 * getKernelSizeList().size(); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, group_); + } + { + int dataSize = 0; + for (int i = 0; i < stride_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(stride_.get(i)); + } + size += dataSize; + size += 1 * getStrideList().size(); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getWeightFiller()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getBiasFiller()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, padH_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, padW_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, kernelH_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, kernelW_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(13, strideH_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(14, strideW_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, engine_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(16, axis_); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, forceNdIm2Col_); + } + { + int dataSize = 0; + for (int i = 0; i < dilation_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dilation_.get(i)); + } + size += dataSize; + size += 2 * getDilationList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ConvolutionParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ConvolutionParameter 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.ConvolutionParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ConvolutionParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ConvolutionParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ConvolutionParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ConvolutionParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ConvolutionParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ConvolutionParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ConvolutionParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ConvolutionParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ConvolutionParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ConvolutionParameter) + caffe.Caffe.ConvolutionParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ConvolutionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ConvolutionParameter.class, caffe.Caffe.ConvolutionParameter.Builder.class); + } + + // Construct using caffe.Caffe.ConvolutionParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getWeightFillerFieldBuilder(); + getBiasFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + numOutput_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + biasTerm_ = true; + bitField0_ = (bitField0_ & ~0x00000002); + pad_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + kernelSize_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + stride_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + dilation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + padH_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + padW_ = 0; + bitField0_ = (bitField0_ & ~0x00000080); + kernelH_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + kernelW_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); + strideH_ = 0; + bitField0_ = (bitField0_ & ~0x00000400); + strideW_ = 0; + bitField0_ = (bitField0_ & ~0x00000800); + group_ = 1; + bitField0_ = (bitField0_ & ~0x00001000); + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00008000); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00010000); + forceNdIm2Col_ = false; + bitField0_ = (bitField0_ & ~0x00020000); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ConvolutionParameter_descriptor; + } + + public caffe.Caffe.ConvolutionParameter getDefaultInstanceForType() { + return caffe.Caffe.ConvolutionParameter.getDefaultInstance(); + } + + public caffe.Caffe.ConvolutionParameter build() { + caffe.Caffe.ConvolutionParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ConvolutionParameter buildPartial() { + caffe.Caffe.ConvolutionParameter result = new caffe.Caffe.ConvolutionParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.numOutput_ = numOutput_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.biasTerm_ = biasTerm_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + pad_ = java.util.Collections.unmodifiableList(pad_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.pad_ = pad_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + kernelSize_ = java.util.Collections.unmodifiableList(kernelSize_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.kernelSize_ = kernelSize_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + stride_ = java.util.Collections.unmodifiableList(stride_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.stride_ = stride_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + dilation_ = java.util.Collections.unmodifiableList(dilation_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.dilation_ = dilation_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000004; + } + result.padH_ = padH_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000008; + } + result.padW_ = padW_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000010; + } + result.kernelH_ = kernelH_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000020; + } + result.kernelW_ = kernelW_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000040; + } + result.strideH_ = strideH_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000080; + } + result.strideW_ = strideW_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000100; + } + result.group_ = group_; + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00000200; + } + if (weightFillerBuilder_ == null) { + result.weightFiller_ = weightFiller_; + } else { + result.weightFiller_ = weightFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00000400; + } + if (biasFillerBuilder_ == null) { + result.biasFiller_ = biasFiller_; + } else { + result.biasFiller_ = biasFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) == 0x00008000)) { + to_bitField0_ |= 0x00000800; + } + result.engine_ = engine_; + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00001000; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00002000; + } + result.forceNdIm2Col_ = forceNdIm2Col_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ConvolutionParameter) { + return mergeFrom((caffe.Caffe.ConvolutionParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ConvolutionParameter other) { + if (other == caffe.Caffe.ConvolutionParameter.getDefaultInstance()) return this; + if (other.hasNumOutput()) { + setNumOutput(other.getNumOutput()); + } + if (other.hasBiasTerm()) { + setBiasTerm(other.getBiasTerm()); + } + if (!other.pad_.isEmpty()) { + if (pad_.isEmpty()) { + pad_ = other.pad_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePadIsMutable(); + pad_.addAll(other.pad_); + } + onChanged(); + } + if (!other.kernelSize_.isEmpty()) { + if (kernelSize_.isEmpty()) { + kernelSize_ = other.kernelSize_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureKernelSizeIsMutable(); + kernelSize_.addAll(other.kernelSize_); + } + onChanged(); + } + if (!other.stride_.isEmpty()) { + if (stride_.isEmpty()) { + stride_ = other.stride_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureStrideIsMutable(); + stride_.addAll(other.stride_); + } + onChanged(); + } + if (!other.dilation_.isEmpty()) { + if (dilation_.isEmpty()) { + dilation_ = other.dilation_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureDilationIsMutable(); + dilation_.addAll(other.dilation_); + } + onChanged(); + } + if (other.hasPadH()) { + setPadH(other.getPadH()); + } + if (other.hasPadW()) { + setPadW(other.getPadW()); + } + if (other.hasKernelH()) { + setKernelH(other.getKernelH()); + } + if (other.hasKernelW()) { + setKernelW(other.getKernelW()); + } + if (other.hasStrideH()) { + setStrideH(other.getStrideH()); + } + if (other.hasStrideW()) { + setStrideW(other.getStrideW()); + } + if (other.hasGroup()) { + setGroup(other.getGroup()); + } + if (other.hasWeightFiller()) { + mergeWeightFiller(other.getWeightFiller()); + } + if (other.hasBiasFiller()) { + mergeBiasFiller(other.getBiasFiller()); + } + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasForceNdIm2Col()) { + setForceNdIm2Col(other.getForceNdIm2Col()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ConvolutionParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ConvolutionParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int numOutput_ ; + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public int getNumOutput() { + return numOutput_; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder setNumOutput(int value) { + bitField0_ |= 0x00000001; + numOutput_ = value; + onChanged(); + return this; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder clearNumOutput() { + bitField0_ = (bitField0_ & ~0x00000001); + numOutput_ = 0; + onChanged(); + return this; + } + + private boolean biasTerm_ = true; + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder setBiasTerm(boolean value) { + bitField0_ |= 0x00000002; + biasTerm_ = value; + onChanged(); + return this; + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder clearBiasTerm() { + bitField0_ = (bitField0_ & ~0x00000002); + biasTerm_ = true; + onChanged(); + return this; + } + + private java.util.List pad_ = java.util.Collections.emptyList(); + private void ensurePadIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + pad_ = new java.util.ArrayList(pad_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public java.util.List + getPadList() { + return java.util.Collections.unmodifiableList(pad_); + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public int getPadCount() { + return pad_.size(); + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public int getPad(int index) { + return pad_.get(index); + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public Builder setPad( + int index, int value) { + ensurePadIsMutable(); + pad_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public Builder addPad(int value) { + ensurePadIsMutable(); + pad_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public Builder addAllPad( + java.lang.Iterable values) { + ensurePadIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pad_); + onChanged(); + return this; + } + /** + * repeated uint32 pad = 3; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in all spatial dimensions, or once per spatial dimension.
+       * 
+ */ + public Builder clearPad() { + pad_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private java.util.List kernelSize_ = java.util.Collections.emptyList(); + private void ensureKernelSizeIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + kernelSize_ = new java.util.ArrayList(kernelSize_); + bitField0_ |= 0x00000008; + } + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public java.util.List + getKernelSizeList() { + return java.util.Collections.unmodifiableList(kernelSize_); + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public int getKernelSizeCount() { + return kernelSize_.size(); + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public int getKernelSize(int index) { + return kernelSize_.get(index); + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public Builder setKernelSize( + int index, int value) { + ensureKernelSizeIsMutable(); + kernelSize_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public Builder addKernelSize(int value) { + ensureKernelSizeIsMutable(); + kernelSize_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public Builder addAllKernelSize( + java.lang.Iterable values) { + ensureKernelSizeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, kernelSize_); + onChanged(); + return this; + } + /** + * repeated uint32 kernel_size = 4; + * + *
+       * The kernel size
+       * 
+ */ + public Builder clearKernelSize() { + kernelSize_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private java.util.List stride_ = java.util.Collections.emptyList(); + private void ensureStrideIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + stride_ = new java.util.ArrayList(stride_); + bitField0_ |= 0x00000010; + } + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public java.util.List + getStrideList() { + return java.util.Collections.unmodifiableList(stride_); + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public int getStrideCount() { + return stride_.size(); + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public int getStride(int index) { + return stride_.get(index); + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public Builder setStride( + int index, int value) { + ensureStrideIsMutable(); + stride_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public Builder addStride(int value) { + ensureStrideIsMutable(); + stride_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public Builder addAllStride( + java.lang.Iterable values) { + ensureStrideIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, stride_); + onChanged(); + return this; + } + /** + * repeated uint32 stride = 6; + * + *
+       * The stride; defaults to 1
+       * 
+ */ + public Builder clearStride() { + stride_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private java.util.List dilation_ = java.util.Collections.emptyList(); + private void ensureDilationIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + dilation_ = new java.util.ArrayList(dilation_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public java.util.List + getDilationList() { + return java.util.Collections.unmodifiableList(dilation_); + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public int getDilationCount() { + return dilation_.size(); + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public int getDilation(int index) { + return dilation_.get(index); + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public Builder setDilation( + int index, int value) { + ensureDilationIsMutable(); + dilation_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public Builder addDilation(int value) { + ensureDilationIsMutable(); + dilation_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public Builder addAllDilation( + java.lang.Iterable values) { + ensureDilationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dilation_); + onChanged(); + return this; + } + /** + * repeated uint32 dilation = 18; + * + *
+       * Factor used to dilate the kernel, (implicitly) zero-filling the resulting
+       * holes. (Kernel dilation is sometimes referred to by its use in the
+       * algorithme à trous from Holschneider et al. 1987.)
+       * 
+ */ + public Builder clearDilation() { + dilation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + private int padH_ ; + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * For 2D convolution only, the *_h and *_w versions may also be used to
+       * specify both spatial dimensions.
+       * 
+ */ + public boolean hasPadH() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * For 2D convolution only, the *_h and *_w versions may also be used to
+       * specify both spatial dimensions.
+       * 
+ */ + public int getPadH() { + return padH_; + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * For 2D convolution only, the *_h and *_w versions may also be used to
+       * specify both spatial dimensions.
+       * 
+ */ + public Builder setPadH(int value) { + bitField0_ |= 0x00000040; + padH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * For 2D convolution only, the *_h and *_w versions may also be used to
+       * specify both spatial dimensions.
+       * 
+ */ + public Builder clearPadH() { + bitField0_ = (bitField0_ & ~0x00000040); + padH_ = 0; + onChanged(); + return this; + } + + private int padW_ ; + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width (2D only)
+       * 
+ */ + public boolean hasPadW() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width (2D only)
+       * 
+ */ + public int getPadW() { + return padW_; + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width (2D only)
+       * 
+ */ + public Builder setPadW(int value) { + bitField0_ |= 0x00000080; + padW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width (2D only)
+       * 
+ */ + public Builder clearPadW() { + bitField0_ = (bitField0_ & ~0x00000080); + padW_ = 0; + onChanged(); + return this; + } + + private int kernelH_ ; + /** + * optional uint32 kernel_h = 11; + * + *
+       * The kernel height (2D only)
+       * 
+ */ + public boolean hasKernelH() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 kernel_h = 11; + * + *
+       * The kernel height (2D only)
+       * 
+ */ + public int getKernelH() { + return kernelH_; + } + /** + * optional uint32 kernel_h = 11; + * + *
+       * The kernel height (2D only)
+       * 
+ */ + public Builder setKernelH(int value) { + bitField0_ |= 0x00000100; + kernelH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernel_h = 11; + * + *
+       * The kernel height (2D only)
+       * 
+ */ + public Builder clearKernelH() { + bitField0_ = (bitField0_ & ~0x00000100); + kernelH_ = 0; + onChanged(); + return this; + } + + private int kernelW_ ; + /** + * optional uint32 kernel_w = 12; + * + *
+       * The kernel width (2D only)
+       * 
+ */ + public boolean hasKernelW() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 kernel_w = 12; + * + *
+       * The kernel width (2D only)
+       * 
+ */ + public int getKernelW() { + return kernelW_; + } + /** + * optional uint32 kernel_w = 12; + * + *
+       * The kernel width (2D only)
+       * 
+ */ + public Builder setKernelW(int value) { + bitField0_ |= 0x00000200; + kernelW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernel_w = 12; + * + *
+       * The kernel width (2D only)
+       * 
+ */ + public Builder clearKernelW() { + bitField0_ = (bitField0_ & ~0x00000200); + kernelW_ = 0; + onChanged(); + return this; + } + + private int strideH_ ; + /** + * optional uint32 stride_h = 13; + * + *
+       * The stride height (2D only)
+       * 
+ */ + public boolean hasStrideH() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional uint32 stride_h = 13; + * + *
+       * The stride height (2D only)
+       * 
+ */ + public int getStrideH() { + return strideH_; + } + /** + * optional uint32 stride_h = 13; + * + *
+       * The stride height (2D only)
+       * 
+ */ + public Builder setStrideH(int value) { + bitField0_ |= 0x00000400; + strideH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride_h = 13; + * + *
+       * The stride height (2D only)
+       * 
+ */ + public Builder clearStrideH() { + bitField0_ = (bitField0_ & ~0x00000400); + strideH_ = 0; + onChanged(); + return this; + } + + private int strideW_ ; + /** + * optional uint32 stride_w = 14; + * + *
+       * The stride width (2D only)
+       * 
+ */ + public boolean hasStrideW() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional uint32 stride_w = 14; + * + *
+       * The stride width (2D only)
+       * 
+ */ + public int getStrideW() { + return strideW_; + } + /** + * optional uint32 stride_w = 14; + * + *
+       * The stride width (2D only)
+       * 
+ */ + public Builder setStrideW(int value) { + bitField0_ |= 0x00000800; + strideW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride_w = 14; + * + *
+       * The stride width (2D only)
+       * 
+ */ + public Builder clearStrideW() { + bitField0_ = (bitField0_ & ~0x00000800); + strideW_ = 0; + onChanged(); + return this; + } + + private int group_ = 1; + /** + * optional uint32 group = 5 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public boolean hasGroup() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional uint32 group = 5 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public int getGroup() { + return group_; + } + /** + * optional uint32 group = 5 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public Builder setGroup(int value) { + bitField0_ |= 0x00001000; + group_ = value; + onChanged(); + return this; + } + /** + * optional uint32 group = 5 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00001000); + group_ = 1; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter weightFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + if (weightFillerBuilder_ == null) { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } else { + return weightFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + weightFiller_ = value; + onChanged(); + } else { + weightFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (weightFillerBuilder_ == null) { + weightFiller_ = builderForValue.build(); + onChanged(); + } else { + weightFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000) && + weightFiller_ != null && + weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + weightFiller_ = + caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); + } else { + weightFiller_ = value; + } + onChanged(); + } else { + weightFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder clearWeightFiller() { + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + onChanged(); + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getWeightFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + if (weightFillerBuilder_ != null) { + return weightFillerBuilder_.getMessageOrBuilder(); + } else { + return weightFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + } + /** + * optional .caffe.FillerParameter weight_filler = 7; + * + *
+       * The filler for the weight
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getWeightFillerFieldBuilder() { + if (weightFillerBuilder_ == null) { + weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getWeightFiller(), + getParentForChildren(), + isClean()); + weightFiller_ = null; + } + return weightFillerBuilder_; + } + + private caffe.Caffe.FillerParameter biasFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + if (biasFillerBuilder_ == null) { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } else { + return biasFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasFiller_ = value; + onChanged(); + } else { + biasFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (biasFillerBuilder_ == null) { + biasFiller_ = builderForValue.build(); + onChanged(); + } else { + biasFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (((bitField0_ & 0x00004000) == 0x00004000) && + biasFiller_ != null && + biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + biasFiller_ = + caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); + } else { + biasFiller_ = value; + } + onChanged(); + } else { + biasFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder clearBiasFiller() { + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + onChanged(); + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getBiasFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + if (biasFillerBuilder_ != null) { + return biasFillerBuilder_.getMessageOrBuilder(); + } else { + return biasFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + } + /** + * optional .caffe.FillerParameter bias_filler = 8; + * + *
+       * The filler for the bias
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getBiasFillerFieldBuilder() { + if (biasFillerBuilder_ == null) { + biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getBiasFiller(), + getParentForChildren(), + isClean()); + biasFiller_ = null; + } + return biasFillerBuilder_; + } + + private int engine_ = 0; + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public caffe.Caffe.ConvolutionParameter.Engine getEngine() { + caffe.Caffe.ConvolutionParameter.Engine result = caffe.Caffe.ConvolutionParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.ConvolutionParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.ConvolutionParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00008000); + engine_ = 0; + onChanged(); + return this; + } + + private int axis_ = 1; + /** + * optional int32 axis = 16 [default = 1]; + * + *
+       * The axis to interpret as "channels" when performing convolution.
+       * Preceding dimensions are treated as independent inputs;
+       * succeeding dimensions are treated as "spatial".
+       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+       * groups g>1) filters across the spatial axes (H, W) of the input.
+       * With (N, C, D, H, W) inputs, and axis == 1, we perform
+       * N independent 3D convolutions, sliding (C/g)-channels
+       * filters across the spatial axes (D, H, W) of the input.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional int32 axis = 16 [default = 1]; + * + *
+       * The axis to interpret as "channels" when performing convolution.
+       * Preceding dimensions are treated as independent inputs;
+       * succeeding dimensions are treated as "spatial".
+       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+       * groups g>1) filters across the spatial axes (H, W) of the input.
+       * With (N, C, D, H, W) inputs, and axis == 1, we perform
+       * N independent 3D convolutions, sliding (C/g)-channels
+       * filters across the spatial axes (D, H, W) of the input.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 16 [default = 1]; + * + *
+       * The axis to interpret as "channels" when performing convolution.
+       * Preceding dimensions are treated as independent inputs;
+       * succeeding dimensions are treated as "spatial".
+       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+       * groups g>1) filters across the spatial axes (H, W) of the input.
+       * With (N, C, D, H, W) inputs, and axis == 1, we perform
+       * N independent 3D convolutions, sliding (C/g)-channels
+       * filters across the spatial axes (D, H, W) of the input.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00010000; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 16 [default = 1]; + * + *
+       * The axis to interpret as "channels" when performing convolution.
+       * Preceding dimensions are treated as independent inputs;
+       * succeeding dimensions are treated as "spatial".
+       * With (N, C, H, W) inputs, and axis == 1 (the default), we perform
+       * N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
+       * groups g>1) filters across the spatial axes (H, W) of the input.
+       * With (N, C, D, H, W) inputs, and axis == 1, we perform
+       * N independent 3D convolutions, sliding (C/g)-channels
+       * filters across the spatial axes (D, H, W) of the input.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00010000); + axis_ = 1; + onChanged(); + return this; + } + + private boolean forceNdIm2Col_ ; + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+       * Whether to force use of the general ND convolution, even if a specific
+       * implementation for blobs of the appropriate number of spatial dimensions
+       * is available. (Currently, there is only a 2D-specific convolution
+       * implementation; for input blobs with num_axes != 2, this option is
+       * ignored and the ND implementation will be used.)
+       * 
+ */ + public boolean hasForceNdIm2Col() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+       * Whether to force use of the general ND convolution, even if a specific
+       * implementation for blobs of the appropriate number of spatial dimensions
+       * is available. (Currently, there is only a 2D-specific convolution
+       * implementation; for input blobs with num_axes != 2, this option is
+       * ignored and the ND implementation will be used.)
+       * 
+ */ + public boolean getForceNdIm2Col() { + return forceNdIm2Col_; + } + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+       * Whether to force use of the general ND convolution, even if a specific
+       * implementation for blobs of the appropriate number of spatial dimensions
+       * is available. (Currently, there is only a 2D-specific convolution
+       * implementation; for input blobs with num_axes != 2, this option is
+       * ignored and the ND implementation will be used.)
+       * 
+ */ + public Builder setForceNdIm2Col(boolean value) { + bitField0_ |= 0x00020000; + forceNdIm2Col_ = value; + onChanged(); + return this; + } + /** + * optional bool force_nd_im2col = 17 [default = false]; + * + *
+       * Whether to force use of the general ND convolution, even if a specific
+       * implementation for blobs of the appropriate number of spatial dimensions
+       * is available. (Currently, there is only a 2D-specific convolution
+       * implementation; for input blobs with num_axes != 2, this option is
+       * ignored and the ND implementation will be used.)
+       * 
+ */ + public Builder clearForceNdIm2Col() { + bitField0_ = (bitField0_ & ~0x00020000); + forceNdIm2Col_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ConvolutionParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ConvolutionParameter) + private static final caffe.Caffe.ConvolutionParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ConvolutionParameter(); + } + + public static caffe.Caffe.ConvolutionParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ConvolutionParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ConvolutionParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ConvolutionParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CropParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.CropParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 1 [default = 2]; + * + *
+     * To crop, elements of the first bottom are selected to fit the dimensions
+     * of the second, reference bottom. The crop is configured by
+     * - the crop `axis` to pick the dimensions for cropping
+     * - the crop `offset` to set the shift for all/each dimension
+     * to align the cropped bottom with the reference bottom.
+     * All dimensions up to but excluding `axis` are preserved, while
+     * the dimensions including and trailing `axis` are cropped.
+     * If only one `offset` is set, then all dimensions are offset by this amount.
+     * Otherwise, the number of offsets must equal the number of cropped axes to
+     * shift the crop in each dimension accordingly.
+     * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+     * and `axis` may be negative to index from the end (e.g., -1 for the last
+     * axis).
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 1 [default = 2]; + * + *
+     * To crop, elements of the first bottom are selected to fit the dimensions
+     * of the second, reference bottom. The crop is configured by
+     * - the crop `axis` to pick the dimensions for cropping
+     * - the crop `offset` to set the shift for all/each dimension
+     * to align the cropped bottom with the reference bottom.
+     * All dimensions up to but excluding `axis` are preserved, while
+     * the dimensions including and trailing `axis` are cropped.
+     * If only one `offset` is set, then all dimensions are offset by this amount.
+     * Otherwise, the number of offsets must equal the number of cropped axes to
+     * shift the crop in each dimension accordingly.
+     * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+     * and `axis` may be negative to index from the end (e.g., -1 for the last
+     * axis).
+     * 
+ */ + int getAxis(); + + /** + * repeated uint32 offset = 2; + */ + java.util.List getOffsetList(); + /** + * repeated uint32 offset = 2; + */ + int getOffsetCount(); + /** + * repeated uint32 offset = 2; + */ + int getOffset(int index); + } + /** + * Protobuf type {@code caffe.CropParameter} + */ + public static final class CropParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.CropParameter) + CropParameterOrBuilder { + // Use CropParameter.newBuilder() to construct. + private CropParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CropParameter() { + axis_ = 2; + offset_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + axis_ = input.readInt32(); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + offset_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + offset_.add(input.readUInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { + offset_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + offset_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + offset_ = java.util.Collections.unmodifiableList(offset_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_CropParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_CropParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.CropParameter.class, caffe.Caffe.CropParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 1; + private int axis_; + /** + * optional int32 axis = 1 [default = 2]; + * + *
+     * To crop, elements of the first bottom are selected to fit the dimensions
+     * of the second, reference bottom. The crop is configured by
+     * - the crop `axis` to pick the dimensions for cropping
+     * - the crop `offset` to set the shift for all/each dimension
+     * to align the cropped bottom with the reference bottom.
+     * All dimensions up to but excluding `axis` are preserved, while
+     * the dimensions including and trailing `axis` are cropped.
+     * If only one `offset` is set, then all dimensions are offset by this amount.
+     * Otherwise, the number of offsets must equal the number of cropped axes to
+     * shift the crop in each dimension accordingly.
+     * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+     * and `axis` may be negative to index from the end (e.g., -1 for the last
+     * axis).
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 2]; + * + *
+     * To crop, elements of the first bottom are selected to fit the dimensions
+     * of the second, reference bottom. The crop is configured by
+     * - the crop `axis` to pick the dimensions for cropping
+     * - the crop `offset` to set the shift for all/each dimension
+     * to align the cropped bottom with the reference bottom.
+     * All dimensions up to but excluding `axis` are preserved, while
+     * the dimensions including and trailing `axis` are cropped.
+     * If only one `offset` is set, then all dimensions are offset by this amount.
+     * Otherwise, the number of offsets must equal the number of cropped axes to
+     * shift the crop in each dimension accordingly.
+     * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+     * and `axis` may be negative to index from the end (e.g., -1 for the last
+     * axis).
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int OFFSET_FIELD_NUMBER = 2; + private java.util.List offset_; + /** + * repeated uint32 offset = 2; + */ + public java.util.List + getOffsetList() { + return offset_; + } + /** + * repeated uint32 offset = 2; + */ + public int getOffsetCount() { + return offset_.size(); + } + /** + * repeated uint32 offset = 2; + */ + public int getOffset(int index) { + return offset_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, axis_); + } + for (int i = 0; i < offset_.size(); i++) { + output.writeUInt32(2, offset_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, axis_); + } + { + int dataSize = 0; + for (int i = 0; i < offset_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(offset_.get(i)); + } + size += dataSize; + size += 1 * getOffsetList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.CropParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.CropParameter 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.CropParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.CropParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.CropParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.CropParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.CropParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.CropParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.CropParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.CropParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.CropParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.CropParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.CropParameter) + caffe.Caffe.CropParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_CropParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_CropParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.CropParameter.class, caffe.Caffe.CropParameter.Builder.class); + } + + // Construct using caffe.Caffe.CropParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + axis_ = 2; + bitField0_ = (bitField0_ & ~0x00000001); + offset_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_CropParameter_descriptor; + } + + public caffe.Caffe.CropParameter getDefaultInstanceForType() { + return caffe.Caffe.CropParameter.getDefaultInstance(); + } + + public caffe.Caffe.CropParameter build() { + caffe.Caffe.CropParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.CropParameter buildPartial() { + caffe.Caffe.CropParameter result = new caffe.Caffe.CropParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + offset_ = java.util.Collections.unmodifiableList(offset_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.offset_ = offset_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.CropParameter) { + return mergeFrom((caffe.Caffe.CropParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.CropParameter other) { + if (other == caffe.Caffe.CropParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (!other.offset_.isEmpty()) { + if (offset_.isEmpty()) { + offset_ = other.offset_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOffsetIsMutable(); + offset_.addAll(other.offset_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.CropParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.CropParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 2; + /** + * optional int32 axis = 1 [default = 2]; + * + *
+       * To crop, elements of the first bottom are selected to fit the dimensions
+       * of the second, reference bottom. The crop is configured by
+       * - the crop `axis` to pick the dimensions for cropping
+       * - the crop `offset` to set the shift for all/each dimension
+       * to align the cropped bottom with the reference bottom.
+       * All dimensions up to but excluding `axis` are preserved, while
+       * the dimensions including and trailing `axis` are cropped.
+       * If only one `offset` is set, then all dimensions are offset by this amount.
+       * Otherwise, the number of offsets must equal the number of cropped axes to
+       * shift the crop in each dimension accordingly.
+       * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+       * and `axis` may be negative to index from the end (e.g., -1 for the last
+       * axis).
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 2]; + * + *
+       * To crop, elements of the first bottom are selected to fit the dimensions
+       * of the second, reference bottom. The crop is configured by
+       * - the crop `axis` to pick the dimensions for cropping
+       * - the crop `offset` to set the shift for all/each dimension
+       * to align the cropped bottom with the reference bottom.
+       * All dimensions up to but excluding `axis` are preserved, while
+       * the dimensions including and trailing `axis` are cropped.
+       * If only one `offset` is set, then all dimensions are offset by this amount.
+       * Otherwise, the number of offsets must equal the number of cropped axes to
+       * shift the crop in each dimension accordingly.
+       * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+       * and `axis` may be negative to index from the end (e.g., -1 for the last
+       * axis).
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 1 [default = 2]; + * + *
+       * To crop, elements of the first bottom are selected to fit the dimensions
+       * of the second, reference bottom. The crop is configured by
+       * - the crop `axis` to pick the dimensions for cropping
+       * - the crop `offset` to set the shift for all/each dimension
+       * to align the cropped bottom with the reference bottom.
+       * All dimensions up to but excluding `axis` are preserved, while
+       * the dimensions including and trailing `axis` are cropped.
+       * If only one `offset` is set, then all dimensions are offset by this amount.
+       * Otherwise, the number of offsets must equal the number of cropped axes to
+       * shift the crop in each dimension accordingly.
+       * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+       * and `axis` may be negative to index from the end (e.g., -1 for the last
+       * axis).
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 1 [default = 2]; + * + *
+       * To crop, elements of the first bottom are selected to fit the dimensions
+       * of the second, reference bottom. The crop is configured by
+       * - the crop `axis` to pick the dimensions for cropping
+       * - the crop `offset` to set the shift for all/each dimension
+       * to align the cropped bottom with the reference bottom.
+       * All dimensions up to but excluding `axis` are preserved, while
+       * the dimensions including and trailing `axis` are cropped.
+       * If only one `offset` is set, then all dimensions are offset by this amount.
+       * Otherwise, the number of offsets must equal the number of cropped axes to
+       * shift the crop in each dimension accordingly.
+       * Note: standard dimensions are N,C,H,W so the default is a spatial crop,
+       * and `axis` may be negative to index from the end (e.g., -1 for the last
+       * axis).
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 2; + onChanged(); + return this; + } + + private java.util.List offset_ = java.util.Collections.emptyList(); + private void ensureOffsetIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + offset_ = new java.util.ArrayList(offset_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated uint32 offset = 2; + */ + public java.util.List + getOffsetList() { + return java.util.Collections.unmodifiableList(offset_); + } + /** + * repeated uint32 offset = 2; + */ + public int getOffsetCount() { + return offset_.size(); + } + /** + * repeated uint32 offset = 2; + */ + public int getOffset(int index) { + return offset_.get(index); + } + /** + * repeated uint32 offset = 2; + */ + public Builder setOffset( + int index, int value) { + ensureOffsetIsMutable(); + offset_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 offset = 2; + */ + public Builder addOffset(int value) { + ensureOffsetIsMutable(); + offset_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 offset = 2; + */ + public Builder addAllOffset( + java.lang.Iterable values) { + ensureOffsetIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, offset_); + onChanged(); + return this; + } + /** + * repeated uint32 offset = 2; + */ + public Builder clearOffset() { + offset_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.CropParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.CropParameter) + private static final caffe.Caffe.CropParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.CropParameter(); + } + + public static caffe.Caffe.CropParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CropParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CropParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.CropParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.DataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + boolean hasBatchSize(); + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + int getBatchSize(); + + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * DEPRECATED. Each solver accesses a different subset of the database.
+     * 
+ */ + boolean hasRandSkip(); + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * DEPRECATED. Each solver accesses a different subset of the database.
+     * 
+ */ + int getRandSkip(); + + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + boolean hasBackend(); + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + caffe.Caffe.DataParameter.DB getBackend(); + + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + float getScale(); + + /** + * optional string mean_file = 3; + */ + boolean hasMeanFile(); + /** + * optional string mean_file = 3; + */ + java.lang.String getMeanFile(); + /** + * optional string mean_file = 3; + */ + com.google.protobuf.ByteString + getMeanFileBytes(); + + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + boolean hasCropSize(); + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + int getCropSize(); + + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + boolean hasMirror(); + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + boolean getMirror(); + + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+     * Force the encoded image to have 3 color channels
+     * 
+ */ + boolean hasForceEncodedColor(); + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+     * Force the encoded image to have 3 color channels
+     * 
+ */ + boolean getForceEncodedColor(); + + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+     * Prefetch queue (Number of batches to prefetch to host memory, increase if
+     * data access bandwidth varies).
+     * 
+ */ + boolean hasPrefetch(); + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+     * Prefetch queue (Number of batches to prefetch to host memory, increase if
+     * data access bandwidth varies).
+     * 
+ */ + int getPrefetch(); + } + /** + * Protobuf type {@code caffe.DataParameter} + */ + public static final class DataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.DataParameter) + DataParameterOrBuilder { + // Use DataParameter.newBuilder() to construct. + private DataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DataParameter() { + source_ = ""; + batchSize_ = 0; + randSkip_ = 0; + backend_ = 0; + scale_ = 1F; + meanFile_ = ""; + cropSize_ = 0; + mirror_ = false; + forceEncodedColor_ = false; + prefetch_ = 4; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + source_ = bs; + break; + } + case 21: { + bitField0_ |= 0x00000010; + scale_ = input.readFloat(); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + meanFile_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000002; + batchSize_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000040; + cropSize_ = input.readUInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000080; + mirror_ = input.readBool(); + break; + } + case 56: { + bitField0_ |= 0x00000004; + randSkip_ = input.readUInt32(); + break; + } + case 64: { + int rawValue = input.readEnum(); + caffe.Caffe.DataParameter.DB value = caffe.Caffe.DataParameter.DB.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(8, rawValue); + } else { + bitField0_ |= 0x00000008; + backend_ = rawValue; + } + break; + } + case 72: { + bitField0_ |= 0x00000100; + forceEncodedColor_ = input.readBool(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + prefetch_ = input.readUInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_DataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DataParameter.class, caffe.Caffe.DataParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.DataParameter.DB} + */ + public enum DB + implements com.google.protobuf.ProtocolMessageEnum { + /** + * LEVELDB = 0; + */ + LEVELDB(0, 0), + /** + * LMDB = 1; + */ + LMDB(1, 1), + ; + + /** + * LEVELDB = 0; + */ + public static final int LEVELDB_VALUE = 0; + /** + * LMDB = 1; + */ + public static final int LMDB_VALUE = 1; + + + public final int getNumber() { + return value; + } + + public static DB valueOf(int value) { + switch (value) { + case 0: return LEVELDB; + case 1: return LMDB; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DB> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DB findValueByNumber(int number) { + return DB.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.DataParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final DB[] VALUES = values(); + + public static DB 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 DB(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.DataParameter.DB) + } + + private int bitField0_; + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 4; + private int batchSize_; + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + public int getBatchSize() { + return batchSize_; + } + + public static final int RAND_SKIP_FIELD_NUMBER = 7; + private int randSkip_; + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * DEPRECATED. Each solver accesses a different subset of the database.
+     * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * DEPRECATED. Each solver accesses a different subset of the database.
+     * 
+ */ + public int getRandSkip() { + return randSkip_; + } + + public static final int BACKEND_FIELD_NUMBER = 8; + private int backend_; + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public boolean hasBackend() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public caffe.Caffe.DataParameter.DB getBackend() { + caffe.Caffe.DataParameter.DB result = caffe.Caffe.DataParameter.DB.valueOf(backend_); + return result == null ? caffe.Caffe.DataParameter.DB.LEVELDB : result; + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + public float getScale() { + return scale_; + } + + public static final int MEAN_FILE_FIELD_NUMBER = 3; + private volatile java.lang.Object meanFile_; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + 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()) { + meanFile_ = s; + } + return s; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CROP_SIZE_FIELD_NUMBER = 5; + private int cropSize_; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + public int getCropSize() { + return cropSize_; + } + + public static final int MIRROR_FIELD_NUMBER = 6; + private boolean mirror_; + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + public boolean getMirror() { + return mirror_; + } + + public static final int FORCE_ENCODED_COLOR_FIELD_NUMBER = 9; + private boolean forceEncodedColor_; + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+     * Force the encoded image to have 3 color channels
+     * 
+ */ + public boolean hasForceEncodedColor() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+     * Force the encoded image to have 3 color channels
+     * 
+ */ + public boolean getForceEncodedColor() { + return forceEncodedColor_; + } + + public static final int PREFETCH_FIELD_NUMBER = 10; + private int prefetch_; + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+     * Prefetch queue (Number of batches to prefetch to host memory, increase if
+     * data access bandwidth varies).
+     * 
+ */ + public boolean hasPrefetch() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+     * Prefetch queue (Number of batches to prefetch to host memory, increase if
+     * data access bandwidth varies).
+     * 
+ */ + public int getPrefetch() { + return prefetch_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(4, batchSize_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(5, cropSize_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(6, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(7, randSkip_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(8, backend_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBool(9, forceEncodedColor_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeUInt32(10, prefetch_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, batchSize_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, cropSize_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, randSkip_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, backend_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, forceEncodedColor_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, prefetch_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.DataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DataParameter 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.DataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.DataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.DataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.DataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.DataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.DataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.DataParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.DataParameter) + caffe.Caffe.DataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_DataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DataParameter.class, caffe.Caffe.DataParameter.Builder.class); + } + + // Construct using caffe.Caffe.DataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + batchSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + randSkip_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + backend_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000010); + meanFile_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + cropSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + mirror_ = false; + bitField0_ = (bitField0_ & ~0x00000080); + forceEncodedColor_ = false; + bitField0_ = (bitField0_ & ~0x00000100); + prefetch_ = 4; + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_DataParameter_descriptor; + } + + public caffe.Caffe.DataParameter getDefaultInstanceForType() { + return caffe.Caffe.DataParameter.getDefaultInstance(); + } + + public caffe.Caffe.DataParameter build() { + caffe.Caffe.DataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.DataParameter buildPartial() { + caffe.Caffe.DataParameter result = new caffe.Caffe.DataParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.randSkip_ = randSkip_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.backend_ = backend_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.meanFile_ = meanFile_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.cropSize_ = cropSize_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.mirror_ = mirror_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.forceEncodedColor_ = forceEncodedColor_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.prefetch_ = prefetch_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.DataParameter) { + return mergeFrom((caffe.Caffe.DataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.DataParameter other) { + if (other == caffe.Caffe.DataParameter.getDefaultInstance()) return this; + if (other.hasSource()) { + bitField0_ |= 0x00000001; + source_ = other.source_; + onChanged(); + } + if (other.hasBatchSize()) { + setBatchSize(other.getBatchSize()); + } + if (other.hasRandSkip()) { + setRandSkip(other.getRandSkip()); + } + if (other.hasBackend()) { + setBackend(other.getBackend()); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasMeanFile()) { + bitField0_ |= 0x00000020; + meanFile_ = other.meanFile_; + onChanged(); + } + if (other.hasCropSize()) { + setCropSize(other.getCropSize()); + } + if (other.hasMirror()) { + setMirror(other.getMirror()); + } + if (other.hasForceEncodedColor()) { + setForceEncodedColor(other.getForceEncodedColor()); + } + if (other.hasPrefetch()) { + setPrefetch(other.getPrefetch()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.DataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.DataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000001); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + + private int batchSize_ ; + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public int getBatchSize() { + return batchSize_; + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder setBatchSize(int value) { + bitField0_ |= 0x00000002; + batchSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000002); + batchSize_ = 0; + onChanged(); + return this; + } + + private int randSkip_ ; + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * DEPRECATED. Each solver accesses a different subset of the database.
+       * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * DEPRECATED. Each solver accesses a different subset of the database.
+       * 
+ */ + public int getRandSkip() { + return randSkip_; + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * DEPRECATED. Each solver accesses a different subset of the database.
+       * 
+ */ + public Builder setRandSkip(int value) { + bitField0_ |= 0x00000004; + randSkip_ = value; + onChanged(); + return this; + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * DEPRECATED. Each solver accesses a different subset of the database.
+       * 
+ */ + public Builder clearRandSkip() { + bitField0_ = (bitField0_ & ~0x00000004); + randSkip_ = 0; + onChanged(); + return this; + } + + private int backend_ = 0; + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public boolean hasBackend() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public caffe.Caffe.DataParameter.DB getBackend() { + caffe.Caffe.DataParameter.DB result = caffe.Caffe.DataParameter.DB.valueOf(backend_); + return result == null ? caffe.Caffe.DataParameter.DB.LEVELDB : result; + } + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public Builder setBackend(caffe.Caffe.DataParameter.DB value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + backend_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB]; + */ + public Builder clearBackend() { + bitField0_ = (bitField0_ & ~0x00000008); + backend_ = 0; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public Builder setScale(float value) { + bitField0_ |= 0x00000010; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000010); + scale_ = 1F; + onChanged(); + return this; + } + + private java.lang.Object meanFile_ = ""; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + meanFile_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + meanFile_ = value; + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder clearMeanFile() { + bitField0_ = (bitField0_ & ~0x00000020); + meanFile_ = getDefaultInstance().getMeanFile(); + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + meanFile_ = value; + onChanged(); + return this; + } + + private int cropSize_ ; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public int getCropSize() { + return cropSize_; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public Builder setCropSize(int value) { + bitField0_ |= 0x00000040; + cropSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public Builder clearCropSize() { + bitField0_ = (bitField0_ & ~0x00000040); + cropSize_ = 0; + onChanged(); + return this; + } + + private boolean mirror_ ; + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public boolean getMirror() { + return mirror_; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public Builder setMirror(boolean value) { + bitField0_ |= 0x00000080; + mirror_ = value; + onChanged(); + return this; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public Builder clearMirror() { + bitField0_ = (bitField0_ & ~0x00000080); + mirror_ = false; + onChanged(); + return this; + } + + private boolean forceEncodedColor_ ; + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+       * Force the encoded image to have 3 color channels
+       * 
+ */ + public boolean hasForceEncodedColor() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+       * Force the encoded image to have 3 color channels
+       * 
+ */ + public boolean getForceEncodedColor() { + return forceEncodedColor_; + } + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+       * Force the encoded image to have 3 color channels
+       * 
+ */ + public Builder setForceEncodedColor(boolean value) { + bitField0_ |= 0x00000100; + forceEncodedColor_ = value; + onChanged(); + return this; + } + /** + * optional bool force_encoded_color = 9 [default = false]; + * + *
+       * Force the encoded image to have 3 color channels
+       * 
+ */ + public Builder clearForceEncodedColor() { + bitField0_ = (bitField0_ & ~0x00000100); + forceEncodedColor_ = false; + onChanged(); + return this; + } + + private int prefetch_ = 4; + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+       * Prefetch queue (Number of batches to prefetch to host memory, increase if
+       * data access bandwidth varies).
+       * 
+ */ + public boolean hasPrefetch() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+       * Prefetch queue (Number of batches to prefetch to host memory, increase if
+       * data access bandwidth varies).
+       * 
+ */ + public int getPrefetch() { + return prefetch_; + } + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+       * Prefetch queue (Number of batches to prefetch to host memory, increase if
+       * data access bandwidth varies).
+       * 
+ */ + public Builder setPrefetch(int value) { + bitField0_ |= 0x00000200; + prefetch_ = value; + onChanged(); + return this; + } + /** + * optional uint32 prefetch = 10 [default = 4]; + * + *
+       * Prefetch queue (Number of batches to prefetch to host memory, increase if
+       * data access bandwidth varies).
+       * 
+ */ + public Builder clearPrefetch() { + bitField0_ = (bitField0_ & ~0x00000200); + prefetch_ = 4; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.DataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.DataParameter) + private static final caffe.Caffe.DataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.DataParameter(); + } + + public static caffe.Caffe.DataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.DataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DropoutParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.DropoutParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + boolean hasDropoutRatio(); + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + float getDropoutRatio(); + } + /** + * Protobuf type {@code caffe.DropoutParameter} + */ + public static final class DropoutParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.DropoutParameter) + DropoutParameterOrBuilder { + // Use DropoutParameter.newBuilder() to construct. + private DropoutParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DropoutParameter() { + dropoutRatio_ = 0.5F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DropoutParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + dropoutRatio_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_DropoutParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DropoutParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DropoutParameter.class, caffe.Caffe.DropoutParameter.Builder.class); + } + + private int bitField0_; + public static final int DROPOUT_RATIO_FIELD_NUMBER = 1; + private float dropoutRatio_; + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + public boolean hasDropoutRatio() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + public float getDropoutRatio() { + return dropoutRatio_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, dropoutRatio_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, dropoutRatio_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.DropoutParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DropoutParameter 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.DropoutParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DropoutParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.DropoutParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DropoutParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.DropoutParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.DropoutParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.DropoutParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DropoutParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.DropoutParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.DropoutParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.DropoutParameter) + caffe.Caffe.DropoutParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_DropoutParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DropoutParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DropoutParameter.class, caffe.Caffe.DropoutParameter.Builder.class); + } + + // Construct using caffe.Caffe.DropoutParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + dropoutRatio_ = 0.5F; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_DropoutParameter_descriptor; + } + + public caffe.Caffe.DropoutParameter getDefaultInstanceForType() { + return caffe.Caffe.DropoutParameter.getDefaultInstance(); + } + + public caffe.Caffe.DropoutParameter build() { + caffe.Caffe.DropoutParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.DropoutParameter buildPartial() { + caffe.Caffe.DropoutParameter result = new caffe.Caffe.DropoutParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.dropoutRatio_ = dropoutRatio_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.DropoutParameter) { + return mergeFrom((caffe.Caffe.DropoutParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.DropoutParameter other) { + if (other == caffe.Caffe.DropoutParameter.getDefaultInstance()) return this; + if (other.hasDropoutRatio()) { + setDropoutRatio(other.getDropoutRatio()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.DropoutParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.DropoutParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float dropoutRatio_ = 0.5F; + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public boolean hasDropoutRatio() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public float getDropoutRatio() { + return dropoutRatio_; + } + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public Builder setDropoutRatio(float value) { + bitField0_ |= 0x00000001; + dropoutRatio_ = value; + onChanged(); + return this; + } + /** + * optional float dropout_ratio = 1 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public Builder clearDropoutRatio() { + bitField0_ = (bitField0_ & ~0x00000001); + dropoutRatio_ = 0.5F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.DropoutParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.DropoutParameter) + private static final caffe.Caffe.DropoutParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.DropoutParameter(); + } + + public static caffe.Caffe.DropoutParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DropoutParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DropoutParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.DropoutParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DummyDataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.DummyDataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + java.util.List + getDataFillerList(); + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + caffe.Caffe.FillerParameter getDataFiller(int index); + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + int getDataFillerCount(); + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + java.util.List + getDataFillerOrBuilderList(); + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( + int index); + + /** + * repeated .caffe.BlobShape shape = 6; + */ + java.util.List + getShapeList(); + /** + * repeated .caffe.BlobShape shape = 6; + */ + caffe.Caffe.BlobShape getShape(int index); + /** + * repeated .caffe.BlobShape shape = 6; + */ + int getShapeCount(); + /** + * repeated .caffe.BlobShape shape = 6; + */ + java.util.List + getShapeOrBuilderList(); + /** + * repeated .caffe.BlobShape shape = 6; + */ + caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index); + + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + java.util.List getNumList(); + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + int getNumCount(); + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + int getNum(int index); + + /** + * repeated uint32 channels = 3; + */ + java.util.List getChannelsList(); + /** + * repeated uint32 channels = 3; + */ + int getChannelsCount(); + /** + * repeated uint32 channels = 3; + */ + int getChannels(int index); + + /** + * repeated uint32 height = 4; + */ + java.util.List getHeightList(); + /** + * repeated uint32 height = 4; + */ + int getHeightCount(); + /** + * repeated uint32 height = 4; + */ + int getHeight(int index); + + /** + * repeated uint32 width = 5; + */ + java.util.List getWidthList(); + /** + * repeated uint32 width = 5; + */ + int getWidthCount(); + /** + * repeated uint32 width = 5; + */ + int getWidth(int index); + } + /** + * Protobuf type {@code caffe.DummyDataParameter} + * + *
+   * DummyDataLayer fills any number of arbitrarily shaped blobs with random
+   * (or constant) data generated by "Fillers" (see "message FillerParameter").
+   * 
+ */ + public static final class DummyDataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.DummyDataParameter) + DummyDataParameterOrBuilder { + // Use DummyDataParameter.newBuilder() to construct. + private DummyDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DummyDataParameter() { + dataFiller_ = java.util.Collections.emptyList(); + shape_ = java.util.Collections.emptyList(); + num_ = java.util.Collections.emptyList(); + channels_ = java.util.Collections.emptyList(); + height_ = java.util.Collections.emptyList(); + width_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DummyDataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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)) { + dataFiller_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dataFiller_.add(input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry)); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + num_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + num_.add(input.readUInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { + num_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + num_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + channels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + channels_.add(input.readUInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { + channels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + channels_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + height_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + height_.add(input.readUInt32()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { + height_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + while (input.getBytesUntilLimit() > 0) { + height_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 40: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + width_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + width_.add(input.readUInt32()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + width_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + width_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + shape_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + shape_.add(input.readMessage(caffe.Caffe.BlobShape.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + dataFiller_ = java.util.Collections.unmodifiableList(dataFiller_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + num_ = java.util.Collections.unmodifiableList(num_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + channels_ = java.util.Collections.unmodifiableList(channels_); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + height_ = java.util.Collections.unmodifiableList(height_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + width_ = java.util.Collections.unmodifiableList(width_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DummyDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DummyDataParameter.class, caffe.Caffe.DummyDataParameter.Builder.class); + } + + public static final int DATA_FILLER_FIELD_NUMBER = 1; + private java.util.List dataFiller_; + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + public java.util.List getDataFillerList() { + return dataFiller_; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + public java.util.List + getDataFillerOrBuilderList() { + return dataFiller_; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + public int getDataFillerCount() { + return dataFiller_.size(); + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + public caffe.Caffe.FillerParameter getDataFiller(int index) { + return dataFiller_.get(index); + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+     * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+     * shape fields, and 0, 1 or N data_fillers.
+     * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+     * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+     * specified, the ith is applied to the ith top blob.
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( + int index) { + return dataFiller_.get(index); + } + + public static final int SHAPE_FIELD_NUMBER = 6; + private java.util.List shape_; + /** + * repeated .caffe.BlobShape shape = 6; + */ + public java.util.List getShapeList() { + return shape_; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public java.util.List + getShapeOrBuilderList() { + return shape_; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShape getShape(int index) { + return shape_.get(index); + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index) { + return shape_.get(index); + } + + public static final int NUM_FIELD_NUMBER = 2; + private java.util.List num_; + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + public java.util.List + getNumList() { + return num_; + } + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + public int getNumCount() { + return num_.size(); + } + /** + * repeated uint32 num = 2; + * + *
+     * 4D dimensions -- deprecated.  Use "shape" instead.
+     * 
+ */ + public int getNum(int index) { + return num_.get(index); + } + + public static final int CHANNELS_FIELD_NUMBER = 3; + private java.util.List channels_; + /** + * repeated uint32 channels = 3; + */ + public java.util.List + getChannelsList() { + return channels_; + } + /** + * repeated uint32 channels = 3; + */ + public int getChannelsCount() { + return channels_.size(); + } + /** + * repeated uint32 channels = 3; + */ + public int getChannels(int index) { + return channels_.get(index); + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private java.util.List height_; + /** + * repeated uint32 height = 4; + */ + public java.util.List + getHeightList() { + return height_; + } + /** + * repeated uint32 height = 4; + */ + public int getHeightCount() { + return height_.size(); + } + /** + * repeated uint32 height = 4; + */ + public int getHeight(int index) { + return height_.get(index); + } + + public static final int WIDTH_FIELD_NUMBER = 5; + private java.util.List width_; + /** + * repeated uint32 width = 5; + */ + public java.util.List + getWidthList() { + return width_; + } + /** + * repeated uint32 width = 5; + */ + public int getWidthCount() { + return width_.size(); + } + /** + * repeated uint32 width = 5; + */ + public int getWidth(int index) { + return width_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < dataFiller_.size(); i++) { + output.writeMessage(1, dataFiller_.get(i)); + } + for (int i = 0; i < num_.size(); i++) { + output.writeUInt32(2, num_.get(i)); + } + for (int i = 0; i < channels_.size(); i++) { + output.writeUInt32(3, channels_.get(i)); + } + for (int i = 0; i < height_.size(); i++) { + output.writeUInt32(4, height_.get(i)); + } + for (int i = 0; i < width_.size(); i++) { + output.writeUInt32(5, width_.get(i)); + } + for (int i = 0; i < shape_.size(); i++) { + output.writeMessage(6, shape_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataFiller_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, dataFiller_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < num_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(num_.get(i)); + } + size += dataSize; + size += 1 * getNumList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < channels_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(channels_.get(i)); + } + size += dataSize; + size += 1 * getChannelsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < height_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(height_.get(i)); + } + size += dataSize; + size += 1 * getHeightList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < width_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(width_.get(i)); + } + size += dataSize; + size += 1 * getWidthList().size(); + } + for (int i = 0; i < shape_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, shape_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.DummyDataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DummyDataParameter 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.DummyDataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.DummyDataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.DummyDataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DummyDataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.DummyDataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.DummyDataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.DummyDataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.DummyDataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.DummyDataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.DummyDataParameter} + * + *
+     * DummyDataLayer fills any number of arbitrarily shaped blobs with random
+     * (or constant) data generated by "Fillers" (see "message FillerParameter").
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.DummyDataParameter) + caffe.Caffe.DummyDataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_DummyDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.DummyDataParameter.class, caffe.Caffe.DummyDataParameter.Builder.class); + } + + // Construct using caffe.Caffe.DummyDataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDataFillerFieldBuilder(); + getShapeFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (dataFillerBuilder_ == null) { + dataFiller_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataFillerBuilder_.clear(); + } + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + shapeBuilder_.clear(); + } + num_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + channels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + height_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + width_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_DummyDataParameter_descriptor; + } + + public caffe.Caffe.DummyDataParameter getDefaultInstanceForType() { + return caffe.Caffe.DummyDataParameter.getDefaultInstance(); + } + + public caffe.Caffe.DummyDataParameter build() { + caffe.Caffe.DummyDataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.DummyDataParameter buildPartial() { + caffe.Caffe.DummyDataParameter result = new caffe.Caffe.DummyDataParameter(this); + int from_bitField0_ = bitField0_; + if (dataFillerBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + dataFiller_ = java.util.Collections.unmodifiableList(dataFiller_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataFiller_ = dataFiller_; + } else { + result.dataFiller_ = dataFillerBuilder_.build(); + } + if (shapeBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + num_ = java.util.Collections.unmodifiableList(num_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.num_ = num_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + channels_ = java.util.Collections.unmodifiableList(channels_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.channels_ = channels_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + height_ = java.util.Collections.unmodifiableList(height_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.height_ = height_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + width_ = java.util.Collections.unmodifiableList(width_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.width_ = width_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.DummyDataParameter) { + return mergeFrom((caffe.Caffe.DummyDataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.DummyDataParameter other) { + if (other == caffe.Caffe.DummyDataParameter.getDefaultInstance()) return this; + if (dataFillerBuilder_ == null) { + if (!other.dataFiller_.isEmpty()) { + if (dataFiller_.isEmpty()) { + dataFiller_ = other.dataFiller_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataFillerIsMutable(); + dataFiller_.addAll(other.dataFiller_); + } + onChanged(); + } + } else { + if (!other.dataFiller_.isEmpty()) { + if (dataFillerBuilder_.isEmpty()) { + dataFillerBuilder_.dispose(); + dataFillerBuilder_ = null; + dataFiller_ = other.dataFiller_; + bitField0_ = (bitField0_ & ~0x00000001); + dataFillerBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDataFillerFieldBuilder() : null; + } else { + dataFillerBuilder_.addAllMessages(other.dataFiller_); + } + } + } + if (shapeBuilder_ == null) { + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + } else { + if (!other.shape_.isEmpty()) { + if (shapeBuilder_.isEmpty()) { + shapeBuilder_.dispose(); + shapeBuilder_ = null; + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000002); + shapeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getShapeFieldBuilder() : null; + } else { + shapeBuilder_.addAllMessages(other.shape_); + } + } + } + if (!other.num_.isEmpty()) { + if (num_.isEmpty()) { + num_ = other.num_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNumIsMutable(); + num_.addAll(other.num_); + } + onChanged(); + } + if (!other.channels_.isEmpty()) { + if (channels_.isEmpty()) { + channels_ = other.channels_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureChannelsIsMutable(); + channels_.addAll(other.channels_); + } + onChanged(); + } + if (!other.height_.isEmpty()) { + if (height_.isEmpty()) { + height_ = other.height_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureHeightIsMutable(); + height_.addAll(other.height_); + } + onChanged(); + } + if (!other.width_.isEmpty()) { + if (width_.isEmpty()) { + width_ = other.width_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureWidthIsMutable(); + width_.addAll(other.width_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.DummyDataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.DummyDataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List dataFiller_ = + java.util.Collections.emptyList(); + private void ensureDataFillerIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + dataFiller_ = new java.util.ArrayList(dataFiller_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> dataFillerBuilder_; + + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public java.util.List getDataFillerList() { + if (dataFillerBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataFiller_); + } else { + return dataFillerBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public int getDataFillerCount() { + if (dataFillerBuilder_ == null) { + return dataFiller_.size(); + } else { + return dataFillerBuilder_.getCount(); + } + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public caffe.Caffe.FillerParameter getDataFiller(int index) { + if (dataFillerBuilder_ == null) { + return dataFiller_.get(index); + } else { + return dataFillerBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder setDataFiller( + int index, caffe.Caffe.FillerParameter value) { + if (dataFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataFillerIsMutable(); + dataFiller_.set(index, value); + onChanged(); + } else { + dataFillerBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder setDataFiller( + int index, caffe.Caffe.FillerParameter.Builder builderForValue) { + if (dataFillerBuilder_ == null) { + ensureDataFillerIsMutable(); + dataFiller_.set(index, builderForValue.build()); + onChanged(); + } else { + dataFillerBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder addDataFiller(caffe.Caffe.FillerParameter value) { + if (dataFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataFillerIsMutable(); + dataFiller_.add(value); + onChanged(); + } else { + dataFillerBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder addDataFiller( + int index, caffe.Caffe.FillerParameter value) { + if (dataFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataFillerIsMutable(); + dataFiller_.add(index, value); + onChanged(); + } else { + dataFillerBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder addDataFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (dataFillerBuilder_ == null) { + ensureDataFillerIsMutable(); + dataFiller_.add(builderForValue.build()); + onChanged(); + } else { + dataFillerBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder addDataFiller( + int index, caffe.Caffe.FillerParameter.Builder builderForValue) { + if (dataFillerBuilder_ == null) { + ensureDataFillerIsMutable(); + dataFiller_.add(index, builderForValue.build()); + onChanged(); + } else { + dataFillerBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder addAllDataFiller( + java.lang.Iterable values) { + if (dataFillerBuilder_ == null) { + ensureDataFillerIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dataFiller_); + onChanged(); + } else { + dataFillerBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder clearDataFiller() { + if (dataFillerBuilder_ == null) { + dataFiller_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataFillerBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public Builder removeDataFiller(int index) { + if (dataFillerBuilder_ == null) { + ensureDataFillerIsMutable(); + dataFiller_.remove(index); + onChanged(); + } else { + dataFillerBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getDataFillerBuilder( + int index) { + return getDataFillerFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getDataFillerOrBuilder( + int index) { + if (dataFillerBuilder_ == null) { + return dataFiller_.get(index); } else { + return dataFillerBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public java.util.List + getDataFillerOrBuilderList() { + if (dataFillerBuilder_ != null) { + return dataFillerBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataFiller_); + } + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder addDataFillerBuilder() { + return getDataFillerFieldBuilder().addBuilder( + caffe.Caffe.FillerParameter.getDefaultInstance()); + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder addDataFillerBuilder( + int index) { + return getDataFillerFieldBuilder().addBuilder( + index, caffe.Caffe.FillerParameter.getDefaultInstance()); + } + /** + * repeated .caffe.FillerParameter data_filler = 1; + * + *
+       * This layer produces N >= 1 top blobs.  DummyDataParameter must specify 1 or N
+       * shape fields, and 0, 1 or N data_fillers.
+       * If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
+       * If 1 data_filler is specified, it is applied to all top blobs.  If N are
+       * specified, the ith is applied to the ith top blob.
+       * 
+ */ + public java.util.List + getDataFillerBuilderList() { + return getDataFillerFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getDataFillerFieldBuilder() { + if (dataFillerBuilder_ == null) { + dataFillerBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + dataFiller_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + dataFiller_ = null; + } + return dataFillerBuilder_; + } + + private java.util.List shape_ = + java.util.Collections.emptyList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + shape_ = new java.util.ArrayList(shape_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_; + + /** + * repeated .caffe.BlobShape shape = 6; + */ + public java.util.List getShapeList() { + if (shapeBuilder_ == null) { + return java.util.Collections.unmodifiableList(shape_); + } else { + return shapeBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public int getShapeCount() { + if (shapeBuilder_ == null) { + return shape_.size(); + } else { + return shapeBuilder_.getCount(); + } + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShape getShape(int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); + } else { + return shapeBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder setShape( + int index, caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.set(index, value); + onChanged(); + } else { + shapeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder setShape( + int index, caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.set(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder addShape(caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.add(value); + onChanged(); + } else { + shapeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder addShape( + int index, caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.add(index, value); + onChanged(); + } else { + shapeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder addShape( + caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder addShape( + int index, caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder addAllShape( + java.lang.Iterable values) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + } else { + shapeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + shapeBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public Builder removeShape(int index) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.remove(index); + onChanged(); + } else { + shapeBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShape.Builder getShapeBuilder( + int index) { + return getShapeFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); } else { + return shapeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public java.util.List + getShapeOrBuilderList() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shape_); + } + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShape.Builder addShapeBuilder() { + return getShapeFieldBuilder().addBuilder( + caffe.Caffe.BlobShape.getDefaultInstance()); + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public caffe.Caffe.BlobShape.Builder addShapeBuilder( + int index) { + return getShapeFieldBuilder().addBuilder( + index, caffe.Caffe.BlobShape.getDefaultInstance()); + } + /** + * repeated .caffe.BlobShape shape = 6; + */ + public java.util.List + getShapeBuilderList() { + return getShapeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>( + shape_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private java.util.List num_ = java.util.Collections.emptyList(); + private void ensureNumIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + num_ = new java.util.ArrayList(num_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public java.util.List + getNumList() { + return java.util.Collections.unmodifiableList(num_); + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public int getNumCount() { + return num_.size(); + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public int getNum(int index) { + return num_.get(index); + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public Builder setNum( + int index, int value) { + ensureNumIsMutable(); + num_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public Builder addNum(int value) { + ensureNumIsMutable(); + num_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public Builder addAllNum( + java.lang.Iterable values) { + ensureNumIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, num_); + onChanged(); + return this; + } + /** + * repeated uint32 num = 2; + * + *
+       * 4D dimensions -- deprecated.  Use "shape" instead.
+       * 
+ */ + public Builder clearNum() { + num_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private java.util.List channels_ = java.util.Collections.emptyList(); + private void ensureChannelsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + channels_ = new java.util.ArrayList(channels_); + bitField0_ |= 0x00000008; + } + } + /** + * repeated uint32 channels = 3; + */ + public java.util.List + getChannelsList() { + return java.util.Collections.unmodifiableList(channels_); + } + /** + * repeated uint32 channels = 3; + */ + public int getChannelsCount() { + return channels_.size(); + } + /** + * repeated uint32 channels = 3; + */ + public int getChannels(int index) { + return channels_.get(index); + } + /** + * repeated uint32 channels = 3; + */ + public Builder setChannels( + int index, int value) { + ensureChannelsIsMutable(); + channels_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 channels = 3; + */ + public Builder addChannels(int value) { + ensureChannelsIsMutable(); + channels_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 channels = 3; + */ + public Builder addAllChannels( + java.lang.Iterable values) { + ensureChannelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, channels_); + onChanged(); + return this; + } + /** + * repeated uint32 channels = 3; + */ + public Builder clearChannels() { + channels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private java.util.List height_ = java.util.Collections.emptyList(); + private void ensureHeightIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + height_ = new java.util.ArrayList(height_); + bitField0_ |= 0x00000010; + } + } + /** + * repeated uint32 height = 4; + */ + public java.util.List + getHeightList() { + return java.util.Collections.unmodifiableList(height_); + } + /** + * repeated uint32 height = 4; + */ + public int getHeightCount() { + return height_.size(); + } + /** + * repeated uint32 height = 4; + */ + public int getHeight(int index) { + return height_.get(index); + } + /** + * repeated uint32 height = 4; + */ + public Builder setHeight( + int index, int value) { + ensureHeightIsMutable(); + height_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 height = 4; + */ + public Builder addHeight(int value) { + ensureHeightIsMutable(); + height_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 height = 4; + */ + public Builder addAllHeight( + java.lang.Iterable values) { + ensureHeightIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, height_); + onChanged(); + return this; + } + /** + * repeated uint32 height = 4; + */ + public Builder clearHeight() { + height_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private java.util.List width_ = java.util.Collections.emptyList(); + private void ensureWidthIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + width_ = new java.util.ArrayList(width_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated uint32 width = 5; + */ + public java.util.List + getWidthList() { + return java.util.Collections.unmodifiableList(width_); + } + /** + * repeated uint32 width = 5; + */ + public int getWidthCount() { + return width_.size(); + } + /** + * repeated uint32 width = 5; + */ + public int getWidth(int index) { + return width_.get(index); + } + /** + * repeated uint32 width = 5; + */ + public Builder setWidth( + int index, int value) { + ensureWidthIsMutable(); + width_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 width = 5; + */ + public Builder addWidth(int value) { + ensureWidthIsMutable(); + width_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 width = 5; + */ + public Builder addAllWidth( + java.lang.Iterable values) { + ensureWidthIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, width_); + onChanged(); + return this; + } + /** + * repeated uint32 width = 5; + */ + public Builder clearWidth() { + width_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.DummyDataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.DummyDataParameter) + private static final caffe.Caffe.DummyDataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.DummyDataParameter(); + } + + public static caffe.Caffe.DummyDataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DummyDataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DummyDataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.DummyDataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EltwiseParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.EltwiseParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+     * element-wise operation
+     * 
+ */ + boolean hasOperation(); + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+     * element-wise operation
+     * 
+ */ + caffe.Caffe.EltwiseParameter.EltwiseOp getOperation(); + + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + java.util.List getCoeffList(); + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + int getCoeffCount(); + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + float getCoeff(int index); + + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+     * of computing the gradient for the PROD operation. (No effect for SUM op.)
+     * 
+ */ + boolean hasStableProdGrad(); + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+     * of computing the gradient for the PROD operation. (No effect for SUM op.)
+     * 
+ */ + boolean getStableProdGrad(); + } + /** + * Protobuf type {@code caffe.EltwiseParameter} + */ + public static final class EltwiseParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.EltwiseParameter) + EltwiseParameterOrBuilder { + // Use EltwiseParameter.newBuilder() to construct. + private EltwiseParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EltwiseParameter() { + operation_ = 1; + coeff_ = java.util.Collections.emptyList(); + stableProdGrad_ = true; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EltwiseParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.EltwiseParameter.EltwiseOp value = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + operation_ = rawValue; + } + break; + } + case 21: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + coeff_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + coeff_.add(input.readFloat()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { + coeff_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + coeff_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 24: { + bitField0_ |= 0x00000002; + stableProdGrad_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + coeff_ = java.util.Collections.unmodifiableList(coeff_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_EltwiseParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.EltwiseParameter.class, caffe.Caffe.EltwiseParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.EltwiseParameter.EltwiseOp} + */ + public enum EltwiseOp + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PROD = 0; + */ + PROD(0, 0), + /** + * SUM = 1; + */ + SUM(1, 1), + /** + * MAX = 2; + */ + MAX(2, 2), + ; + + /** + * PROD = 0; + */ + public static final int PROD_VALUE = 0; + /** + * SUM = 1; + */ + public static final int SUM_VALUE = 1; + /** + * MAX = 2; + */ + public static final int MAX_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static EltwiseOp valueOf(int value) { + switch (value) { + case 0: return PROD; + case 1: return SUM; + case 2: return MAX; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EltwiseOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EltwiseOp findValueByNumber(int number) { + return EltwiseOp.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.EltwiseParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final EltwiseOp[] VALUES = values(); + + public static EltwiseOp 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 EltwiseOp(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.EltwiseParameter.EltwiseOp) + } + + private int bitField0_; + public static final int OPERATION_FIELD_NUMBER = 1; + private int operation_; + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+     * element-wise operation
+     * 
+ */ + public boolean hasOperation() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+     * element-wise operation
+     * 
+ */ + public caffe.Caffe.EltwiseParameter.EltwiseOp getOperation() { + caffe.Caffe.EltwiseParameter.EltwiseOp result = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(operation_); + return result == null ? caffe.Caffe.EltwiseParameter.EltwiseOp.SUM : result; + } + + public static final int COEFF_FIELD_NUMBER = 2; + private java.util.List coeff_; + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + public java.util.List + getCoeffList() { + return coeff_; + } + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + public int getCoeffCount() { + return coeff_.size(); + } + /** + * repeated float coeff = 2; + * + *
+     * blob-wise coefficient for SUM operation
+     * 
+ */ + public float getCoeff(int index) { + return coeff_.get(index); + } + + public static final int STABLE_PROD_GRAD_FIELD_NUMBER = 3; + private boolean stableProdGrad_; + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+     * of computing the gradient for the PROD operation. (No effect for SUM op.)
+     * 
+ */ + public boolean hasStableProdGrad() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+     * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+     * of computing the gradient for the PROD operation. (No effect for SUM op.)
+     * 
+ */ + public boolean getStableProdGrad() { + return stableProdGrad_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, operation_); + } + for (int i = 0; i < coeff_.size(); i++) { + output.writeFloat(2, coeff_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(3, stableProdGrad_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, operation_); + } + { + int dataSize = 0; + dataSize = 4 * getCoeffList().size(); + size += dataSize; + size += 1 * getCoeffList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, stableProdGrad_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.EltwiseParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.EltwiseParameter 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.EltwiseParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.EltwiseParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.EltwiseParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.EltwiseParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.EltwiseParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.EltwiseParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.EltwiseParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.EltwiseParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.EltwiseParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.EltwiseParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.EltwiseParameter) + caffe.Caffe.EltwiseParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_EltwiseParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.EltwiseParameter.class, caffe.Caffe.EltwiseParameter.Builder.class); + } + + // Construct using caffe.Caffe.EltwiseParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + operation_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + coeff_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + stableProdGrad_ = true; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_EltwiseParameter_descriptor; + } + + public caffe.Caffe.EltwiseParameter getDefaultInstanceForType() { + return caffe.Caffe.EltwiseParameter.getDefaultInstance(); + } + + public caffe.Caffe.EltwiseParameter build() { + caffe.Caffe.EltwiseParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.EltwiseParameter buildPartial() { + caffe.Caffe.EltwiseParameter result = new caffe.Caffe.EltwiseParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.operation_ = operation_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + coeff_ = java.util.Collections.unmodifiableList(coeff_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.coeff_ = coeff_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.stableProdGrad_ = stableProdGrad_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.EltwiseParameter) { + return mergeFrom((caffe.Caffe.EltwiseParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.EltwiseParameter other) { + if (other == caffe.Caffe.EltwiseParameter.getDefaultInstance()) return this; + if (other.hasOperation()) { + setOperation(other.getOperation()); + } + if (!other.coeff_.isEmpty()) { + if (coeff_.isEmpty()) { + coeff_ = other.coeff_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCoeffIsMutable(); + coeff_.addAll(other.coeff_); + } + onChanged(); + } + if (other.hasStableProdGrad()) { + setStableProdGrad(other.getStableProdGrad()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.EltwiseParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.EltwiseParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int operation_ = 1; + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+       * element-wise operation
+       * 
+ */ + public boolean hasOperation() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+       * element-wise operation
+       * 
+ */ + public caffe.Caffe.EltwiseParameter.EltwiseOp getOperation() { + caffe.Caffe.EltwiseParameter.EltwiseOp result = caffe.Caffe.EltwiseParameter.EltwiseOp.valueOf(operation_); + return result == null ? caffe.Caffe.EltwiseParameter.EltwiseOp.SUM : result; + } + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+       * element-wise operation
+       * 
+ */ + public Builder setOperation(caffe.Caffe.EltwiseParameter.EltwiseOp value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM]; + * + *
+       * element-wise operation
+       * 
+ */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000001); + operation_ = 1; + onChanged(); + return this; + } + + private java.util.List coeff_ = java.util.Collections.emptyList(); + private void ensureCoeffIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + coeff_ = new java.util.ArrayList(coeff_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public java.util.List + getCoeffList() { + return java.util.Collections.unmodifiableList(coeff_); + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public int getCoeffCount() { + return coeff_.size(); + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public float getCoeff(int index) { + return coeff_.get(index); + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public Builder setCoeff( + int index, float value) { + ensureCoeffIsMutable(); + coeff_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public Builder addCoeff(float value) { + ensureCoeffIsMutable(); + coeff_.add(value); + onChanged(); + return this; + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public Builder addAllCoeff( + java.lang.Iterable values) { + ensureCoeffIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, coeff_); + onChanged(); + return this; + } + /** + * repeated float coeff = 2; + * + *
+       * blob-wise coefficient for SUM operation
+       * 
+ */ + public Builder clearCoeff() { + coeff_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private boolean stableProdGrad_ = true; + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+       * of computing the gradient for the PROD operation. (No effect for SUM op.)
+       * 
+ */ + public boolean hasStableProdGrad() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+       * of computing the gradient for the PROD operation. (No effect for SUM op.)
+       * 
+ */ + public boolean getStableProdGrad() { + return stableProdGrad_; + } + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+       * of computing the gradient for the PROD operation. (No effect for SUM op.)
+       * 
+ */ + public Builder setStableProdGrad(boolean value) { + bitField0_ |= 0x00000004; + stableProdGrad_ = value; + onChanged(); + return this; + } + /** + * optional bool stable_prod_grad = 3 [default = true]; + * + *
+       * Whether to use an asymptotically slower (for >2 inputs) but stabler method
+       * of computing the gradient for the PROD operation. (No effect for SUM op.)
+       * 
+ */ + public Builder clearStableProdGrad() { + bitField0_ = (bitField0_ & ~0x00000004); + stableProdGrad_ = true; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.EltwiseParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.EltwiseParameter) + private static final caffe.Caffe.EltwiseParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.EltwiseParameter(); + } + + public static caffe.Caffe.EltwiseParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public EltwiseParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new EltwiseParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.EltwiseParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ELUParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ELUParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float alpha = 1 [default = 1]; + * + *
+     * Described in:
+     * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+     * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+     * 
+ */ + boolean hasAlpha(); + /** + * optional float alpha = 1 [default = 1]; + * + *
+     * Described in:
+     * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+     * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+     * 
+ */ + float getAlpha(); + } + /** + * Protobuf type {@code caffe.ELUParameter} + * + *
+   * Message that stores parameters used by ELULayer
+   * 
+ */ + public static final class ELUParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ELUParameter) + ELUParameterOrBuilder { + // Use ELUParameter.newBuilder() to construct. + private ELUParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ELUParameter() { + alpha_ = 1F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ELUParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + alpha_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ELUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ELUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ELUParameter.class, caffe.Caffe.ELUParameter.Builder.class); + } + + private int bitField0_; + public static final int ALPHA_FIELD_NUMBER = 1; + private float alpha_; + /** + * optional float alpha = 1 [default = 1]; + * + *
+     * Described in:
+     * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+     * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+     * 
+ */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float alpha = 1 [default = 1]; + * + *
+     * Described in:
+     * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+     * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+     * 
+ */ + public float getAlpha() { + return alpha_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, alpha_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, alpha_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ELUParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ELUParameter 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.ELUParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ELUParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ELUParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ELUParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ELUParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ELUParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ELUParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ELUParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ELUParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ELUParameter} + * + *
+     * Message that stores parameters used by ELULayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ELUParameter) + caffe.Caffe.ELUParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ELUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ELUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ELUParameter.class, caffe.Caffe.ELUParameter.Builder.class); + } + + // Construct using caffe.Caffe.ELUParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + alpha_ = 1F; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ELUParameter_descriptor; + } + + public caffe.Caffe.ELUParameter getDefaultInstanceForType() { + return caffe.Caffe.ELUParameter.getDefaultInstance(); + } + + public caffe.Caffe.ELUParameter build() { + caffe.Caffe.ELUParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ELUParameter buildPartial() { + caffe.Caffe.ELUParameter result = new caffe.Caffe.ELUParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.alpha_ = alpha_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ELUParameter) { + return mergeFrom((caffe.Caffe.ELUParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ELUParameter other) { + if (other == caffe.Caffe.ELUParameter.getDefaultInstance()) return this; + if (other.hasAlpha()) { + setAlpha(other.getAlpha()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ELUParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ELUParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float alpha_ = 1F; + /** + * optional float alpha = 1 [default = 1]; + * + *
+       * Described in:
+       * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+       * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+       * 
+ */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float alpha = 1 [default = 1]; + * + *
+       * Described in:
+       * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+       * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+       * 
+ */ + public float getAlpha() { + return alpha_; + } + /** + * optional float alpha = 1 [default = 1]; + * + *
+       * Described in:
+       * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+       * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+       * 
+ */ + public Builder setAlpha(float value) { + bitField0_ |= 0x00000001; + alpha_ = value; + onChanged(); + return this; + } + /** + * optional float alpha = 1 [default = 1]; + * + *
+       * Described in:
+       * Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
+       * Deep Network Learning by Exponential Linear Units (ELUs). arXiv
+       * 
+ */ + public Builder clearAlpha() { + bitField0_ = (bitField0_ & ~0x00000001); + alpha_ = 1F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ELUParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ELUParameter) + private static final caffe.Caffe.ELUParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ELUParameter(); + } + + public static caffe.Caffe.ELUParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ELUParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ELUParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ELUParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EmbedParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.EmbedParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + boolean hasNumOutput(); + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + int getNumOutput(); + + /** + * optional uint32 input_dim = 2; + * + *
+     * The input is given as integers to be interpreted as one-hot
+     * vector indices with dimension num_input.  Hence num_input should be
+     * 1 greater than the maximum possible input value.
+     * 
+ */ + boolean hasInputDim(); + /** + * optional uint32 input_dim = 2; + * + *
+     * The input is given as integers to be interpreted as one-hot
+     * vector indices with dimension num_input.  Hence num_input should be
+     * 1 greater than the maximum possible input value.
+     * 
+ */ + int getInputDim(); + + /** + * optional bool bias_term = 3 [default = true]; + * + *
+     * Whether to use a bias term
+     * 
+ */ + boolean hasBiasTerm(); + /** + * optional bool bias_term = 3 [default = true]; + * + *
+     * Whether to use a bias term
+     * 
+ */ + boolean getBiasTerm(); + + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + boolean hasWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameter getWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); + + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + boolean hasBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameter getBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); + } + /** + * Protobuf type {@code caffe.EmbedParameter} + * + *
+   * Message that stores parameters used by EmbedLayer
+   * 
+ */ + public static final class EmbedParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.EmbedParameter) + EmbedParameterOrBuilder { + // Use EmbedParameter.newBuilder() to construct. + private EmbedParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EmbedParameter() { + numOutput_ = 0; + inputDim_ = 0; + biasTerm_ = true; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EmbedParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + numOutput_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + inputDim_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + biasTerm_ = input.readBool(); + break; + } + case 34: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = weightFiller_.toBuilder(); + } + weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(weightFiller_); + weightFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 42: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = biasFiller_.toBuilder(); + } + biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(biasFiller_); + biasFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_EmbedParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_EmbedParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.EmbedParameter.class, caffe.Caffe.EmbedParameter.Builder.class); + } + + private int bitField0_; + public static final int NUM_OUTPUT_FIELD_NUMBER = 1; + private int numOutput_; + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public int getNumOutput() { + return numOutput_; + } + + public static final int INPUT_DIM_FIELD_NUMBER = 2; + private int inputDim_; + /** + * optional uint32 input_dim = 2; + * + *
+     * The input is given as integers to be interpreted as one-hot
+     * vector indices with dimension num_input.  Hence num_input should be
+     * 1 greater than the maximum possible input value.
+     * 
+ */ + public boolean hasInputDim() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 input_dim = 2; + * + *
+     * The input is given as integers to be interpreted as one-hot
+     * vector indices with dimension num_input.  Hence num_input should be
+     * 1 greater than the maximum possible input value.
+     * 
+ */ + public int getInputDim() { + return inputDim_; + } + + public static final int BIAS_TERM_FIELD_NUMBER = 3; + private boolean biasTerm_; + /** + * optional bool bias_term = 3 [default = true]; + * + *
+     * Whether to use a bias term
+     * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool bias_term = 3 [default = true]; + * + *
+     * Whether to use a bias term
+     * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + + public static final int WEIGHT_FILLER_FIELD_NUMBER = 4; + private caffe.Caffe.FillerParameter weightFiller_; + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + + public static final int BIAS_FILLER_FIELD_NUMBER = 5; + private caffe.Caffe.FillerParameter biasFiller_; + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, inputDim_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, biasTerm_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, getWeightFiller()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, getBiasFiller()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, inputDim_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, biasTerm_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getWeightFiller()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBiasFiller()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.EmbedParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.EmbedParameter 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.EmbedParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.EmbedParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.EmbedParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.EmbedParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.EmbedParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.EmbedParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.EmbedParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.EmbedParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.EmbedParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.EmbedParameter} + * + *
+     * Message that stores parameters used by EmbedLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.EmbedParameter) + caffe.Caffe.EmbedParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_EmbedParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_EmbedParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.EmbedParameter.class, caffe.Caffe.EmbedParameter.Builder.class); + } + + // Construct using caffe.Caffe.EmbedParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getWeightFillerFieldBuilder(); + getBiasFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + numOutput_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + inputDim_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + biasTerm_ = true; + bitField0_ = (bitField0_ & ~0x00000004); + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_EmbedParameter_descriptor; + } + + public caffe.Caffe.EmbedParameter getDefaultInstanceForType() { + return caffe.Caffe.EmbedParameter.getDefaultInstance(); + } + + public caffe.Caffe.EmbedParameter build() { + caffe.Caffe.EmbedParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.EmbedParameter buildPartial() { + caffe.Caffe.EmbedParameter result = new caffe.Caffe.EmbedParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.numOutput_ = numOutput_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.inputDim_ = inputDim_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.biasTerm_ = biasTerm_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (weightFillerBuilder_ == null) { + result.weightFiller_ = weightFiller_; + } else { + result.weightFiller_ = weightFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (biasFillerBuilder_ == null) { + result.biasFiller_ = biasFiller_; + } else { + result.biasFiller_ = biasFillerBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.EmbedParameter) { + return mergeFrom((caffe.Caffe.EmbedParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.EmbedParameter other) { + if (other == caffe.Caffe.EmbedParameter.getDefaultInstance()) return this; + if (other.hasNumOutput()) { + setNumOutput(other.getNumOutput()); + } + if (other.hasInputDim()) { + setInputDim(other.getInputDim()); + } + if (other.hasBiasTerm()) { + setBiasTerm(other.getBiasTerm()); + } + if (other.hasWeightFiller()) { + mergeWeightFiller(other.getWeightFiller()); + } + if (other.hasBiasFiller()) { + mergeBiasFiller(other.getBiasFiller()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.EmbedParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.EmbedParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int numOutput_ ; + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public int getNumOutput() { + return numOutput_; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder setNumOutput(int value) { + bitField0_ |= 0x00000001; + numOutput_ = value; + onChanged(); + return this; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder clearNumOutput() { + bitField0_ = (bitField0_ & ~0x00000001); + numOutput_ = 0; + onChanged(); + return this; + } + + private int inputDim_ ; + /** + * optional uint32 input_dim = 2; + * + *
+       * The input is given as integers to be interpreted as one-hot
+       * vector indices with dimension num_input.  Hence num_input should be
+       * 1 greater than the maximum possible input value.
+       * 
+ */ + public boolean hasInputDim() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 input_dim = 2; + * + *
+       * The input is given as integers to be interpreted as one-hot
+       * vector indices with dimension num_input.  Hence num_input should be
+       * 1 greater than the maximum possible input value.
+       * 
+ */ + public int getInputDim() { + return inputDim_; + } + /** + * optional uint32 input_dim = 2; + * + *
+       * The input is given as integers to be interpreted as one-hot
+       * vector indices with dimension num_input.  Hence num_input should be
+       * 1 greater than the maximum possible input value.
+       * 
+ */ + public Builder setInputDim(int value) { + bitField0_ |= 0x00000002; + inputDim_ = value; + onChanged(); + return this; + } + /** + * optional uint32 input_dim = 2; + * + *
+       * The input is given as integers to be interpreted as one-hot
+       * vector indices with dimension num_input.  Hence num_input should be
+       * 1 greater than the maximum possible input value.
+       * 
+ */ + public Builder clearInputDim() { + bitField0_ = (bitField0_ & ~0x00000002); + inputDim_ = 0; + onChanged(); + return this; + } + + private boolean biasTerm_ = true; + /** + * optional bool bias_term = 3 [default = true]; + * + *
+       * Whether to use a bias term
+       * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool bias_term = 3 [default = true]; + * + *
+       * Whether to use a bias term
+       * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + /** + * optional bool bias_term = 3 [default = true]; + * + *
+       * Whether to use a bias term
+       * 
+ */ + public Builder setBiasTerm(boolean value) { + bitField0_ |= 0x00000004; + biasTerm_ = value; + onChanged(); + return this; + } + /** + * optional bool bias_term = 3 [default = true]; + * + *
+       * Whether to use a bias term
+       * 
+ */ + public Builder clearBiasTerm() { + bitField0_ = (bitField0_ & ~0x00000004); + biasTerm_ = true; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter weightFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + if (weightFillerBuilder_ == null) { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } else { + return weightFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + weightFiller_ = value; + onChanged(); + } else { + weightFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (weightFillerBuilder_ == null) { + weightFiller_ = builderForValue.build(); + onChanged(); + } else { + weightFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + weightFiller_ != null && + weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + weightFiller_ = + caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); + } else { + weightFiller_ = value; + } + onChanged(); + } else { + weightFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder clearWeightFiller() { + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + onChanged(); + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWeightFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + if (weightFillerBuilder_ != null) { + return weightFillerBuilder_.getMessageOrBuilder(); + } else { + return weightFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + } + /** + * optional .caffe.FillerParameter weight_filler = 4; + * + *
+       * The filler for the weight
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getWeightFillerFieldBuilder() { + if (weightFillerBuilder_ == null) { + weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getWeightFiller(), + getParentForChildren(), + isClean()); + weightFiller_ = null; + } + return weightFillerBuilder_; + } + + private caffe.Caffe.FillerParameter biasFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + if (biasFillerBuilder_ == null) { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } else { + return biasFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasFiller_ = value; + onChanged(); + } else { + biasFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (biasFillerBuilder_ == null) { + biasFiller_ = builderForValue.build(); + onChanged(); + } else { + biasFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + biasFiller_ != null && + biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + biasFiller_ = + caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); + } else { + biasFiller_ = value; + } + onChanged(); + } else { + biasFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder clearBiasFiller() { + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + onChanged(); + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBiasFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + if (biasFillerBuilder_ != null) { + return biasFillerBuilder_.getMessageOrBuilder(); + } else { + return biasFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + * + *
+       * The filler for the bias
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getBiasFillerFieldBuilder() { + if (biasFillerBuilder_ == null) { + biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getBiasFiller(), + getParentForChildren(), + isClean()); + biasFiller_ = null; + } + return biasFillerBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.EmbedParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.EmbedParameter) + private static final caffe.Caffe.EmbedParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.EmbedParameter(); + } + + public static caffe.Caffe.EmbedParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public EmbedParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new EmbedParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.EmbedParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExpParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ExpParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float base = 1 [default = -1]; + * + *
+     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = exp(shift + scale * x).
+     * 
+ */ + boolean hasBase(); + /** + * optional float base = 1 [default = -1]; + * + *
+     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = exp(shift + scale * x).
+     * 
+ */ + float getBase(); + + /** + * optional float scale = 2 [default = 1]; + */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + */ + float getScale(); + + /** + * optional float shift = 3 [default = 0]; + */ + boolean hasShift(); + /** + * optional float shift = 3 [default = 0]; + */ + float getShift(); + } + /** + * Protobuf type {@code caffe.ExpParameter} + * + *
+   * Message that stores parameters used by ExpLayer
+   * 
+ */ + public static final class ExpParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ExpParameter) + ExpParameterOrBuilder { + // Use ExpParameter.newBuilder() to construct. + private ExpParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ExpParameter() { + base_ = -1F; + scale_ = 1F; + shift_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExpParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + base_ = input.readFloat(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + scale_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + shift_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ExpParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ExpParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ExpParameter.class, caffe.Caffe.ExpParameter.Builder.class); + } + + private int bitField0_; + public static final int BASE_FIELD_NUMBER = 1; + private float base_; + /** + * optional float base = 1 [default = -1]; + * + *
+     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = exp(shift + scale * x).
+     * 
+ */ + public boolean hasBase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float base = 1 [default = -1]; + * + *
+     * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = exp(shift + scale * x).
+     * 
+ */ + public float getBase() { + return base_; + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + + public static final int SHIFT_FIELD_NUMBER = 3; + private float shift_; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, base_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, shift_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, base_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, shift_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ExpParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ExpParameter 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.ExpParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ExpParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ExpParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ExpParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ExpParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ExpParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ExpParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ExpParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ExpParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ExpParameter} + * + *
+     * Message that stores parameters used by ExpLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ExpParameter) + caffe.Caffe.ExpParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ExpParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ExpParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ExpParameter.class, caffe.Caffe.ExpParameter.Builder.class); + } + + // Construct using caffe.Caffe.ExpParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + base_ = -1F; + bitField0_ = (bitField0_ & ~0x00000001); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000002); + shift_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ExpParameter_descriptor; + } + + public caffe.Caffe.ExpParameter getDefaultInstanceForType() { + return caffe.Caffe.ExpParameter.getDefaultInstance(); + } + + public caffe.Caffe.ExpParameter build() { + caffe.Caffe.ExpParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ExpParameter buildPartial() { + caffe.Caffe.ExpParameter result = new caffe.Caffe.ExpParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.base_ = base_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.shift_ = shift_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ExpParameter) { + return mergeFrom((caffe.Caffe.ExpParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ExpParameter other) { + if (other == caffe.Caffe.ExpParameter.getDefaultInstance()) return this; + if (other.hasBase()) { + setBase(other.getBase()); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasShift()) { + setShift(other.getShift()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ExpParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ExpParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float base_ = -1F; + /** + * optional float base = 1 [default = -1]; + * + *
+       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = exp(shift + scale * x).
+       * 
+ */ + public boolean hasBase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = exp(shift + scale * x).
+       * 
+ */ + public float getBase() { + return base_; + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = exp(shift + scale * x).
+       * 
+ */ + public Builder setBase(float value) { + bitField0_ |= 0x00000001; + base_ = value; + onChanged(); + return this; + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = exp(shift + scale * x).
+       * 
+ */ + public Builder clearBase() { + bitField0_ = (bitField0_ & ~0x00000001); + base_ = -1F; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder setScale(float value) { + bitField0_ |= 0x00000002; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000002); + scale_ = 1F; + onChanged(); + return this; + } + + private float shift_ ; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder setShift(float value) { + bitField0_ |= 0x00000004; + shift_ = value; + onChanged(); + return this; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder clearShift() { + bitField0_ = (bitField0_ & ~0x00000004); + shift_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ExpParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ExpParameter) + private static final caffe.Caffe.ExpParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ExpParameter(); + } + + public static caffe.Caffe.ExpParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ExpParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ExpParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ExpParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FlattenParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.FlattenParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis to flatten: all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis to flatten: all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + int getAxis(); + + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+     * The last axis to flatten: all following axes are retained in the output.
+     * May be negative to index from the end (e.g., the default -1 for the last
+     * axis).
+     * 
+ */ + boolean hasEndAxis(); + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+     * The last axis to flatten: all following axes are retained in the output.
+     * May be negative to index from the end (e.g., the default -1 for the last
+     * axis).
+     * 
+ */ + int getEndAxis(); + } + /** + * Protobuf type {@code caffe.FlattenParameter} + * + *
+   */ Message that stores parameters used by FlattenLayer
+   * 
+ */ + public static final class FlattenParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.FlattenParameter) + FlattenParameterOrBuilder { + // Use FlattenParameter.newBuilder() to construct. + private FlattenParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FlattenParameter() { + axis_ = 1; + endAxis_ = -1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FlattenParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + axis_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + endAxis_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_FlattenParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_FlattenParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.FlattenParameter.class, caffe.Caffe.FlattenParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 1; + private int axis_; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis to flatten: all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis to flatten: all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int END_AXIS_FIELD_NUMBER = 2; + private int endAxis_; + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+     * The last axis to flatten: all following axes are retained in the output.
+     * May be negative to index from the end (e.g., the default -1 for the last
+     * axis).
+     * 
+ */ + public boolean hasEndAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+     * The last axis to flatten: all following axes are retained in the output.
+     * May be negative to index from the end (e.g., the default -1 for the last
+     * axis).
+     * 
+ */ + public int getEndAxis() { + return endAxis_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, endAxis_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, endAxis_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.FlattenParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.FlattenParameter 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.FlattenParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.FlattenParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.FlattenParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.FlattenParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.FlattenParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.FlattenParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.FlattenParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.FlattenParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.FlattenParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.FlattenParameter} + * + *
+     */ Message that stores parameters used by FlattenLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.FlattenParameter) + caffe.Caffe.FlattenParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_FlattenParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_FlattenParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.FlattenParameter.class, caffe.Caffe.FlattenParameter.Builder.class); + } + + // Construct using caffe.Caffe.FlattenParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + endAxis_ = -1; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_FlattenParameter_descriptor; + } + + public caffe.Caffe.FlattenParameter getDefaultInstanceForType() { + return caffe.Caffe.FlattenParameter.getDefaultInstance(); + } + + public caffe.Caffe.FlattenParameter build() { + caffe.Caffe.FlattenParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.FlattenParameter buildPartial() { + caffe.Caffe.FlattenParameter result = new caffe.Caffe.FlattenParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.endAxis_ = endAxis_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.FlattenParameter) { + return mergeFrom((caffe.Caffe.FlattenParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.FlattenParameter other) { + if (other == caffe.Caffe.FlattenParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasEndAxis()) { + setEndAxis(other.getEndAxis()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.FlattenParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.FlattenParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis to flatten: all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis to flatten: all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis to flatten: all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis to flatten: all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private int endAxis_ = -1; + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+       * The last axis to flatten: all following axes are retained in the output.
+       * May be negative to index from the end (e.g., the default -1 for the last
+       * axis).
+       * 
+ */ + public boolean hasEndAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+       * The last axis to flatten: all following axes are retained in the output.
+       * May be negative to index from the end (e.g., the default -1 for the last
+       * axis).
+       * 
+ */ + public int getEndAxis() { + return endAxis_; + } + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+       * The last axis to flatten: all following axes are retained in the output.
+       * May be negative to index from the end (e.g., the default -1 for the last
+       * axis).
+       * 
+ */ + public Builder setEndAxis(int value) { + bitField0_ |= 0x00000002; + endAxis_ = value; + onChanged(); + return this; + } + /** + * optional int32 end_axis = 2 [default = -1]; + * + *
+       * The last axis to flatten: all following axes are retained in the output.
+       * May be negative to index from the end (e.g., the default -1 for the last
+       * axis).
+       * 
+ */ + public Builder clearEndAxis() { + bitField0_ = (bitField0_ & ~0x00000002); + endAxis_ = -1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.FlattenParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.FlattenParameter) + private static final caffe.Caffe.FlattenParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.FlattenParameter(); + } + + public static caffe.Caffe.FlattenParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FlattenParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FlattenParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.FlattenParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HDF5DataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.HDF5DataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + * optional uint32 batch_size = 2; + * + *
+     * Specify the batch size.
+     * 
+ */ + boolean hasBatchSize(); + /** + * optional uint32 batch_size = 2; + * + *
+     * Specify the batch size.
+     * 
+ */ + int getBatchSize(); + + /** + * optional bool shuffle = 3 [default = false]; + * + *
+     * Specify whether to shuffle the data.
+     * If shuffle == true, the ordering of the HDF5 files is shuffled,
+     * and the ordering of data within any given HDF5 file is shuffled,
+     * but data between different files are not interleaved; all of a file's
+     * data are output (in a random order) before moving onto another file.
+     * 
+ */ + boolean hasShuffle(); + /** + * optional bool shuffle = 3 [default = false]; + * + *
+     * Specify whether to shuffle the data.
+     * If shuffle == true, the ordering of the HDF5 files is shuffled,
+     * and the ordering of data within any given HDF5 file is shuffled,
+     * but data between different files are not interleaved; all of a file's
+     * data are output (in a random order) before moving onto another file.
+     * 
+ */ + boolean getShuffle(); + } + /** + * Protobuf type {@code caffe.HDF5DataParameter} + * + *
+   * Message that stores parameters used by HDF5DataLayer
+   * 
+ */ + public static final class HDF5DataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.HDF5DataParameter) + HDF5DataParameterOrBuilder { + // Use HDF5DataParameter.newBuilder() to construct. + private HDF5DataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HDF5DataParameter() { + source_ = ""; + batchSize_ = 0; + shuffle_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HDF5DataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + source_ = bs; + break; + } + case 16: { + bitField0_ |= 0x00000002; + batchSize_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + shuffle_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_HDF5DataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HDF5DataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HDF5DataParameter.class, caffe.Caffe.HDF5DataParameter.Builder.class); + } + + private int bitField0_; + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_; + /** + * optional uint32 batch_size = 2; + * + *
+     * Specify the batch size.
+     * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 2; + * + *
+     * Specify the batch size.
+     * 
+ */ + public int getBatchSize() { + return batchSize_; + } + + public static final int SHUFFLE_FIELD_NUMBER = 3; + private boolean shuffle_; + /** + * optional bool shuffle = 3 [default = false]; + * + *
+     * Specify whether to shuffle the data.
+     * If shuffle == true, the ordering of the HDF5 files is shuffled,
+     * and the ordering of data within any given HDF5 file is shuffled,
+     * but data between different files are not interleaved; all of a file's
+     * data are output (in a random order) before moving onto another file.
+     * 
+ */ + public boolean hasShuffle() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool shuffle = 3 [default = false]; + * + *
+     * Specify whether to shuffle the data.
+     * If shuffle == true, the ordering of the HDF5 files is shuffled,
+     * and the ordering of data within any given HDF5 file is shuffled,
+     * but data between different files are not interleaved; all of a file's
+     * data are output (in a random order) before moving onto another file.
+     * 
+ */ + public boolean getShuffle() { + return shuffle_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, batchSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, shuffle_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, batchSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, shuffle_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.HDF5DataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HDF5DataParameter 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.HDF5DataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HDF5DataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.HDF5DataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HDF5DataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.HDF5DataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.HDF5DataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.HDF5DataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HDF5DataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.HDF5DataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.HDF5DataParameter} + * + *
+     * Message that stores parameters used by HDF5DataLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.HDF5DataParameter) + caffe.Caffe.HDF5DataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_HDF5DataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HDF5DataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HDF5DataParameter.class, caffe.Caffe.HDF5DataParameter.Builder.class); + } + + // Construct using caffe.Caffe.HDF5DataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + batchSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + shuffle_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_HDF5DataParameter_descriptor; + } + + public caffe.Caffe.HDF5DataParameter getDefaultInstanceForType() { + return caffe.Caffe.HDF5DataParameter.getDefaultInstance(); + } + + public caffe.Caffe.HDF5DataParameter build() { + caffe.Caffe.HDF5DataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.HDF5DataParameter buildPartial() { + caffe.Caffe.HDF5DataParameter result = new caffe.Caffe.HDF5DataParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.shuffle_ = shuffle_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.HDF5DataParameter) { + return mergeFrom((caffe.Caffe.HDF5DataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.HDF5DataParameter other) { + if (other == caffe.Caffe.HDF5DataParameter.getDefaultInstance()) return this; + if (other.hasSource()) { + bitField0_ |= 0x00000001; + source_ = other.source_; + onChanged(); + } + if (other.hasBatchSize()) { + setBatchSize(other.getBatchSize()); + } + if (other.hasShuffle()) { + setShuffle(other.getShuffle()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.HDF5DataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.HDF5DataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000001); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + + private int batchSize_ ; + /** + * optional uint32 batch_size = 2; + * + *
+       * Specify the batch size.
+       * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 2; + * + *
+       * Specify the batch size.
+       * 
+ */ + public int getBatchSize() { + return batchSize_; + } + /** + * optional uint32 batch_size = 2; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder setBatchSize(int value) { + bitField0_ |= 0x00000002; + batchSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batch_size = 2; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000002); + batchSize_ = 0; + onChanged(); + return this; + } + + private boolean shuffle_ ; + /** + * optional bool shuffle = 3 [default = false]; + * + *
+       * Specify whether to shuffle the data.
+       * If shuffle == true, the ordering of the HDF5 files is shuffled,
+       * and the ordering of data within any given HDF5 file is shuffled,
+       * but data between different files are not interleaved; all of a file's
+       * data are output (in a random order) before moving onto another file.
+       * 
+ */ + public boolean hasShuffle() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool shuffle = 3 [default = false]; + * + *
+       * Specify whether to shuffle the data.
+       * If shuffle == true, the ordering of the HDF5 files is shuffled,
+       * and the ordering of data within any given HDF5 file is shuffled,
+       * but data between different files are not interleaved; all of a file's
+       * data are output (in a random order) before moving onto another file.
+       * 
+ */ + public boolean getShuffle() { + return shuffle_; + } + /** + * optional bool shuffle = 3 [default = false]; + * + *
+       * Specify whether to shuffle the data.
+       * If shuffle == true, the ordering of the HDF5 files is shuffled,
+       * and the ordering of data within any given HDF5 file is shuffled,
+       * but data between different files are not interleaved; all of a file's
+       * data are output (in a random order) before moving onto another file.
+       * 
+ */ + public Builder setShuffle(boolean value) { + bitField0_ |= 0x00000004; + shuffle_ = value; + onChanged(); + return this; + } + /** + * optional bool shuffle = 3 [default = false]; + * + *
+       * Specify whether to shuffle the data.
+       * If shuffle == true, the ordering of the HDF5 files is shuffled,
+       * and the ordering of data within any given HDF5 file is shuffled,
+       * but data between different files are not interleaved; all of a file's
+       * data are output (in a random order) before moving onto another file.
+       * 
+ */ + public Builder clearShuffle() { + bitField0_ = (bitField0_ & ~0x00000004); + shuffle_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.HDF5DataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.HDF5DataParameter) + private static final caffe.Caffe.HDF5DataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.HDF5DataParameter(); + } + + public static caffe.Caffe.HDF5DataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HDF5DataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HDF5DataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.HDF5DataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HDF5OutputParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.HDF5OutputParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string file_name = 1; + */ + boolean hasFileName(); + /** + * optional string file_name = 1; + */ + java.lang.String getFileName(); + /** + * optional string file_name = 1; + */ + com.google.protobuf.ByteString + getFileNameBytes(); + } + /** + * Protobuf type {@code caffe.HDF5OutputParameter} + */ + public static final class HDF5OutputParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.HDF5OutputParameter) + HDF5OutputParameterOrBuilder { + // Use HDF5OutputParameter.newBuilder() to construct. + private HDF5OutputParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HDF5OutputParameter() { + fileName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HDF5OutputParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + fileName_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_HDF5OutputParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HDF5OutputParameter.class, caffe.Caffe.HDF5OutputParameter.Builder.class); + } + + private int bitField0_; + public static final int FILE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fileName_; + /** + * optional string file_name = 1; + */ + public boolean hasFileName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string file_name = 1; + */ + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + 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()) { + fileName_ = s; + } + return s; + } + } + /** + * optional string file_name = 1; + */ + public com.google.protobuf.ByteString + getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fileName_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fileName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.HDF5OutputParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HDF5OutputParameter 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.HDF5OutputParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HDF5OutputParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.HDF5OutputParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HDF5OutputParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.HDF5OutputParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.HDF5OutputParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.HDF5OutputParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HDF5OutputParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.HDF5OutputParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.HDF5OutputParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.HDF5OutputParameter) + caffe.Caffe.HDF5OutputParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HDF5OutputParameter.class, caffe.Caffe.HDF5OutputParameter.Builder.class); + } + + // Construct using caffe.Caffe.HDF5OutputParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + fileName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_HDF5OutputParameter_descriptor; + } + + public caffe.Caffe.HDF5OutputParameter getDefaultInstanceForType() { + return caffe.Caffe.HDF5OutputParameter.getDefaultInstance(); + } + + public caffe.Caffe.HDF5OutputParameter build() { + caffe.Caffe.HDF5OutputParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.HDF5OutputParameter buildPartial() { + caffe.Caffe.HDF5OutputParameter result = new caffe.Caffe.HDF5OutputParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fileName_ = fileName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.HDF5OutputParameter) { + return mergeFrom((caffe.Caffe.HDF5OutputParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.HDF5OutputParameter other) { + if (other == caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) return this; + if (other.hasFileName()) { + bitField0_ |= 0x00000001; + fileName_ = other.fileName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.HDF5OutputParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.HDF5OutputParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object fileName_ = ""; + /** + * optional string file_name = 1; + */ + public boolean hasFileName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string file_name = 1; + */ + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + fileName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string file_name = 1; + */ + public com.google.protobuf.ByteString + getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string file_name = 1; + */ + public Builder setFileName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fileName_ = value; + onChanged(); + return this; + } + /** + * optional string file_name = 1; + */ + public Builder clearFileName() { + bitField0_ = (bitField0_ & ~0x00000001); + fileName_ = getDefaultInstance().getFileName(); + onChanged(); + return this; + } + /** + * optional string file_name = 1; + */ + public Builder setFileNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fileName_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.HDF5OutputParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.HDF5OutputParameter) + private static final caffe.Caffe.HDF5OutputParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.HDF5OutputParameter(); + } + + public static caffe.Caffe.HDF5OutputParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HDF5OutputParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HDF5OutputParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.HDF5OutputParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HingeLossParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.HingeLossParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+     * Specify the Norm to use L1 or L2
+     * 
+ */ + boolean hasNorm(); + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+     * Specify the Norm to use L1 or L2
+     * 
+ */ + caffe.Caffe.HingeLossParameter.Norm getNorm(); + } + /** + * Protobuf type {@code caffe.HingeLossParameter} + */ + public static final class HingeLossParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.HingeLossParameter) + HingeLossParameterOrBuilder { + // Use HingeLossParameter.newBuilder() to construct. + private HingeLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HingeLossParameter() { + norm_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HingeLossParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.HingeLossParameter.Norm value = caffe.Caffe.HingeLossParameter.Norm.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + norm_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_HingeLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HingeLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HingeLossParameter.class, caffe.Caffe.HingeLossParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.HingeLossParameter.Norm} + */ + public enum Norm + implements com.google.protobuf.ProtocolMessageEnum { + /** + * L1 = 1; + */ + L1(0, 1), + /** + * L2 = 2; + */ + L2(1, 2), + ; + + /** + * L1 = 1; + */ + public static final int L1_VALUE = 1; + /** + * L2 = 2; + */ + public static final int L2_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Norm valueOf(int value) { + switch (value) { + case 1: return L1; + case 2: return L2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Norm> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Norm findValueByNumber(int number) { + return Norm.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.HingeLossParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Norm[] VALUES = values(); + + public static Norm 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 Norm(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.HingeLossParameter.Norm) + } + + private int bitField0_; + public static final int NORM_FIELD_NUMBER = 1; + private int norm_; + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+     * Specify the Norm to use L1 or L2
+     * 
+ */ + public boolean hasNorm() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+     * Specify the Norm to use L1 or L2
+     * 
+ */ + public caffe.Caffe.HingeLossParameter.Norm getNorm() { + caffe.Caffe.HingeLossParameter.Norm result = caffe.Caffe.HingeLossParameter.Norm.valueOf(norm_); + return result == null ? caffe.Caffe.HingeLossParameter.Norm.L1 : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, norm_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, norm_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.HingeLossParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HingeLossParameter 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.HingeLossParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.HingeLossParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.HingeLossParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HingeLossParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.HingeLossParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.HingeLossParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.HingeLossParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.HingeLossParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.HingeLossParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.HingeLossParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.HingeLossParameter) + caffe.Caffe.HingeLossParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_HingeLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_HingeLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.HingeLossParameter.class, caffe.Caffe.HingeLossParameter.Builder.class); + } + + // Construct using caffe.Caffe.HingeLossParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + norm_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_HingeLossParameter_descriptor; + } + + public caffe.Caffe.HingeLossParameter getDefaultInstanceForType() { + return caffe.Caffe.HingeLossParameter.getDefaultInstance(); + } + + public caffe.Caffe.HingeLossParameter build() { + caffe.Caffe.HingeLossParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.HingeLossParameter buildPartial() { + caffe.Caffe.HingeLossParameter result = new caffe.Caffe.HingeLossParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.norm_ = norm_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.HingeLossParameter) { + return mergeFrom((caffe.Caffe.HingeLossParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.HingeLossParameter other) { + if (other == caffe.Caffe.HingeLossParameter.getDefaultInstance()) return this; + if (other.hasNorm()) { + setNorm(other.getNorm()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.HingeLossParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.HingeLossParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int norm_ = 1; + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+       * Specify the Norm to use L1 or L2
+       * 
+ */ + public boolean hasNorm() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+       * Specify the Norm to use L1 or L2
+       * 
+ */ + public caffe.Caffe.HingeLossParameter.Norm getNorm() { + caffe.Caffe.HingeLossParameter.Norm result = caffe.Caffe.HingeLossParameter.Norm.valueOf(norm_); + return result == null ? caffe.Caffe.HingeLossParameter.Norm.L1 : result; + } + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+       * Specify the Norm to use L1 or L2
+       * 
+ */ + public Builder setNorm(caffe.Caffe.HingeLossParameter.Norm value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + norm_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1]; + * + *
+       * Specify the Norm to use L1 or L2
+       * 
+ */ + public Builder clearNorm() { + bitField0_ = (bitField0_ & ~0x00000001); + norm_ = 1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.HingeLossParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.HingeLossParameter) + private static final caffe.Caffe.HingeLossParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.HingeLossParameter(); + } + + public static caffe.Caffe.HingeLossParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HingeLossParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HingeLossParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.HingeLossParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImageDataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ImageDataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+     * Specify the batch size.
+     * 
+ */ + boolean hasBatchSize(); + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+     * Specify the batch size.
+     * 
+ */ + int getBatchSize(); + + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + boolean hasRandSkip(); + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + int getRandSkip(); + + /** + * optional bool shuffle = 8 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * 
+ */ + boolean hasShuffle(); + /** + * optional bool shuffle = 8 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * 
+ */ + boolean getShuffle(); + + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + boolean hasNewHeight(); + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + int getNewHeight(); + + /** + * optional uint32 new_width = 10 [default = 0]; + */ + boolean hasNewWidth(); + /** + * optional uint32 new_width = 10 [default = 0]; + */ + int getNewWidth(); + + /** + * optional bool is_color = 11 [default = true]; + * + *
+     * Specify if the images are color or gray
+     * 
+ */ + boolean hasIsColor(); + /** + * optional bool is_color = 11 [default = true]; + * + *
+     * Specify if the images are color or gray
+     * 
+ */ + boolean getIsColor(); + + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + float getScale(); + + /** + * optional string mean_file = 3; + */ + boolean hasMeanFile(); + /** + * optional string mean_file = 3; + */ + java.lang.String getMeanFile(); + /** + * optional string mean_file = 3; + */ + com.google.protobuf.ByteString + getMeanFileBytes(); + + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + boolean hasCropSize(); + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + int getCropSize(); + + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + boolean hasMirror(); + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + boolean getMirror(); + + /** + * optional string root_folder = 12 [default = ""]; + */ + boolean hasRootFolder(); + /** + * optional string root_folder = 12 [default = ""]; + */ + java.lang.String getRootFolder(); + /** + * optional string root_folder = 12 [default = ""]; + */ + com.google.protobuf.ByteString + getRootFolderBytes(); + } + /** + * Protobuf type {@code caffe.ImageDataParameter} + */ + public static final class ImageDataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ImageDataParameter) + ImageDataParameterOrBuilder { + // Use ImageDataParameter.newBuilder() to construct. + private ImageDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImageDataParameter() { + source_ = ""; + batchSize_ = 1; + randSkip_ = 0; + shuffle_ = false; + newHeight_ = 0; + newWidth_ = 0; + isColor_ = true; + scale_ = 1F; + meanFile_ = ""; + cropSize_ = 0; + mirror_ = false; + rootFolder_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageDataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + source_ = bs; + break; + } + case 21: { + bitField0_ |= 0x00000080; + scale_ = input.readFloat(); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000100; + meanFile_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000002; + batchSize_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000200; + cropSize_ = input.readUInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000400; + mirror_ = input.readBool(); + break; + } + case 56: { + bitField0_ |= 0x00000004; + randSkip_ = input.readUInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000008; + shuffle_ = input.readBool(); + break; + } + case 72: { + bitField0_ |= 0x00000010; + newHeight_ = input.readUInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000020; + newWidth_ = input.readUInt32(); + break; + } + case 88: { + bitField0_ |= 0x00000040; + isColor_ = input.readBool(); + break; + } + case 98: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000800; + rootFolder_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ImageDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ImageDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ImageDataParameter.class, caffe.Caffe.ImageDataParameter.Builder.class); + } + + private int bitField0_; + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 4; + private int batchSize_; + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+     * Specify the batch size.
+     * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+     * Specify the batch size.
+     * 
+ */ + public int getBatchSize() { + return batchSize_; + } + + public static final int RAND_SKIP_FIELD_NUMBER = 7; + private int randSkip_; + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + public int getRandSkip() { + return randSkip_; + } + + public static final int SHUFFLE_FIELD_NUMBER = 8; + private boolean shuffle_; + /** + * optional bool shuffle = 8 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * 
+ */ + public boolean hasShuffle() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool shuffle = 8 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * 
+ */ + public boolean getShuffle() { + return shuffle_; + } + + public static final int NEW_HEIGHT_FIELD_NUMBER = 9; + private int newHeight_; + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + public boolean hasNewHeight() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + public int getNewHeight() { + return newHeight_; + } + + public static final int NEW_WIDTH_FIELD_NUMBER = 10; + private int newWidth_; + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public boolean hasNewWidth() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public int getNewWidth() { + return newWidth_; + } + + public static final int IS_COLOR_FIELD_NUMBER = 11; + private boolean isColor_; + /** + * optional bool is_color = 11 [default = true]; + * + *
+     * Specify if the images are color or gray
+     * 
+ */ + public boolean hasIsColor() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool is_color = 11 [default = true]; + * + *
+     * Specify if the images are color or gray
+     * 
+ */ + public boolean getIsColor() { + return isColor_; + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+     * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+     * simple scaling and subtracting the data mean, if provided. Note that the
+     * mean subtraction is always carried out before scaling.
+     * 
+ */ + public float getScale() { + return scale_; + } + + public static final int MEAN_FILE_FIELD_NUMBER = 3; + private volatile java.lang.Object meanFile_; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + 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()) { + meanFile_ = s; + } + return s; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CROP_SIZE_FIELD_NUMBER = 5; + private int cropSize_; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+     * crop an image.
+     * 
+ */ + public int getCropSize() { + return cropSize_; + } + + public static final int MIRROR_FIELD_NUMBER = 6; + private boolean mirror_; + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+     * data.
+     * 
+ */ + public boolean getMirror() { + return mirror_; + } + + public static final int ROOT_FOLDER_FIELD_NUMBER = 12; + private volatile java.lang.Object rootFolder_; + /** + * optional string root_folder = 12 [default = ""]; + */ + public boolean hasRootFolder() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public java.lang.String getRootFolder() { + java.lang.Object ref = rootFolder_; + 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()) { + rootFolder_ = s; + } + return s; + } + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public com.google.protobuf.ByteString + getRootFolderBytes() { + java.lang.Object ref = rootFolder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(4, batchSize_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeUInt32(5, cropSize_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBool(6, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(7, randSkip_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(8, shuffle_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeUInt32(9, newHeight_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeUInt32(10, newWidth_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(11, isColor_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, rootFolder_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, batchSize_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, cropSize_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, mirror_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, randSkip_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, shuffle_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, newHeight_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, newWidth_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, isColor_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, rootFolder_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ImageDataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ImageDataParameter 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.ImageDataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ImageDataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ImageDataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ImageDataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ImageDataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ImageDataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ImageDataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ImageDataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ImageDataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ImageDataParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ImageDataParameter) + caffe.Caffe.ImageDataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ImageDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ImageDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ImageDataParameter.class, caffe.Caffe.ImageDataParameter.Builder.class); + } + + // Construct using caffe.Caffe.ImageDataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + batchSize_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + randSkip_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + shuffle_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + newHeight_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + newWidth_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + isColor_ = true; + bitField0_ = (bitField0_ & ~0x00000040); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000080); + meanFile_ = ""; + bitField0_ = (bitField0_ & ~0x00000100); + cropSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); + mirror_ = false; + bitField0_ = (bitField0_ & ~0x00000400); + rootFolder_ = ""; + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ImageDataParameter_descriptor; + } + + public caffe.Caffe.ImageDataParameter getDefaultInstanceForType() { + return caffe.Caffe.ImageDataParameter.getDefaultInstance(); + } + + public caffe.Caffe.ImageDataParameter build() { + caffe.Caffe.ImageDataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ImageDataParameter buildPartial() { + caffe.Caffe.ImageDataParameter result = new caffe.Caffe.ImageDataParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.randSkip_ = randSkip_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.shuffle_ = shuffle_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.newHeight_ = newHeight_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.newWidth_ = newWidth_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.isColor_ = isColor_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.meanFile_ = meanFile_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.cropSize_ = cropSize_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.mirror_ = mirror_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.rootFolder_ = rootFolder_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ImageDataParameter) { + return mergeFrom((caffe.Caffe.ImageDataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ImageDataParameter other) { + if (other == caffe.Caffe.ImageDataParameter.getDefaultInstance()) return this; + if (other.hasSource()) { + bitField0_ |= 0x00000001; + source_ = other.source_; + onChanged(); + } + if (other.hasBatchSize()) { + setBatchSize(other.getBatchSize()); + } + if (other.hasRandSkip()) { + setRandSkip(other.getRandSkip()); + } + if (other.hasShuffle()) { + setShuffle(other.getShuffle()); + } + if (other.hasNewHeight()) { + setNewHeight(other.getNewHeight()); + } + if (other.hasNewWidth()) { + setNewWidth(other.getNewWidth()); + } + if (other.hasIsColor()) { + setIsColor(other.getIsColor()); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasMeanFile()) { + bitField0_ |= 0x00000100; + meanFile_ = other.meanFile_; + onChanged(); + } + if (other.hasCropSize()) { + setCropSize(other.getCropSize()); + } + if (other.hasMirror()) { + setMirror(other.getMirror()); + } + if (other.hasRootFolder()) { + bitField0_ |= 0x00000800; + rootFolder_ = other.rootFolder_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ImageDataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ImageDataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000001); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + + private int batchSize_ = 1; + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+       * Specify the batch size.
+       * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+       * Specify the batch size.
+       * 
+ */ + public int getBatchSize() { + return batchSize_; + } + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder setBatchSize(int value) { + bitField0_ |= 0x00000002; + batchSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batch_size = 4 [default = 1]; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000002); + batchSize_ = 1; + onChanged(); + return this; + } + + private int randSkip_ ; + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public int getRandSkip() { + return randSkip_; + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public Builder setRandSkip(int value) { + bitField0_ |= 0x00000004; + randSkip_ = value; + onChanged(); + return this; + } + /** + * optional uint32 rand_skip = 7 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public Builder clearRandSkip() { + bitField0_ = (bitField0_ & ~0x00000004); + randSkip_ = 0; + onChanged(); + return this; + } + + private boolean shuffle_ ; + /** + * optional bool shuffle = 8 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * 
+ */ + public boolean hasShuffle() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool shuffle = 8 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * 
+ */ + public boolean getShuffle() { + return shuffle_; + } + /** + * optional bool shuffle = 8 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * 
+ */ + public Builder setShuffle(boolean value) { + bitField0_ |= 0x00000008; + shuffle_ = value; + onChanged(); + return this; + } + /** + * optional bool shuffle = 8 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * 
+ */ + public Builder clearShuffle() { + bitField0_ = (bitField0_ & ~0x00000008); + shuffle_ = false; + onChanged(); + return this; + } + + private int newHeight_ ; + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public boolean hasNewHeight() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public int getNewHeight() { + return newHeight_; + } + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public Builder setNewHeight(int value) { + bitField0_ |= 0x00000010; + newHeight_ = value; + onChanged(); + return this; + } + /** + * optional uint32 new_height = 9 [default = 0]; + * + *
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public Builder clearNewHeight() { + bitField0_ = (bitField0_ & ~0x00000010); + newHeight_ = 0; + onChanged(); + return this; + } + + private int newWidth_ ; + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public boolean hasNewWidth() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public int getNewWidth() { + return newWidth_; + } + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public Builder setNewWidth(int value) { + bitField0_ |= 0x00000020; + newWidth_ = value; + onChanged(); + return this; + } + /** + * optional uint32 new_width = 10 [default = 0]; + */ + public Builder clearNewWidth() { + bitField0_ = (bitField0_ & ~0x00000020); + newWidth_ = 0; + onChanged(); + return this; + } + + private boolean isColor_ = true; + /** + * optional bool is_color = 11 [default = true]; + * + *
+       * Specify if the images are color or gray
+       * 
+ */ + public boolean hasIsColor() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool is_color = 11 [default = true]; + * + *
+       * Specify if the images are color or gray
+       * 
+ */ + public boolean getIsColor() { + return isColor_; + } + /** + * optional bool is_color = 11 [default = true]; + * + *
+       * Specify if the images are color or gray
+       * 
+ */ + public Builder setIsColor(boolean value) { + bitField0_ |= 0x00000040; + isColor_ = value; + onChanged(); + return this; + } + /** + * optional bool is_color = 11 [default = true]; + * + *
+       * Specify if the images are color or gray
+       * 
+ */ + public Builder clearIsColor() { + bitField0_ = (bitField0_ & ~0x00000040); + isColor_ = true; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public Builder setScale(float value) { + bitField0_ |= 0x00000080; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * DEPRECATED. See TransformationParameter. For data pre-processing, we can do
+       * simple scaling and subtracting the data mean, if provided. Note that the
+       * mean subtraction is always carried out before scaling.
+       * 
+ */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000080); + scale_ = 1F; + onChanged(); + return this; + } + + private java.lang.Object meanFile_ = ""; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + meanFile_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + meanFile_ = value; + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder clearMeanFile() { + bitField0_ = (bitField0_ & ~0x00000100); + meanFile_ = getDefaultInstance().getMeanFile(); + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + meanFile_ = value; + onChanged(); + return this; + } + + private int cropSize_ ; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public int getCropSize() { + return cropSize_; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public Builder setCropSize(int value) { + bitField0_ |= 0x00000200; + cropSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we would like to randomly
+       * crop an image.
+       * 
+ */ + public Builder clearCropSize() { + bitField0_ = (bitField0_ & ~0x00000200); + cropSize_ = 0; + onChanged(); + return this; + } + + private boolean mirror_ ; + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public boolean getMirror() { + return mirror_; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public Builder setMirror(boolean value) { + bitField0_ |= 0x00000400; + mirror_ = value; + onChanged(); + return this; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * DEPRECATED. See TransformationParameter. Specify if we want to randomly mirror
+       * data.
+       * 
+ */ + public Builder clearMirror() { + bitField0_ = (bitField0_ & ~0x00000400); + mirror_ = false; + onChanged(); + return this; + } + + private java.lang.Object rootFolder_ = ""; + /** + * optional string root_folder = 12 [default = ""]; + */ + public boolean hasRootFolder() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public java.lang.String getRootFolder() { + java.lang.Object ref = rootFolder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + rootFolder_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public com.google.protobuf.ByteString + getRootFolderBytes() { + java.lang.Object ref = rootFolder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public Builder setRootFolder( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + rootFolder_ = value; + onChanged(); + return this; + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public Builder clearRootFolder() { + bitField0_ = (bitField0_ & ~0x00000800); + rootFolder_ = getDefaultInstance().getRootFolder(); + onChanged(); + return this; + } + /** + * optional string root_folder = 12 [default = ""]; + */ + public Builder setRootFolderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + rootFolder_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ImageDataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ImageDataParameter) + private static final caffe.Caffe.ImageDataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ImageDataParameter(); + } + + public static caffe.Caffe.ImageDataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImageDataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ImageDataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ImageDataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InfogainLossParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.InfogainLossParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + } + /** + * Protobuf type {@code caffe.InfogainLossParameter} + */ + public static final class InfogainLossParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.InfogainLossParameter) + InfogainLossParameterOrBuilder { + // Use InfogainLossParameter.newBuilder() to construct. + private InfogainLossParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private InfogainLossParameter() { + source_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfogainLossParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + source_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_InfogainLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InfogainLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InfogainLossParameter.class, caffe.Caffe.InfogainLossParameter.Builder.class); + } + + private int bitField0_; + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 1; + * + *
+     * Specify the infogain matrix source.
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.InfogainLossParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InfogainLossParameter 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.InfogainLossParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InfogainLossParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.InfogainLossParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InfogainLossParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.InfogainLossParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.InfogainLossParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.InfogainLossParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InfogainLossParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.InfogainLossParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.InfogainLossParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.InfogainLossParameter) + caffe.Caffe.InfogainLossParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_InfogainLossParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InfogainLossParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InfogainLossParameter.class, caffe.Caffe.InfogainLossParameter.Builder.class); + } + + // Construct using caffe.Caffe.InfogainLossParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_InfogainLossParameter_descriptor; + } + + public caffe.Caffe.InfogainLossParameter getDefaultInstanceForType() { + return caffe.Caffe.InfogainLossParameter.getDefaultInstance(); + } + + public caffe.Caffe.InfogainLossParameter build() { + caffe.Caffe.InfogainLossParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.InfogainLossParameter buildPartial() { + caffe.Caffe.InfogainLossParameter result = new caffe.Caffe.InfogainLossParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.source_ = source_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.InfogainLossParameter) { + return mergeFrom((caffe.Caffe.InfogainLossParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.InfogainLossParameter other) { + if (other == caffe.Caffe.InfogainLossParameter.getDefaultInstance()) return this; + if (other.hasSource()) { + bitField0_ |= 0x00000001; + source_ = other.source_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.InfogainLossParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.InfogainLossParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000001); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the infogain matrix source.
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.InfogainLossParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.InfogainLossParameter) + private static final caffe.Caffe.InfogainLossParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.InfogainLossParameter(); + } + + public static caffe.Caffe.InfogainLossParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public InfogainLossParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new InfogainLossParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.InfogainLossParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InnerProductParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.InnerProductParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + boolean hasNumOutput(); + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + int getNumOutput(); + + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean hasBiasTerm(); + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean getBiasTerm(); + + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + boolean hasWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameter getWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); + + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + boolean hasBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameter getBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); + + /** + * optional int32 axis = 5 [default = 1]; + * + *
+     * The first axis to be lumped into a single inner product computation;
+     * all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 5 [default = 1]; + * + *
+     * The first axis to be lumped into a single inner product computation;
+     * all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + int getAxis(); + + /** + * optional bool transpose = 6 [default = false]; + * + *
+     * Specify whether to transpose the weight matrix or not.
+     * If transpose == true, any operations will be performed on the transpose
+     * of the weight matrix. The weight matrix itself is not going to be transposed
+     * but rather the transfer flag of operations will be toggled accordingly.
+     * 
+ */ + boolean hasTranspose(); + /** + * optional bool transpose = 6 [default = false]; + * + *
+     * Specify whether to transpose the weight matrix or not.
+     * If transpose == true, any operations will be performed on the transpose
+     * of the weight matrix. The weight matrix itself is not going to be transposed
+     * but rather the transfer flag of operations will be toggled accordingly.
+     * 
+ */ + boolean getTranspose(); + } + /** + * Protobuf type {@code caffe.InnerProductParameter} + */ + public static final class InnerProductParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.InnerProductParameter) + InnerProductParameterOrBuilder { + // Use InnerProductParameter.newBuilder() to construct. + private InnerProductParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private InnerProductParameter() { + numOutput_ = 0; + biasTerm_ = true; + axis_ = 1; + transpose_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InnerProductParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + numOutput_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + biasTerm_ = input.readBool(); + break; + } + case 26: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = weightFiller_.toBuilder(); + } + weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(weightFiller_); + weightFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 34: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = biasFiller_.toBuilder(); + } + biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(biasFiller_); + biasFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 40: { + bitField0_ |= 0x00000010; + axis_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + transpose_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_InnerProductParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InnerProductParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InnerProductParameter.class, caffe.Caffe.InnerProductParameter.Builder.class); + } + + private int bitField0_; + public static final int NUM_OUTPUT_FIELD_NUMBER = 1; + private int numOutput_; + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+     * The number of outputs for the layer
+     * 
+ */ + public int getNumOutput() { + return numOutput_; + } + + public static final int BIAS_TERM_FIELD_NUMBER = 2; + private boolean biasTerm_; + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + + public static final int WEIGHT_FILLER_FIELD_NUMBER = 3; + private caffe.Caffe.FillerParameter weightFiller_; + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + + public static final int BIAS_FILLER_FIELD_NUMBER = 4; + private caffe.Caffe.FillerParameter biasFiller_; + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + + public static final int AXIS_FIELD_NUMBER = 5; + private int axis_; + /** + * optional int32 axis = 5 [default = 1]; + * + *
+     * The first axis to be lumped into a single inner product computation;
+     * all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 axis = 5 [default = 1]; + * + *
+     * The first axis to be lumped into a single inner product computation;
+     * all preceding axes are retained in the output.
+     * May be negative to index from the end (e.g., -1 for the last axis).
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int TRANSPOSE_FIELD_NUMBER = 6; + private boolean transpose_; + /** + * optional bool transpose = 6 [default = false]; + * + *
+     * Specify whether to transpose the weight matrix or not.
+     * If transpose == true, any operations will be performed on the transpose
+     * of the weight matrix. The weight matrix itself is not going to be transposed
+     * but rather the transfer flag of operations will be toggled accordingly.
+     * 
+ */ + public boolean hasTranspose() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool transpose = 6 [default = false]; + * + *
+     * Specify whether to transpose the weight matrix or not.
+     * If transpose == true, any operations will be performed on the transpose
+     * of the weight matrix. The weight matrix itself is not going to be transposed
+     * but rather the transfer flag of operations will be toggled accordingly.
+     * 
+ */ + public boolean getTranspose() { + return transpose_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, biasTerm_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, getWeightFiller()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, getBiasFiller()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, axis_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(6, transpose_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, numOutput_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, biasTerm_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getWeightFiller()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBiasFiller()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, axis_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, transpose_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.InnerProductParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InnerProductParameter 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.InnerProductParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InnerProductParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.InnerProductParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InnerProductParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.InnerProductParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.InnerProductParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.InnerProductParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InnerProductParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.InnerProductParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.InnerProductParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.InnerProductParameter) + caffe.Caffe.InnerProductParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_InnerProductParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InnerProductParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InnerProductParameter.class, caffe.Caffe.InnerProductParameter.Builder.class); + } + + // Construct using caffe.Caffe.InnerProductParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getWeightFillerFieldBuilder(); + getBiasFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + numOutput_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + biasTerm_ = true; + bitField0_ = (bitField0_ & ~0x00000002); + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000010); + transpose_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_InnerProductParameter_descriptor; + } + + public caffe.Caffe.InnerProductParameter getDefaultInstanceForType() { + return caffe.Caffe.InnerProductParameter.getDefaultInstance(); + } + + public caffe.Caffe.InnerProductParameter build() { + caffe.Caffe.InnerProductParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.InnerProductParameter buildPartial() { + caffe.Caffe.InnerProductParameter result = new caffe.Caffe.InnerProductParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.numOutput_ = numOutput_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.biasTerm_ = biasTerm_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (weightFillerBuilder_ == null) { + result.weightFiller_ = weightFiller_; + } else { + result.weightFiller_ = weightFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (biasFillerBuilder_ == null) { + result.biasFiller_ = biasFiller_; + } else { + result.biasFiller_ = biasFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.transpose_ = transpose_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.InnerProductParameter) { + return mergeFrom((caffe.Caffe.InnerProductParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.InnerProductParameter other) { + if (other == caffe.Caffe.InnerProductParameter.getDefaultInstance()) return this; + if (other.hasNumOutput()) { + setNumOutput(other.getNumOutput()); + } + if (other.hasBiasTerm()) { + setBiasTerm(other.getBiasTerm()); + } + if (other.hasWeightFiller()) { + mergeWeightFiller(other.getWeightFiller()); + } + if (other.hasBiasFiller()) { + mergeBiasFiller(other.getBiasFiller()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasTranspose()) { + setTranspose(other.getTranspose()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.InnerProductParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.InnerProductParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int numOutput_ ; + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public int getNumOutput() { + return numOutput_; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder setNumOutput(int value) { + bitField0_ |= 0x00000001; + numOutput_ = value; + onChanged(); + return this; + } + /** + * optional uint32 num_output = 1; + * + *
+       * The number of outputs for the layer
+       * 
+ */ + public Builder clearNumOutput() { + bitField0_ = (bitField0_ & ~0x00000001); + numOutput_ = 0; + onChanged(); + return this; + } + + private boolean biasTerm_ = true; + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder setBiasTerm(boolean value) { + bitField0_ |= 0x00000002; + biasTerm_ = value; + onChanged(); + return this; + } + /** + * optional bool bias_term = 2 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder clearBiasTerm() { + bitField0_ = (bitField0_ & ~0x00000002); + biasTerm_ = true; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter weightFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + if (weightFillerBuilder_ == null) { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } else { + return weightFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + weightFiller_ = value; + onChanged(); + } else { + weightFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (weightFillerBuilder_ == null) { + weightFiller_ = builderForValue.build(); + onChanged(); + } else { + weightFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + weightFiller_ != null && + weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + weightFiller_ = + caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); + } else { + weightFiller_ = value; + } + onChanged(); + } else { + weightFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder clearWeightFiller() { + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + onChanged(); + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getWeightFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + if (weightFillerBuilder_ != null) { + return weightFillerBuilder_.getMessageOrBuilder(); + } else { + return weightFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + } + /** + * optional .caffe.FillerParameter weight_filler = 3; + * + *
+       * The filler for the weight
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getWeightFillerFieldBuilder() { + if (weightFillerBuilder_ == null) { + weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getWeightFiller(), + getParentForChildren(), + isClean()); + weightFiller_ = null; + } + return weightFillerBuilder_; + } + + private caffe.Caffe.FillerParameter biasFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + if (biasFillerBuilder_ == null) { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } else { + return biasFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasFiller_ = value; + onChanged(); + } else { + biasFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (biasFillerBuilder_ == null) { + biasFiller_ = builderForValue.build(); + onChanged(); + } else { + biasFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + biasFiller_ != null && + biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + biasFiller_ = + caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); + } else { + biasFiller_ = value; + } + onChanged(); + } else { + biasFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder clearBiasFiller() { + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + onChanged(); + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBiasFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + if (biasFillerBuilder_ != null) { + return biasFillerBuilder_.getMessageOrBuilder(); + } else { + return biasFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + } + /** + * optional .caffe.FillerParameter bias_filler = 4; + * + *
+       * The filler for the bias
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getBiasFillerFieldBuilder() { + if (biasFillerBuilder_ == null) { + biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getBiasFiller(), + getParentForChildren(), + isClean()); + biasFiller_ = null; + } + return biasFillerBuilder_; + } + + private int axis_ = 1; + /** + * optional int32 axis = 5 [default = 1]; + * + *
+       * The first axis to be lumped into a single inner product computation;
+       * all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 axis = 5 [default = 1]; + * + *
+       * The first axis to be lumped into a single inner product computation;
+       * all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 5 [default = 1]; + * + *
+       * The first axis to be lumped into a single inner product computation;
+       * all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000010; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 5 [default = 1]; + * + *
+       * The first axis to be lumped into a single inner product computation;
+       * all preceding axes are retained in the output.
+       * May be negative to index from the end (e.g., -1 for the last axis).
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000010); + axis_ = 1; + onChanged(); + return this; + } + + private boolean transpose_ ; + /** + * optional bool transpose = 6 [default = false]; + * + *
+       * Specify whether to transpose the weight matrix or not.
+       * If transpose == true, any operations will be performed on the transpose
+       * of the weight matrix. The weight matrix itself is not going to be transposed
+       * but rather the transfer flag of operations will be toggled accordingly.
+       * 
+ */ + public boolean hasTranspose() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool transpose = 6 [default = false]; + * + *
+       * Specify whether to transpose the weight matrix or not.
+       * If transpose == true, any operations will be performed on the transpose
+       * of the weight matrix. The weight matrix itself is not going to be transposed
+       * but rather the transfer flag of operations will be toggled accordingly.
+       * 
+ */ + public boolean getTranspose() { + return transpose_; + } + /** + * optional bool transpose = 6 [default = false]; + * + *
+       * Specify whether to transpose the weight matrix or not.
+       * If transpose == true, any operations will be performed on the transpose
+       * of the weight matrix. The weight matrix itself is not going to be transposed
+       * but rather the transfer flag of operations will be toggled accordingly.
+       * 
+ */ + public Builder setTranspose(boolean value) { + bitField0_ |= 0x00000020; + transpose_ = value; + onChanged(); + return this; + } + /** + * optional bool transpose = 6 [default = false]; + * + *
+       * Specify whether to transpose the weight matrix or not.
+       * If transpose == true, any operations will be performed on the transpose
+       * of the weight matrix. The weight matrix itself is not going to be transposed
+       * but rather the transfer flag of operations will be toggled accordingly.
+       * 
+ */ + public Builder clearTranspose() { + bitField0_ = (bitField0_ & ~0x00000020); + transpose_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.InnerProductParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.InnerProductParameter) + private static final caffe.Caffe.InnerProductParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.InnerProductParameter(); + } + + public static caffe.Caffe.InnerProductParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public InnerProductParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new InnerProductParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.InnerProductParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InputParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.InputParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + java.util.List + getShapeList(); + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + caffe.Caffe.BlobShape getShape(int index); + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + int getShapeCount(); + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + java.util.List + getShapeOrBuilderList(); + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index); + } + /** + * Protobuf type {@code caffe.InputParameter} + */ + public static final class InputParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.InputParameter) + InputParameterOrBuilder { + // Use InputParameter.newBuilder() to construct. + private InputParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private InputParameter() { + shape_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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)) { + shape_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + shape_.add(input.readMessage(caffe.Caffe.BlobShape.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_InputParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InputParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InputParameter.class, caffe.Caffe.InputParameter.Builder.class); + } + + public static final int SHAPE_FIELD_NUMBER = 1; + private java.util.List shape_; + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + public java.util.List getShapeList() { + return shape_; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + public java.util.List + getShapeOrBuilderList() { + return shape_; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + public caffe.Caffe.BlobShape getShape(int index) { + return shape_.get(index); + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+     * This layer produces N >= 1 top blob(s) to be assigned manually.
+     * Define N shapes to set a shape for each top.
+     * Define 1 shape to set the same shape for every top.
+     * Define no shape to defer to reshaping manually.
+     * 
+ */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index) { + return shape_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < shape_.size(); i++) { + output.writeMessage(1, shape_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < shape_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, shape_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.InputParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InputParameter 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.InputParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.InputParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.InputParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InputParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.InputParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.InputParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.InputParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.InputParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.InputParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.InputParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.InputParameter) + caffe.Caffe.InputParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_InputParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_InputParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.InputParameter.class, caffe.Caffe.InputParameter.Builder.class); + } + + // Construct using caffe.Caffe.InputParameter.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(); + } + } + public Builder clear() { + super.clear(); + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + shapeBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_InputParameter_descriptor; + } + + public caffe.Caffe.InputParameter getDefaultInstanceForType() { + return caffe.Caffe.InputParameter.getDefaultInstance(); + } + + public caffe.Caffe.InputParameter build() { + caffe.Caffe.InputParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.InputParameter buildPartial() { + caffe.Caffe.InputParameter result = new caffe.Caffe.InputParameter(this); + int from_bitField0_ = bitField0_; + if (shapeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.InputParameter) { + return mergeFrom((caffe.Caffe.InputParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.InputParameter other) { + if (other == caffe.Caffe.InputParameter.getDefaultInstance()) return this; + if (shapeBuilder_ == null) { + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + } else { + if (!other.shape_.isEmpty()) { + if (shapeBuilder_.isEmpty()) { + shapeBuilder_.dispose(); + shapeBuilder_ = null; + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000001); + shapeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getShapeFieldBuilder() : null; + } else { + shapeBuilder_.addAllMessages(other.shape_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.InputParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.InputParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List shape_ = + java.util.Collections.emptyList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + shape_ = new java.util.ArrayList(shape_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_; + + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public java.util.List getShapeList() { + if (shapeBuilder_ == null) { + return java.util.Collections.unmodifiableList(shape_); + } else { + return shapeBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public int getShapeCount() { + if (shapeBuilder_ == null) { + return shape_.size(); + } else { + return shapeBuilder_.getCount(); + } + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public caffe.Caffe.BlobShape getShape(int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); + } else { + return shapeBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder setShape( + int index, caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.set(index, value); + onChanged(); + } else { + shapeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder setShape( + int index, caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.set(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder addShape(caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.add(value); + onChanged(); + } else { + shapeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder addShape( + int index, caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.add(index, value); + onChanged(); + } else { + shapeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder addShape( + caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder addShape( + int index, caffe.Caffe.BlobShape.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder addAllShape( + java.lang.Iterable values) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + } else { + shapeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + shapeBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public Builder removeShape(int index) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.remove(index); + onChanged(); + } else { + shapeBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public caffe.Caffe.BlobShape.Builder getShapeBuilder( + int index) { + return getShapeFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder( + int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); } else { + return shapeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public java.util.List + getShapeOrBuilderList() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shape_); + } + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public caffe.Caffe.BlobShape.Builder addShapeBuilder() { + return getShapeFieldBuilder().addBuilder( + caffe.Caffe.BlobShape.getDefaultInstance()); + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public caffe.Caffe.BlobShape.Builder addShapeBuilder( + int index) { + return getShapeFieldBuilder().addBuilder( + index, caffe.Caffe.BlobShape.getDefaultInstance()); + } + /** + * repeated .caffe.BlobShape shape = 1; + * + *
+       * This layer produces N >= 1 top blob(s) to be assigned manually.
+       * Define N shapes to set a shape for each top.
+       * Define 1 shape to set the same shape for every top.
+       * Define no shape to defer to reshaping manually.
+       * 
+ */ + public java.util.List + getShapeBuilderList() { + return getShapeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder>( + shape_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.InputParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.InputParameter) + private static final caffe.Caffe.InputParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.InputParameter(); + } + + public static caffe.Caffe.InputParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public InputParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new InputParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.InputParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LogParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.LogParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float base = 1 [default = -1]; + * + *
+     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+     * 
+ */ + boolean hasBase(); + /** + * optional float base = 1 [default = -1]; + * + *
+     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+     * 
+ */ + float getBase(); + + /** + * optional float scale = 2 [default = 1]; + */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + */ + float getScale(); + + /** + * optional float shift = 3 [default = 0]; + */ + boolean hasShift(); + /** + * optional float shift = 3 [default = 0]; + */ + float getShift(); + } + /** + * Protobuf type {@code caffe.LogParameter} + * + *
+   * Message that stores parameters used by LogLayer
+   * 
+ */ + public static final class LogParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.LogParameter) + LogParameterOrBuilder { + // Use LogParameter.newBuilder() to construct. + private LogParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LogParameter() { + base_ = -1F; + scale_ = 1F; + shift_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LogParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + base_ = input.readFloat(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + scale_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + shift_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_LogParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LogParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LogParameter.class, caffe.Caffe.LogParameter.Builder.class); + } + + private int bitField0_; + public static final int BASE_FIELD_NUMBER = 1; + private float base_; + /** + * optional float base = 1 [default = -1]; + * + *
+     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+     * 
+ */ + public boolean hasBase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float base = 1 [default = -1]; + * + *
+     * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+     * Or if base is set to the default (-1), base is set to e,
+     * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+     * 
+ */ + public float getBase() { + return base_; + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + + public static final int SHIFT_FIELD_NUMBER = 3; + private float shift_; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, base_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, shift_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, base_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, shift_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.LogParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LogParameter 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.LogParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LogParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.LogParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LogParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.LogParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.LogParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.LogParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LogParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.LogParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.LogParameter} + * + *
+     * Message that stores parameters used by LogLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.LogParameter) + caffe.Caffe.LogParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_LogParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LogParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LogParameter.class, caffe.Caffe.LogParameter.Builder.class); + } + + // Construct using caffe.Caffe.LogParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + base_ = -1F; + bitField0_ = (bitField0_ & ~0x00000001); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000002); + shift_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_LogParameter_descriptor; + } + + public caffe.Caffe.LogParameter getDefaultInstanceForType() { + return caffe.Caffe.LogParameter.getDefaultInstance(); + } + + public caffe.Caffe.LogParameter build() { + caffe.Caffe.LogParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.LogParameter buildPartial() { + caffe.Caffe.LogParameter result = new caffe.Caffe.LogParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.base_ = base_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.shift_ = shift_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.LogParameter) { + return mergeFrom((caffe.Caffe.LogParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.LogParameter other) { + if (other == caffe.Caffe.LogParameter.getDefaultInstance()) return this; + if (other.hasBase()) { + setBase(other.getBase()); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasShift()) { + setShift(other.getShift()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.LogParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.LogParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float base_ = -1F; + /** + * optional float base = 1 [default = -1]; + * + *
+       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+       * 
+ */ + public boolean hasBase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+       * 
+ */ + public float getBase() { + return base_; + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+       * 
+ */ + public Builder setBase(float value) { + bitField0_ |= 0x00000001; + base_ = value; + onChanged(); + return this; + } + /** + * optional float base = 1 [default = -1]; + * + *
+       * LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
+       * Or if base is set to the default (-1), base is set to e,
+       * so y = ln(shift + scale * x) = log_e(shift + scale * x)
+       * 
+ */ + public Builder clearBase() { + bitField0_ = (bitField0_ & ~0x00000001); + base_ = -1F; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder setScale(float value) { + bitField0_ |= 0x00000002; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000002); + scale_ = 1F; + onChanged(); + return this; + } + + private float shift_ ; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder setShift(float value) { + bitField0_ |= 0x00000004; + shift_ = value; + onChanged(); + return this; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder clearShift() { + bitField0_ = (bitField0_ & ~0x00000004); + shift_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.LogParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.LogParameter) + private static final caffe.Caffe.LogParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.LogParameter(); + } + + public static caffe.Caffe.LogParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LogParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LogParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.LogParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LRNParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.LRNParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 local_size = 1 [default = 5]; + */ + boolean hasLocalSize(); + /** + * optional uint32 local_size = 1 [default = 5]; + */ + int getLocalSize(); + + /** + * optional float alpha = 2 [default = 1]; + */ + boolean hasAlpha(); + /** + * optional float alpha = 2 [default = 1]; + */ + float getAlpha(); + + /** + * optional float beta = 3 [default = 0.75]; + */ + boolean hasBeta(); + /** + * optional float beta = 3 [default = 0.75]; + */ + float getBeta(); + + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + boolean hasNormRegion(); + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + caffe.Caffe.LRNParameter.NormRegion getNormRegion(); + + /** + * optional float k = 5 [default = 1]; + */ + boolean hasK(); + /** + * optional float k = 5 [default = 1]; + */ + float getK(); + + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + caffe.Caffe.LRNParameter.Engine getEngine(); + } + /** + * Protobuf type {@code caffe.LRNParameter} + * + *
+   * Message that stores parameters used by LRNLayer
+   * 
+ */ + public static final class LRNParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.LRNParameter) + LRNParameterOrBuilder { + // Use LRNParameter.newBuilder() to construct. + private LRNParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LRNParameter() { + localSize_ = 5; + alpha_ = 1F; + beta_ = 0.75F; + normRegion_ = 0; + k_ = 1F; + engine_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LRNParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + localSize_ = input.readUInt32(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + alpha_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + beta_ = input.readFloat(); + break; + } + case 32: { + int rawValue = input.readEnum(); + caffe.Caffe.LRNParameter.NormRegion value = caffe.Caffe.LRNParameter.NormRegion.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + normRegion_ = rawValue; + } + break; + } + case 45: { + bitField0_ |= 0x00000010; + k_ = input.readFloat(); + break; + } + case 48: { + int rawValue = input.readEnum(); + caffe.Caffe.LRNParameter.Engine value = caffe.Caffe.LRNParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(6, rawValue); + } else { + bitField0_ |= 0x00000020; + engine_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_LRNParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LRNParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LRNParameter.class, caffe.Caffe.LRNParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.LRNParameter.NormRegion} + */ + public enum NormRegion + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ACROSS_CHANNELS = 0; + */ + ACROSS_CHANNELS(0, 0), + /** + * WITHIN_CHANNEL = 1; + */ + WITHIN_CHANNEL(1, 1), + ; + + /** + * ACROSS_CHANNELS = 0; + */ + public static final int ACROSS_CHANNELS_VALUE = 0; + /** + * WITHIN_CHANNEL = 1; + */ + public static final int WITHIN_CHANNEL_VALUE = 1; + + + public final int getNumber() { + return value; + } + + public static NormRegion valueOf(int value) { + switch (value) { + case 0: return ACROSS_CHANNELS; + case 1: return WITHIN_CHANNEL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NormRegion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NormRegion findValueByNumber(int number) { + return NormRegion.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.LRNParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final NormRegion[] VALUES = values(); + + public static NormRegion 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 NormRegion(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.LRNParameter.NormRegion) + } + + /** + * Protobuf enum {@code caffe.LRNParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.LRNParameter.getDescriptor().getEnumTypes().get(1); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.LRNParameter.Engine) + } + + private int bitField0_; + public static final int LOCAL_SIZE_FIELD_NUMBER = 1; + private int localSize_; + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public boolean hasLocalSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public int getLocalSize() { + return localSize_; + } + + public static final int ALPHA_FIELD_NUMBER = 2; + private float alpha_; + /** + * optional float alpha = 2 [default = 1]; + */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float alpha = 2 [default = 1]; + */ + public float getAlpha() { + return alpha_; + } + + public static final int BETA_FIELD_NUMBER = 3; + private float beta_; + /** + * optional float beta = 3 [default = 0.75]; + */ + public boolean hasBeta() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float beta = 3 [default = 0.75]; + */ + public float getBeta() { + return beta_; + } + + public static final int NORM_REGION_FIELD_NUMBER = 4; + private int normRegion_; + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public boolean hasNormRegion() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public caffe.Caffe.LRNParameter.NormRegion getNormRegion() { + caffe.Caffe.LRNParameter.NormRegion result = caffe.Caffe.LRNParameter.NormRegion.valueOf(normRegion_); + return result == null ? caffe.Caffe.LRNParameter.NormRegion.ACROSS_CHANNELS : result; + } + + public static final int K_FIELD_NUMBER = 5; + private float k_; + /** + * optional float k = 5 [default = 1]; + */ + public boolean hasK() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional float k = 5 [default = 1]; + */ + public float getK() { + return k_; + } + + public static final int ENGINE_FIELD_NUMBER = 6; + private int engine_; + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public caffe.Caffe.LRNParameter.Engine getEngine() { + caffe.Caffe.LRNParameter.Engine result = caffe.Caffe.LRNParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.LRNParameter.Engine.DEFAULT : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, localSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, alpha_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, beta_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, normRegion_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeFloat(5, k_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeEnum(6, engine_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, localSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, alpha_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, beta_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, normRegion_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, k_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, engine_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.LRNParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LRNParameter 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.LRNParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.LRNParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.LRNParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LRNParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.LRNParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.LRNParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.LRNParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.LRNParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.LRNParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.LRNParameter} + * + *
+     * Message that stores parameters used by LRNLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.LRNParameter) + caffe.Caffe.LRNParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_LRNParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_LRNParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.LRNParameter.class, caffe.Caffe.LRNParameter.Builder.class); + } + + // Construct using caffe.Caffe.LRNParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + localSize_ = 5; + bitField0_ = (bitField0_ & ~0x00000001); + alpha_ = 1F; + bitField0_ = (bitField0_ & ~0x00000002); + beta_ = 0.75F; + bitField0_ = (bitField0_ & ~0x00000004); + normRegion_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + k_ = 1F; + bitField0_ = (bitField0_ & ~0x00000010); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_LRNParameter_descriptor; + } + + public caffe.Caffe.LRNParameter getDefaultInstanceForType() { + return caffe.Caffe.LRNParameter.getDefaultInstance(); + } + + public caffe.Caffe.LRNParameter build() { + caffe.Caffe.LRNParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.LRNParameter buildPartial() { + caffe.Caffe.LRNParameter result = new caffe.Caffe.LRNParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.localSize_ = localSize_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.alpha_ = alpha_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.beta_ = beta_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.normRegion_ = normRegion_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.k_ = k_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.engine_ = engine_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.LRNParameter) { + return mergeFrom((caffe.Caffe.LRNParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.LRNParameter other) { + if (other == caffe.Caffe.LRNParameter.getDefaultInstance()) return this; + if (other.hasLocalSize()) { + setLocalSize(other.getLocalSize()); + } + if (other.hasAlpha()) { + setAlpha(other.getAlpha()); + } + if (other.hasBeta()) { + setBeta(other.getBeta()); + } + if (other.hasNormRegion()) { + setNormRegion(other.getNormRegion()); + } + if (other.hasK()) { + setK(other.getK()); + } + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.LRNParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.LRNParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int localSize_ = 5; + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public boolean hasLocalSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public int getLocalSize() { + return localSize_; + } + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public Builder setLocalSize(int value) { + bitField0_ |= 0x00000001; + localSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 local_size = 1 [default = 5]; + */ + public Builder clearLocalSize() { + bitField0_ = (bitField0_ & ~0x00000001); + localSize_ = 5; + onChanged(); + return this; + } + + private float alpha_ = 1F; + /** + * optional float alpha = 2 [default = 1]; + */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float alpha = 2 [default = 1]; + */ + public float getAlpha() { + return alpha_; + } + /** + * optional float alpha = 2 [default = 1]; + */ + public Builder setAlpha(float value) { + bitField0_ |= 0x00000002; + alpha_ = value; + onChanged(); + return this; + } + /** + * optional float alpha = 2 [default = 1]; + */ + public Builder clearAlpha() { + bitField0_ = (bitField0_ & ~0x00000002); + alpha_ = 1F; + onChanged(); + return this; + } + + private float beta_ = 0.75F; + /** + * optional float beta = 3 [default = 0.75]; + */ + public boolean hasBeta() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float beta = 3 [default = 0.75]; + */ + public float getBeta() { + return beta_; + } + /** + * optional float beta = 3 [default = 0.75]; + */ + public Builder setBeta(float value) { + bitField0_ |= 0x00000004; + beta_ = value; + onChanged(); + return this; + } + /** + * optional float beta = 3 [default = 0.75]; + */ + public Builder clearBeta() { + bitField0_ = (bitField0_ & ~0x00000004); + beta_ = 0.75F; + onChanged(); + return this; + } + + private int normRegion_ = 0; + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public boolean hasNormRegion() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public caffe.Caffe.LRNParameter.NormRegion getNormRegion() { + caffe.Caffe.LRNParameter.NormRegion result = caffe.Caffe.LRNParameter.NormRegion.valueOf(normRegion_); + return result == null ? caffe.Caffe.LRNParameter.NormRegion.ACROSS_CHANNELS : result; + } + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public Builder setNormRegion(caffe.Caffe.LRNParameter.NormRegion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + normRegion_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS]; + */ + public Builder clearNormRegion() { + bitField0_ = (bitField0_ & ~0x00000008); + normRegion_ = 0; + onChanged(); + return this; + } + + private float k_ = 1F; + /** + * optional float k = 5 [default = 1]; + */ + public boolean hasK() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional float k = 5 [default = 1]; + */ + public float getK() { + return k_; + } + /** + * optional float k = 5 [default = 1]; + */ + public Builder setK(float value) { + bitField0_ |= 0x00000010; + k_ = value; + onChanged(); + return this; + } + /** + * optional float k = 5 [default = 1]; + */ + public Builder clearK() { + bitField0_ = (bitField0_ & ~0x00000010); + k_ = 1F; + onChanged(); + return this; + } + + private int engine_ = 0; + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public caffe.Caffe.LRNParameter.Engine getEngine() { + caffe.Caffe.LRNParameter.Engine result = caffe.Caffe.LRNParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.LRNParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.LRNParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000020); + engine_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.LRNParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.LRNParameter) + private static final caffe.Caffe.LRNParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.LRNParameter(); + } + + public static caffe.Caffe.LRNParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LRNParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LRNParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.LRNParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MemoryDataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.MemoryDataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 batch_size = 1; + */ + boolean hasBatchSize(); + /** + * optional uint32 batch_size = 1; + */ + int getBatchSize(); + + /** + * optional uint32 channels = 2; + */ + boolean hasChannels(); + /** + * optional uint32 channels = 2; + */ + int getChannels(); + + /** + * optional uint32 height = 3; + */ + boolean hasHeight(); + /** + * optional uint32 height = 3; + */ + int getHeight(); + + /** + * optional uint32 width = 4; + */ + boolean hasWidth(); + /** + * optional uint32 width = 4; + */ + int getWidth(); + } + /** + * Protobuf type {@code caffe.MemoryDataParameter} + */ + public static final class MemoryDataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.MemoryDataParameter) + MemoryDataParameterOrBuilder { + // Use MemoryDataParameter.newBuilder() to construct. + private MemoryDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MemoryDataParameter() { + batchSize_ = 0; + channels_ = 0; + height_ = 0; + width_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryDataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + batchSize_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + channels_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + height_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + width_ = input.readUInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_MemoryDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_MemoryDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.MemoryDataParameter.class, caffe.Caffe.MemoryDataParameter.Builder.class); + } + + private int bitField0_; + public static final int BATCH_SIZE_FIELD_NUMBER = 1; + private int batchSize_; + /** + * optional uint32 batch_size = 1; + */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 batch_size = 1; + */ + public int getBatchSize() { + return batchSize_; + } + + public static final int CHANNELS_FIELD_NUMBER = 2; + private int channels_; + /** + * optional uint32 channels = 2; + */ + public boolean hasChannels() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 channels = 2; + */ + public int getChannels() { + return channels_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + * optional uint32 height = 3; + */ + public boolean hasHeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 height = 3; + */ + public int getHeight() { + return height_; + } + + public static final int WIDTH_FIELD_NUMBER = 4; + private int width_; + /** + * optional uint32 width = 4; + */ + public boolean hasWidth() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 width = 4; + */ + public int getWidth() { + return width_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, batchSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, channels_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, height_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(4, width_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, batchSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, channels_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, height_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, width_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.MemoryDataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.MemoryDataParameter 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.MemoryDataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.MemoryDataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.MemoryDataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.MemoryDataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.MemoryDataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.MemoryDataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.MemoryDataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.MemoryDataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.MemoryDataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.MemoryDataParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.MemoryDataParameter) + caffe.Caffe.MemoryDataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_MemoryDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_MemoryDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.MemoryDataParameter.class, caffe.Caffe.MemoryDataParameter.Builder.class); + } + + // Construct using caffe.Caffe.MemoryDataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + batchSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + channels_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + height_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_MemoryDataParameter_descriptor; + } + + public caffe.Caffe.MemoryDataParameter getDefaultInstanceForType() { + return caffe.Caffe.MemoryDataParameter.getDefaultInstance(); + } + + public caffe.Caffe.MemoryDataParameter build() { + caffe.Caffe.MemoryDataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.MemoryDataParameter buildPartial() { + caffe.Caffe.MemoryDataParameter result = new caffe.Caffe.MemoryDataParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.channels_ = channels_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.height_ = height_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.width_ = width_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.MemoryDataParameter) { + return mergeFrom((caffe.Caffe.MemoryDataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.MemoryDataParameter other) { + if (other == caffe.Caffe.MemoryDataParameter.getDefaultInstance()) return this; + if (other.hasBatchSize()) { + setBatchSize(other.getBatchSize()); + } + if (other.hasChannels()) { + setChannels(other.getChannels()); + } + if (other.hasHeight()) { + setHeight(other.getHeight()); + } + if (other.hasWidth()) { + setWidth(other.getWidth()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.MemoryDataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.MemoryDataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int batchSize_ ; + /** + * optional uint32 batch_size = 1; + */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 batch_size = 1; + */ + public int getBatchSize() { + return batchSize_; + } + /** + * optional uint32 batch_size = 1; + */ + public Builder setBatchSize(int value) { + bitField0_ |= 0x00000001; + batchSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batch_size = 1; + */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000001); + batchSize_ = 0; + onChanged(); + return this; + } + + private int channels_ ; + /** + * optional uint32 channels = 2; + */ + public boolean hasChannels() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 channels = 2; + */ + public int getChannels() { + return channels_; + } + /** + * optional uint32 channels = 2; + */ + public Builder setChannels(int value) { + bitField0_ |= 0x00000002; + channels_ = value; + onChanged(); + return this; + } + /** + * optional uint32 channels = 2; + */ + public Builder clearChannels() { + bitField0_ = (bitField0_ & ~0x00000002); + channels_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * optional uint32 height = 3; + */ + public boolean hasHeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 height = 3; + */ + public int getHeight() { + return height_; + } + /** + * optional uint32 height = 3; + */ + public Builder setHeight(int value) { + bitField0_ |= 0x00000004; + height_ = value; + onChanged(); + return this; + } + /** + * optional uint32 height = 3; + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000004); + height_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * optional uint32 width = 4; + */ + public boolean hasWidth() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 width = 4; + */ + public int getWidth() { + return width_; + } + /** + * optional uint32 width = 4; + */ + public Builder setWidth(int value) { + bitField0_ |= 0x00000008; + width_ = value; + onChanged(); + return this; + } + /** + * optional uint32 width = 4; + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000008); + width_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.MemoryDataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.MemoryDataParameter) + private static final caffe.Caffe.MemoryDataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.MemoryDataParameter(); + } + + public static caffe.Caffe.MemoryDataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MemoryDataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MemoryDataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.MemoryDataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MVNParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.MVNParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+     * This parameter can be set to false to normalize mean only
+     * 
+ */ + boolean hasNormalizeVariance(); + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+     * This parameter can be set to false to normalize mean only
+     * 
+ */ + boolean getNormalizeVariance(); + + /** + * optional bool across_channels = 2 [default = false]; + * + *
+     * This parameter can be set to true to perform DNN-like MVN
+     * 
+ */ + boolean hasAcrossChannels(); + /** + * optional bool across_channels = 2 [default = false]; + * + *
+     * This parameter can be set to true to perform DNN-like MVN
+     * 
+ */ + boolean getAcrossChannels(); + + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+     * Epsilon for not dividing by zero while normalizing variance
+     * 
+ */ + boolean hasEps(); + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+     * Epsilon for not dividing by zero while normalizing variance
+     * 
+ */ + float getEps(); + } + /** + * Protobuf type {@code caffe.MVNParameter} + */ + public static final class MVNParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.MVNParameter) + MVNParameterOrBuilder { + // Use MVNParameter.newBuilder() to construct. + private MVNParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MVNParameter() { + normalizeVariance_ = true; + acrossChannels_ = false; + eps_ = 1e-09F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MVNParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + normalizeVariance_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + acrossChannels_ = input.readBool(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + eps_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_MVNParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_MVNParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.MVNParameter.class, caffe.Caffe.MVNParameter.Builder.class); + } + + private int bitField0_; + public static final int NORMALIZE_VARIANCE_FIELD_NUMBER = 1; + private boolean normalizeVariance_; + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+     * This parameter can be set to false to normalize mean only
+     * 
+ */ + public boolean hasNormalizeVariance() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+     * This parameter can be set to false to normalize mean only
+     * 
+ */ + public boolean getNormalizeVariance() { + return normalizeVariance_; + } + + public static final int ACROSS_CHANNELS_FIELD_NUMBER = 2; + private boolean acrossChannels_; + /** + * optional bool across_channels = 2 [default = false]; + * + *
+     * This parameter can be set to true to perform DNN-like MVN
+     * 
+ */ + public boolean hasAcrossChannels() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool across_channels = 2 [default = false]; + * + *
+     * This parameter can be set to true to perform DNN-like MVN
+     * 
+ */ + public boolean getAcrossChannels() { + return acrossChannels_; + } + + public static final int EPS_FIELD_NUMBER = 3; + private float eps_; + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+     * Epsilon for not dividing by zero while normalizing variance
+     * 
+ */ + public boolean hasEps() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+     * Epsilon for not dividing by zero while normalizing variance
+     * 
+ */ + public float getEps() { + return eps_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, normalizeVariance_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, acrossChannels_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, eps_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, normalizeVariance_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, acrossChannels_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, eps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.MVNParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.MVNParameter 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.MVNParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.MVNParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.MVNParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.MVNParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.MVNParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.MVNParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.MVNParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.MVNParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.MVNParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.MVNParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.MVNParameter) + caffe.Caffe.MVNParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_MVNParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_MVNParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.MVNParameter.class, caffe.Caffe.MVNParameter.Builder.class); + } + + // Construct using caffe.Caffe.MVNParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + normalizeVariance_ = true; + bitField0_ = (bitField0_ & ~0x00000001); + acrossChannels_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + eps_ = 1e-09F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_MVNParameter_descriptor; + } + + public caffe.Caffe.MVNParameter getDefaultInstanceForType() { + return caffe.Caffe.MVNParameter.getDefaultInstance(); + } + + public caffe.Caffe.MVNParameter build() { + caffe.Caffe.MVNParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.MVNParameter buildPartial() { + caffe.Caffe.MVNParameter result = new caffe.Caffe.MVNParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.normalizeVariance_ = normalizeVariance_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.acrossChannels_ = acrossChannels_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.eps_ = eps_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.MVNParameter) { + return mergeFrom((caffe.Caffe.MVNParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.MVNParameter other) { + if (other == caffe.Caffe.MVNParameter.getDefaultInstance()) return this; + if (other.hasNormalizeVariance()) { + setNormalizeVariance(other.getNormalizeVariance()); + } + if (other.hasAcrossChannels()) { + setAcrossChannels(other.getAcrossChannels()); + } + if (other.hasEps()) { + setEps(other.getEps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.MVNParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.MVNParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean normalizeVariance_ = true; + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+       * This parameter can be set to false to normalize mean only
+       * 
+ */ + public boolean hasNormalizeVariance() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+       * This parameter can be set to false to normalize mean only
+       * 
+ */ + public boolean getNormalizeVariance() { + return normalizeVariance_; + } + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+       * This parameter can be set to false to normalize mean only
+       * 
+ */ + public Builder setNormalizeVariance(boolean value) { + bitField0_ |= 0x00000001; + normalizeVariance_ = value; + onChanged(); + return this; + } + /** + * optional bool normalize_variance = 1 [default = true]; + * + *
+       * This parameter can be set to false to normalize mean only
+       * 
+ */ + public Builder clearNormalizeVariance() { + bitField0_ = (bitField0_ & ~0x00000001); + normalizeVariance_ = true; + onChanged(); + return this; + } + + private boolean acrossChannels_ ; + /** + * optional bool across_channels = 2 [default = false]; + * + *
+       * This parameter can be set to true to perform DNN-like MVN
+       * 
+ */ + public boolean hasAcrossChannels() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool across_channels = 2 [default = false]; + * + *
+       * This parameter can be set to true to perform DNN-like MVN
+       * 
+ */ + public boolean getAcrossChannels() { + return acrossChannels_; + } + /** + * optional bool across_channels = 2 [default = false]; + * + *
+       * This parameter can be set to true to perform DNN-like MVN
+       * 
+ */ + public Builder setAcrossChannels(boolean value) { + bitField0_ |= 0x00000002; + acrossChannels_ = value; + onChanged(); + return this; + } + /** + * optional bool across_channels = 2 [default = false]; + * + *
+       * This parameter can be set to true to perform DNN-like MVN
+       * 
+ */ + public Builder clearAcrossChannels() { + bitField0_ = (bitField0_ & ~0x00000002); + acrossChannels_ = false; + onChanged(); + return this; + } + + private float eps_ = 1e-09F; + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+       * Epsilon for not dividing by zero while normalizing variance
+       * 
+ */ + public boolean hasEps() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+       * Epsilon for not dividing by zero while normalizing variance
+       * 
+ */ + public float getEps() { + return eps_; + } + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+       * Epsilon for not dividing by zero while normalizing variance
+       * 
+ */ + public Builder setEps(float value) { + bitField0_ |= 0x00000004; + eps_ = value; + onChanged(); + return this; + } + /** + * optional float eps = 3 [default = 1e-09]; + * + *
+       * Epsilon for not dividing by zero while normalizing variance
+       * 
+ */ + public Builder clearEps() { + bitField0_ = (bitField0_ & ~0x00000004); + eps_ = 1e-09F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.MVNParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.MVNParameter) + private static final caffe.Caffe.MVNParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.MVNParameter(); + } + + public static caffe.Caffe.MVNParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MVNParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MVNParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.MVNParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PoolingParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.PoolingParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + boolean hasPool(); + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + caffe.Caffe.PoolingParameter.PoolMethod getPool(); + + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in height and width or as Y, X pairs.
+     * 
+ */ + boolean hasPad(); + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in height and width or as Y, X pairs.
+     * 
+ */ + int getPad(); + + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * The padding height
+     * 
+ */ + boolean hasPadH(); + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * The padding height
+     * 
+ */ + int getPadH(); + + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width
+     * 
+ */ + boolean hasPadW(); + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width
+     * 
+ */ + int getPadW(); + + /** + * optional uint32 kernel_size = 2; + * + *
+     * The kernel size (square)
+     * 
+ */ + boolean hasKernelSize(); + /** + * optional uint32 kernel_size = 2; + * + *
+     * The kernel size (square)
+     * 
+ */ + int getKernelSize(); + + /** + * optional uint32 kernel_h = 5; + * + *
+     * The kernel height
+     * 
+ */ + boolean hasKernelH(); + /** + * optional uint32 kernel_h = 5; + * + *
+     * The kernel height
+     * 
+ */ + int getKernelH(); + + /** + * optional uint32 kernel_w = 6; + * + *
+     * The kernel width
+     * 
+ */ + boolean hasKernelW(); + /** + * optional uint32 kernel_w = 6; + * + *
+     * The kernel width
+     * 
+ */ + int getKernelW(); + + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+     * The stride (equal in Y, X)
+     * 
+ */ + boolean hasStride(); + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+     * The stride (equal in Y, X)
+     * 
+ */ + int getStride(); + + /** + * optional uint32 stride_h = 7; + * + *
+     * The stride height
+     * 
+ */ + boolean hasStrideH(); + /** + * optional uint32 stride_h = 7; + * + *
+     * The stride height
+     * 
+ */ + int getStrideH(); + + /** + * optional uint32 stride_w = 8; + * + *
+     * The stride width
+     * 
+ */ + boolean hasStrideW(); + /** + * optional uint32 stride_w = 8; + * + *
+     * The stride width
+     * 
+ */ + int getStrideW(); + + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + caffe.Caffe.PoolingParameter.Engine getEngine(); + + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+     * If global_pooling then it will pool over the size of the bottom by doing
+     * kernel_h = bottom->height and kernel_w = bottom->width
+     * 
+ */ + boolean hasGlobalPooling(); + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+     * If global_pooling then it will pool over the size of the bottom by doing
+     * kernel_h = bottom->height and kernel_w = bottom->width
+     * 
+ */ + boolean getGlobalPooling(); + } + /** + * Protobuf type {@code caffe.PoolingParameter} + */ + public static final class PoolingParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.PoolingParameter) + PoolingParameterOrBuilder { + // Use PoolingParameter.newBuilder() to construct. + private PoolingParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PoolingParameter() { + pool_ = 0; + pad_ = 0; + padH_ = 0; + padW_ = 0; + kernelSize_ = 0; + kernelH_ = 0; + kernelW_ = 0; + stride_ = 1; + strideH_ = 0; + strideW_ = 0; + engine_ = 0; + globalPooling_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PoolingParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.PoolingParameter.PoolMethod value = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + pool_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000010; + kernelSize_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000080; + stride_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000002; + pad_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000020; + kernelH_ = input.readUInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000040; + kernelW_ = input.readUInt32(); + break; + } + case 56: { + bitField0_ |= 0x00000100; + strideH_ = input.readUInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000200; + strideW_ = input.readUInt32(); + break; + } + case 72: { + bitField0_ |= 0x00000004; + padH_ = input.readUInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000008; + padW_ = input.readUInt32(); + break; + } + case 88: { + int rawValue = input.readEnum(); + caffe.Caffe.PoolingParameter.Engine value = caffe.Caffe.PoolingParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(11, rawValue); + } else { + bitField0_ |= 0x00000400; + engine_ = rawValue; + } + break; + } + case 96: { + bitField0_ |= 0x00000800; + globalPooling_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_PoolingParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PoolingParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PoolingParameter.class, caffe.Caffe.PoolingParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.PoolingParameter.PoolMethod} + */ + public enum PoolMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + * MAX = 0; + */ + MAX(0, 0), + /** + * AVE = 1; + */ + AVE(1, 1), + /** + * STOCHASTIC = 2; + */ + STOCHASTIC(2, 2), + ; + + /** + * MAX = 0; + */ + public static final int MAX_VALUE = 0; + /** + * AVE = 1; + */ + public static final int AVE_VALUE = 1; + /** + * STOCHASTIC = 2; + */ + public static final int STOCHASTIC_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static PoolMethod valueOf(int value) { + switch (value) { + case 0: return MAX; + case 1: return AVE; + case 2: return STOCHASTIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PoolMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PoolMethod findValueByNumber(int number) { + return PoolMethod.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.PoolingParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final PoolMethod[] VALUES = values(); + + public static PoolMethod 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 PoolMethod(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.PoolingParameter.PoolMethod) + } + + /** + * Protobuf enum {@code caffe.PoolingParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.PoolingParameter.getDescriptor().getEnumTypes().get(1); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.PoolingParameter.Engine) + } + + private int bitField0_; + public static final int POOL_FIELD_NUMBER = 1; + private int pool_; + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public caffe.Caffe.PoolingParameter.PoolMethod getPool() { + caffe.Caffe.PoolingParameter.PoolMethod result = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.PoolingParameter.PoolMethod.MAX : result; + } + + public static final int PAD_FIELD_NUMBER = 4; + private int pad_; + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in height and width or as Y, X pairs.
+     * 
+ */ + public boolean hasPad() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+     * Pad, kernel size, and stride are all given as a single value for equal
+     * dimensions in height and width or as Y, X pairs.
+     * 
+ */ + public int getPad() { + return pad_; + } + + public static final int PAD_H_FIELD_NUMBER = 9; + private int padH_; + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * The padding height
+     * 
+ */ + public boolean hasPadH() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+     * The padding height
+     * 
+ */ + public int getPadH() { + return padH_; + } + + public static final int PAD_W_FIELD_NUMBER = 10; + private int padW_; + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width
+     * 
+ */ + public boolean hasPadW() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+     * The padding width
+     * 
+ */ + public int getPadW() { + return padW_; + } + + public static final int KERNEL_SIZE_FIELD_NUMBER = 2; + private int kernelSize_; + /** + * optional uint32 kernel_size = 2; + * + *
+     * The kernel size (square)
+     * 
+ */ + public boolean hasKernelSize() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 kernel_size = 2; + * + *
+     * The kernel size (square)
+     * 
+ */ + public int getKernelSize() { + return kernelSize_; + } + + public static final int KERNEL_H_FIELD_NUMBER = 5; + private int kernelH_; + /** + * optional uint32 kernel_h = 5; + * + *
+     * The kernel height
+     * 
+ */ + public boolean hasKernelH() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 kernel_h = 5; + * + *
+     * The kernel height
+     * 
+ */ + public int getKernelH() { + return kernelH_; + } + + public static final int KERNEL_W_FIELD_NUMBER = 6; + private int kernelW_; + /** + * optional uint32 kernel_w = 6; + * + *
+     * The kernel width
+     * 
+ */ + public boolean hasKernelW() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 kernel_w = 6; + * + *
+     * The kernel width
+     * 
+ */ + public int getKernelW() { + return kernelW_; + } + + public static final int STRIDE_FIELD_NUMBER = 3; + private int stride_; + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+     * The stride (equal in Y, X)
+     * 
+ */ + public boolean hasStride() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+     * The stride (equal in Y, X)
+     * 
+ */ + public int getStride() { + return stride_; + } + + public static final int STRIDE_H_FIELD_NUMBER = 7; + private int strideH_; + /** + * optional uint32 stride_h = 7; + * + *
+     * The stride height
+     * 
+ */ + public boolean hasStrideH() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 stride_h = 7; + * + *
+     * The stride height
+     * 
+ */ + public int getStrideH() { + return strideH_; + } + + public static final int STRIDE_W_FIELD_NUMBER = 8; + private int strideW_; + /** + * optional uint32 stride_w = 8; + * + *
+     * The stride width
+     * 
+ */ + public boolean hasStrideW() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 stride_w = 8; + * + *
+     * The stride width
+     * 
+ */ + public int getStrideW() { + return strideW_; + } + + public static final int ENGINE_FIELD_NUMBER = 11; + private int engine_; + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public caffe.Caffe.PoolingParameter.Engine getEngine() { + caffe.Caffe.PoolingParameter.Engine result = caffe.Caffe.PoolingParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.PoolingParameter.Engine.DEFAULT : result; + } + + public static final int GLOBAL_POOLING_FIELD_NUMBER = 12; + private boolean globalPooling_; + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+     * If global_pooling then it will pool over the size of the bottom by doing
+     * kernel_h = bottom->height and kernel_w = bottom->width
+     * 
+ */ + public boolean hasGlobalPooling() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+     * If global_pooling then it will pool over the size of the bottom by doing
+     * kernel_h = bottom->height and kernel_w = bottom->width
+     * 
+ */ + public boolean getGlobalPooling() { + return globalPooling_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, pool_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeUInt32(2, kernelSize_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeUInt32(3, stride_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(4, pad_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeUInt32(5, kernelH_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(6, kernelW_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeUInt32(7, strideH_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeUInt32(8, strideW_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(9, padH_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(10, padW_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeEnum(11, engine_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBool(12, globalPooling_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, pool_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, kernelSize_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, stride_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, pad_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, kernelH_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, kernelW_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, strideH_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, strideW_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, padH_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, padW_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, engine_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, globalPooling_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.PoolingParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PoolingParameter 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.PoolingParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PoolingParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.PoolingParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PoolingParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.PoolingParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.PoolingParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.PoolingParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PoolingParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.PoolingParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.PoolingParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.PoolingParameter) + caffe.Caffe.PoolingParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_PoolingParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PoolingParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PoolingParameter.class, caffe.Caffe.PoolingParameter.Builder.class); + } + + // Construct using caffe.Caffe.PoolingParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pool_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + pad_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + padH_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + padW_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + kernelSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + kernelH_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + kernelW_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + stride_ = 1; + bitField0_ = (bitField0_ & ~0x00000080); + strideH_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + strideW_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000400); + globalPooling_ = false; + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_PoolingParameter_descriptor; + } + + public caffe.Caffe.PoolingParameter getDefaultInstanceForType() { + return caffe.Caffe.PoolingParameter.getDefaultInstance(); + } + + public caffe.Caffe.PoolingParameter build() { + caffe.Caffe.PoolingParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.PoolingParameter buildPartial() { + caffe.Caffe.PoolingParameter result = new caffe.Caffe.PoolingParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.pool_ = pool_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.pad_ = pad_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.padH_ = padH_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.padW_ = padW_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.kernelSize_ = kernelSize_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.kernelH_ = kernelH_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.kernelW_ = kernelW_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.stride_ = stride_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.strideH_ = strideH_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.strideW_ = strideW_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.engine_ = engine_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.globalPooling_ = globalPooling_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.PoolingParameter) { + return mergeFrom((caffe.Caffe.PoolingParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.PoolingParameter other) { + if (other == caffe.Caffe.PoolingParameter.getDefaultInstance()) return this; + if (other.hasPool()) { + setPool(other.getPool()); + } + if (other.hasPad()) { + setPad(other.getPad()); + } + if (other.hasPadH()) { + setPadH(other.getPadH()); + } + if (other.hasPadW()) { + setPadW(other.getPadW()); + } + if (other.hasKernelSize()) { + setKernelSize(other.getKernelSize()); + } + if (other.hasKernelH()) { + setKernelH(other.getKernelH()); + } + if (other.hasKernelW()) { + setKernelW(other.getKernelW()); + } + if (other.hasStride()) { + setStride(other.getStride()); + } + if (other.hasStrideH()) { + setStrideH(other.getStrideH()); + } + if (other.hasStrideW()) { + setStrideW(other.getStrideW()); + } + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + if (other.hasGlobalPooling()) { + setGlobalPooling(other.getGlobalPooling()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.PoolingParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.PoolingParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int pool_ = 0; + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public caffe.Caffe.PoolingParameter.PoolMethod getPool() { + caffe.Caffe.PoolingParameter.PoolMethod result = caffe.Caffe.PoolingParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.PoolingParameter.PoolMethod.MAX : result; + } + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder setPool(caffe.Caffe.PoolingParameter.PoolMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + pool_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder clearPool() { + bitField0_ = (bitField0_ & ~0x00000001); + pool_ = 0; + onChanged(); + return this; + } + + private int pad_ ; + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in height and width or as Y, X pairs.
+       * 
+ */ + public boolean hasPad() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in height and width or as Y, X pairs.
+       * 
+ */ + public int getPad() { + return pad_; + } + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in height and width or as Y, X pairs.
+       * 
+ */ + public Builder setPad(int value) { + bitField0_ |= 0x00000002; + pad_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad = 4 [default = 0]; + * + *
+       * Pad, kernel size, and stride are all given as a single value for equal
+       * dimensions in height and width or as Y, X pairs.
+       * 
+ */ + public Builder clearPad() { + bitField0_ = (bitField0_ & ~0x00000002); + pad_ = 0; + onChanged(); + return this; + } + + private int padH_ ; + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * The padding height
+       * 
+ */ + public boolean hasPadH() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * The padding height
+       * 
+ */ + public int getPadH() { + return padH_; + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * The padding height
+       * 
+ */ + public Builder setPadH(int value) { + bitField0_ |= 0x00000004; + padH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad_h = 9 [default = 0]; + * + *
+       * The padding height
+       * 
+ */ + public Builder clearPadH() { + bitField0_ = (bitField0_ & ~0x00000004); + padH_ = 0; + onChanged(); + return this; + } + + private int padW_ ; + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width
+       * 
+ */ + public boolean hasPadW() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width
+       * 
+ */ + public int getPadW() { + return padW_; + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width
+       * 
+ */ + public Builder setPadW(int value) { + bitField0_ |= 0x00000008; + padW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad_w = 10 [default = 0]; + * + *
+       * The padding width
+       * 
+ */ + public Builder clearPadW() { + bitField0_ = (bitField0_ & ~0x00000008); + padW_ = 0; + onChanged(); + return this; + } + + private int kernelSize_ ; + /** + * optional uint32 kernel_size = 2; + * + *
+       * The kernel size (square)
+       * 
+ */ + public boolean hasKernelSize() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 kernel_size = 2; + * + *
+       * The kernel size (square)
+       * 
+ */ + public int getKernelSize() { + return kernelSize_; + } + /** + * optional uint32 kernel_size = 2; + * + *
+       * The kernel size (square)
+       * 
+ */ + public Builder setKernelSize(int value) { + bitField0_ |= 0x00000010; + kernelSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernel_size = 2; + * + *
+       * The kernel size (square)
+       * 
+ */ + public Builder clearKernelSize() { + bitField0_ = (bitField0_ & ~0x00000010); + kernelSize_ = 0; + onChanged(); + return this; + } + + private int kernelH_ ; + /** + * optional uint32 kernel_h = 5; + * + *
+       * The kernel height
+       * 
+ */ + public boolean hasKernelH() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 kernel_h = 5; + * + *
+       * The kernel height
+       * 
+ */ + public int getKernelH() { + return kernelH_; + } + /** + * optional uint32 kernel_h = 5; + * + *
+       * The kernel height
+       * 
+ */ + public Builder setKernelH(int value) { + bitField0_ |= 0x00000020; + kernelH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernel_h = 5; + * + *
+       * The kernel height
+       * 
+ */ + public Builder clearKernelH() { + bitField0_ = (bitField0_ & ~0x00000020); + kernelH_ = 0; + onChanged(); + return this; + } + + private int kernelW_ ; + /** + * optional uint32 kernel_w = 6; + * + *
+       * The kernel width
+       * 
+ */ + public boolean hasKernelW() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 kernel_w = 6; + * + *
+       * The kernel width
+       * 
+ */ + public int getKernelW() { + return kernelW_; + } + /** + * optional uint32 kernel_w = 6; + * + *
+       * The kernel width
+       * 
+ */ + public Builder setKernelW(int value) { + bitField0_ |= 0x00000040; + kernelW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernel_w = 6; + * + *
+       * The kernel width
+       * 
+ */ + public Builder clearKernelW() { + bitField0_ = (bitField0_ & ~0x00000040); + kernelW_ = 0; + onChanged(); + return this; + } + + private int stride_ = 1; + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+       * The stride (equal in Y, X)
+       * 
+ */ + public boolean hasStride() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+       * The stride (equal in Y, X)
+       * 
+ */ + public int getStride() { + return stride_; + } + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+       * The stride (equal in Y, X)
+       * 
+ */ + public Builder setStride(int value) { + bitField0_ |= 0x00000080; + stride_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride = 3 [default = 1]; + * + *
+       * The stride (equal in Y, X)
+       * 
+ */ + public Builder clearStride() { + bitField0_ = (bitField0_ & ~0x00000080); + stride_ = 1; + onChanged(); + return this; + } + + private int strideH_ ; + /** + * optional uint32 stride_h = 7; + * + *
+       * The stride height
+       * 
+ */ + public boolean hasStrideH() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 stride_h = 7; + * + *
+       * The stride height
+       * 
+ */ + public int getStrideH() { + return strideH_; + } + /** + * optional uint32 stride_h = 7; + * + *
+       * The stride height
+       * 
+ */ + public Builder setStrideH(int value) { + bitField0_ |= 0x00000100; + strideH_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride_h = 7; + * + *
+       * The stride height
+       * 
+ */ + public Builder clearStrideH() { + bitField0_ = (bitField0_ & ~0x00000100); + strideH_ = 0; + onChanged(); + return this; + } + + private int strideW_ ; + /** + * optional uint32 stride_w = 8; + * + *
+       * The stride width
+       * 
+ */ + public boolean hasStrideW() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 stride_w = 8; + * + *
+       * The stride width
+       * 
+ */ + public int getStrideW() { + return strideW_; + } + /** + * optional uint32 stride_w = 8; + * + *
+       * The stride width
+       * 
+ */ + public Builder setStrideW(int value) { + bitField0_ |= 0x00000200; + strideW_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride_w = 8; + * + *
+       * The stride width
+       * 
+ */ + public Builder clearStrideW() { + bitField0_ = (bitField0_ & ~0x00000200); + strideW_ = 0; + onChanged(); + return this; + } + + private int engine_ = 0; + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public caffe.Caffe.PoolingParameter.Engine getEngine() { + caffe.Caffe.PoolingParameter.Engine result = caffe.Caffe.PoolingParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.PoolingParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.PoolingParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000400); + engine_ = 0; + onChanged(); + return this; + } + + private boolean globalPooling_ ; + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+       * If global_pooling then it will pool over the size of the bottom by doing
+       * kernel_h = bottom->height and kernel_w = bottom->width
+       * 
+ */ + public boolean hasGlobalPooling() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+       * If global_pooling then it will pool over the size of the bottom by doing
+       * kernel_h = bottom->height and kernel_w = bottom->width
+       * 
+ */ + public boolean getGlobalPooling() { + return globalPooling_; + } + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+       * If global_pooling then it will pool over the size of the bottom by doing
+       * kernel_h = bottom->height and kernel_w = bottom->width
+       * 
+ */ + public Builder setGlobalPooling(boolean value) { + bitField0_ |= 0x00000800; + globalPooling_ = value; + onChanged(); + return this; + } + /** + * optional bool global_pooling = 12 [default = false]; + * + *
+       * If global_pooling then it will pool over the size of the bottom by doing
+       * kernel_h = bottom->height and kernel_w = bottom->width
+       * 
+ */ + public Builder clearGlobalPooling() { + bitField0_ = (bitField0_ & ~0x00000800); + globalPooling_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.PoolingParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.PoolingParameter) + private static final caffe.Caffe.PoolingParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.PoolingParameter(); + } + + public static caffe.Caffe.PoolingParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PoolingParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PoolingParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.PoolingParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PowerParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.PowerParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float power = 1 [default = 1]; + * + *
+     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+     * 
+ */ + boolean hasPower(); + /** + * optional float power = 1 [default = 1]; + * + *
+     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+     * 
+ */ + float getPower(); + + /** + * optional float scale = 2 [default = 1]; + */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + */ + float getScale(); + + /** + * optional float shift = 3 [default = 0]; + */ + boolean hasShift(); + /** + * optional float shift = 3 [default = 0]; + */ + float getShift(); + } + /** + * Protobuf type {@code caffe.PowerParameter} + */ + public static final class PowerParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.PowerParameter) + PowerParameterOrBuilder { + // Use PowerParameter.newBuilder() to construct. + private PowerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PowerParameter() { + power_ = 1F; + scale_ = 1F; + shift_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PowerParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + power_ = input.readFloat(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + scale_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + shift_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_PowerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PowerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PowerParameter.class, caffe.Caffe.PowerParameter.Builder.class); + } + + private int bitField0_; + public static final int POWER_FIELD_NUMBER = 1; + private float power_; + /** + * optional float power = 1 [default = 1]; + * + *
+     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+     * 
+ */ + public boolean hasPower() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float power = 1 [default = 1]; + * + *
+     * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+     * 
+ */ + public float getPower() { + return power_; + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + + public static final int SHIFT_FIELD_NUMBER = 3; + private float shift_; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, power_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, shift_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, power_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, shift_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.PowerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PowerParameter 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.PowerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PowerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.PowerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PowerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.PowerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.PowerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.PowerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PowerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.PowerParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.PowerParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.PowerParameter) + caffe.Caffe.PowerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_PowerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PowerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PowerParameter.class, caffe.Caffe.PowerParameter.Builder.class); + } + + // Construct using caffe.Caffe.PowerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + power_ = 1F; + bitField0_ = (bitField0_ & ~0x00000001); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000002); + shift_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_PowerParameter_descriptor; + } + + public caffe.Caffe.PowerParameter getDefaultInstanceForType() { + return caffe.Caffe.PowerParameter.getDefaultInstance(); + } + + public caffe.Caffe.PowerParameter build() { + caffe.Caffe.PowerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.PowerParameter buildPartial() { + caffe.Caffe.PowerParameter result = new caffe.Caffe.PowerParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.power_ = power_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.shift_ = shift_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.PowerParameter) { + return mergeFrom((caffe.Caffe.PowerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.PowerParameter other) { + if (other == caffe.Caffe.PowerParameter.getDefaultInstance()) return this; + if (other.hasPower()) { + setPower(other.getPower()); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasShift()) { + setShift(other.getShift()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.PowerParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.PowerParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float power_ = 1F; + /** + * optional float power = 1 [default = 1]; + * + *
+       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+       * 
+ */ + public boolean hasPower() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float power = 1 [default = 1]; + * + *
+       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+       * 
+ */ + public float getPower() { + return power_; + } + /** + * optional float power = 1 [default = 1]; + * + *
+       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+       * 
+ */ + public Builder setPower(float value) { + bitField0_ |= 0x00000001; + power_ = value; + onChanged(); + return this; + } + /** + * optional float power = 1 [default = 1]; + * + *
+       * PowerLayer computes outputs y = (shift + scale * x) ^ power.
+       * 
+ */ + public Builder clearPower() { + bitField0_ = (bitField0_ & ~0x00000001); + power_ = 1F; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder setScale(float value) { + bitField0_ |= 0x00000002; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000002); + scale_ = 1F; + onChanged(); + return this; + } + + private float shift_ ; + /** + * optional float shift = 3 [default = 0]; + */ + public boolean hasShift() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float shift = 3 [default = 0]; + */ + public float getShift() { + return shift_; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder setShift(float value) { + bitField0_ |= 0x00000004; + shift_ = value; + onChanged(); + return this; + } + /** + * optional float shift = 3 [default = 0]; + */ + public Builder clearShift() { + bitField0_ = (bitField0_ & ~0x00000004); + shift_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.PowerParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.PowerParameter) + private static final caffe.Caffe.PowerParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.PowerParameter(); + } + + public static caffe.Caffe.PowerParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PowerParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PowerParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.PowerParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PythonParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.PythonParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string module = 1; + */ + boolean hasModule(); + /** + * optional string module = 1; + */ + java.lang.String getModule(); + /** + * optional string module = 1; + */ + com.google.protobuf.ByteString + getModuleBytes(); + + /** + * optional string layer = 2; + */ + boolean hasLayer(); + /** + * optional string layer = 2; + */ + java.lang.String getLayer(); + /** + * optional string layer = 2; + */ + com.google.protobuf.ByteString + getLayerBytes(); + + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + boolean hasParamStr(); + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + java.lang.String getParamStr(); + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + com.google.protobuf.ByteString + getParamStrBytes(); + + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+     * Whether this PythonLayer is shared among worker solvers during data parallelism.
+     * If true, each worker solver sequentially run forward from this layer.
+     * This value should be set true if you are using it as a data layer.
+     * 
+ */ + boolean hasShareInParallel(); + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+     * Whether this PythonLayer is shared among worker solvers during data parallelism.
+     * If true, each worker solver sequentially run forward from this layer.
+     * This value should be set true if you are using it as a data layer.
+     * 
+ */ + boolean getShareInParallel(); + } + /** + * Protobuf type {@code caffe.PythonParameter} + */ + public static final class PythonParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.PythonParameter) + PythonParameterOrBuilder { + // Use PythonParameter.newBuilder() to construct. + private PythonParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PythonParameter() { + module_ = ""; + layer_ = ""; + paramStr_ = ""; + shareInParallel_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PythonParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + module_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + layer_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + paramStr_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000008; + shareInParallel_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_PythonParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PythonParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PythonParameter.class, caffe.Caffe.PythonParameter.Builder.class); + } + + private int bitField0_; + public static final int MODULE_FIELD_NUMBER = 1; + private volatile java.lang.Object module_; + /** + * optional string module = 1; + */ + public boolean hasModule() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string module = 1; + */ + public java.lang.String getModule() { + java.lang.Object ref = module_; + 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()) { + module_ = s; + } + return s; + } + } + /** + * optional string module = 1; + */ + public com.google.protobuf.ByteString + getModuleBytes() { + java.lang.Object ref = module_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + module_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAYER_FIELD_NUMBER = 2; + private volatile java.lang.Object layer_; + /** + * optional string layer = 2; + */ + public boolean hasLayer() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string layer = 2; + */ + public java.lang.String getLayer() { + java.lang.Object ref = layer_; + 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()) { + layer_ = s; + } + return s; + } + } + /** + * optional string layer = 2; + */ + public com.google.protobuf.ByteString + getLayerBytes() { + java.lang.Object ref = layer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + layer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAM_STR_FIELD_NUMBER = 3; + private volatile java.lang.Object paramStr_; + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + public boolean hasParamStr() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + public java.lang.String getParamStr() { + java.lang.Object ref = paramStr_; + 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()) { + paramStr_ = s; + } + return s; + } + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+     * This value is set to the attribute `param_str` of the `PythonLayer` object
+     * in Python before calling the `setup()` method. This could be a number,
+     * string, dictionary in Python dict format, JSON, etc. You may parse this
+     * string in `setup` method and use it in `forward` and `backward`.
+     * 
+ */ + public com.google.protobuf.ByteString + getParamStrBytes() { + java.lang.Object ref = paramStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paramStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHARE_IN_PARALLEL_FIELD_NUMBER = 4; + private boolean shareInParallel_; + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+     * Whether this PythonLayer is shared among worker solvers during data parallelism.
+     * If true, each worker solver sequentially run forward from this layer.
+     * This value should be set true if you are using it as a data layer.
+     * 
+ */ + public boolean hasShareInParallel() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+     * Whether this PythonLayer is shared among worker solvers during data parallelism.
+     * If true, each worker solver sequentially run forward from this layer.
+     * This value should be set true if you are using it as a data layer.
+     * 
+ */ + public boolean getShareInParallel() { + return shareInParallel_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, module_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, layer_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, paramStr_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, shareInParallel_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, module_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, layer_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, paramStr_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, shareInParallel_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.PythonParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PythonParameter 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.PythonParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PythonParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.PythonParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PythonParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.PythonParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.PythonParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.PythonParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PythonParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.PythonParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.PythonParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.PythonParameter) + caffe.Caffe.PythonParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_PythonParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PythonParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PythonParameter.class, caffe.Caffe.PythonParameter.Builder.class); + } + + // Construct using caffe.Caffe.PythonParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + module_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + layer_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + paramStr_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + shareInParallel_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_PythonParameter_descriptor; + } + + public caffe.Caffe.PythonParameter getDefaultInstanceForType() { + return caffe.Caffe.PythonParameter.getDefaultInstance(); + } + + public caffe.Caffe.PythonParameter build() { + caffe.Caffe.PythonParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.PythonParameter buildPartial() { + caffe.Caffe.PythonParameter result = new caffe.Caffe.PythonParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.module_ = module_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.layer_ = layer_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.paramStr_ = paramStr_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.shareInParallel_ = shareInParallel_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.PythonParameter) { + return mergeFrom((caffe.Caffe.PythonParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.PythonParameter other) { + if (other == caffe.Caffe.PythonParameter.getDefaultInstance()) return this; + if (other.hasModule()) { + bitField0_ |= 0x00000001; + module_ = other.module_; + onChanged(); + } + if (other.hasLayer()) { + bitField0_ |= 0x00000002; + layer_ = other.layer_; + onChanged(); + } + if (other.hasParamStr()) { + bitField0_ |= 0x00000004; + paramStr_ = other.paramStr_; + onChanged(); + } + if (other.hasShareInParallel()) { + setShareInParallel(other.getShareInParallel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.PythonParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.PythonParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object module_ = ""; + /** + * optional string module = 1; + */ + public boolean hasModule() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string module = 1; + */ + public java.lang.String getModule() { + java.lang.Object ref = module_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + module_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string module = 1; + */ + public com.google.protobuf.ByteString + getModuleBytes() { + java.lang.Object ref = module_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + module_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string module = 1; + */ + public Builder setModule( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + module_ = value; + onChanged(); + return this; + } + /** + * optional string module = 1; + */ + public Builder clearModule() { + bitField0_ = (bitField0_ & ~0x00000001); + module_ = getDefaultInstance().getModule(); + onChanged(); + return this; + } + /** + * optional string module = 1; + */ + public Builder setModuleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + module_ = value; + onChanged(); + return this; + } + + private java.lang.Object layer_ = ""; + /** + * optional string layer = 2; + */ + public boolean hasLayer() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string layer = 2; + */ + public java.lang.String getLayer() { + java.lang.Object ref = layer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + layer_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string layer = 2; + */ + public com.google.protobuf.ByteString + getLayerBytes() { + java.lang.Object ref = layer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + layer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string layer = 2; + */ + public Builder setLayer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + layer_ = value; + onChanged(); + return this; + } + /** + * optional string layer = 2; + */ + public Builder clearLayer() { + bitField0_ = (bitField0_ & ~0x00000002); + layer_ = getDefaultInstance().getLayer(); + onChanged(); + return this; + } + /** + * optional string layer = 2; + */ + public Builder setLayerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + layer_ = value; + onChanged(); + return this; + } + + private java.lang.Object paramStr_ = ""; + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public boolean hasParamStr() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public java.lang.String getParamStr() { + java.lang.Object ref = paramStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + paramStr_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public com.google.protobuf.ByteString + getParamStrBytes() { + java.lang.Object ref = paramStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paramStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public Builder setParamStr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + paramStr_ = value; + onChanged(); + return this; + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public Builder clearParamStr() { + bitField0_ = (bitField0_ & ~0x00000004); + paramStr_ = getDefaultInstance().getParamStr(); + onChanged(); + return this; + } + /** + * optional string param_str = 3 [default = ""]; + * + *
+       * This value is set to the attribute `param_str` of the `PythonLayer` object
+       * in Python before calling the `setup()` method. This could be a number,
+       * string, dictionary in Python dict format, JSON, etc. You may parse this
+       * string in `setup` method and use it in `forward` and `backward`.
+       * 
+ */ + public Builder setParamStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + paramStr_ = value; + onChanged(); + return this; + } + + private boolean shareInParallel_ ; + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+       * Whether this PythonLayer is shared among worker solvers during data parallelism.
+       * If true, each worker solver sequentially run forward from this layer.
+       * This value should be set true if you are using it as a data layer.
+       * 
+ */ + public boolean hasShareInParallel() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+       * Whether this PythonLayer is shared among worker solvers during data parallelism.
+       * If true, each worker solver sequentially run forward from this layer.
+       * This value should be set true if you are using it as a data layer.
+       * 
+ */ + public boolean getShareInParallel() { + return shareInParallel_; + } + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+       * Whether this PythonLayer is shared among worker solvers during data parallelism.
+       * If true, each worker solver sequentially run forward from this layer.
+       * This value should be set true if you are using it as a data layer.
+       * 
+ */ + public Builder setShareInParallel(boolean value) { + bitField0_ |= 0x00000008; + shareInParallel_ = value; + onChanged(); + return this; + } + /** + * optional bool share_in_parallel = 4 [default = false]; + * + *
+       * Whether this PythonLayer is shared among worker solvers during data parallelism.
+       * If true, each worker solver sequentially run forward from this layer.
+       * This value should be set true if you are using it as a data layer.
+       * 
+ */ + public Builder clearShareInParallel() { + bitField0_ = (bitField0_ & ~0x00000008); + shareInParallel_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.PythonParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.PythonParameter) + private static final caffe.Caffe.PythonParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.PythonParameter(); + } + + public static caffe.Caffe.PythonParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PythonParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PythonParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.PythonParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReductionParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ReductionParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+     * reduction operation
+     * 
+ */ + boolean hasOperation(); + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+     * reduction operation
+     * 
+ */ + caffe.Caffe.ReductionParameter.ReductionOp getOperation(); + + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * The first axis to reduce to a scalar -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * (Currently, only reduction along ALL "tail" axes is supported; reduction
+     * of axis M through N, where N < num_axes - 1, is unsupported.)
+     * Suppose we have an n-axis bottom Blob with shape:
+     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+     * If axis == m, the output Blob will have shape
+     *     (d0, d1, d2, ..., d(m-1)),
+     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+     * If axis == 0 (the default), the output Blob always has the empty shape
+     * (count 1), performing reduction across the entire input --
+     * often useful for creating new loss functions.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * The first axis to reduce to a scalar -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * (Currently, only reduction along ALL "tail" axes is supported; reduction
+     * of axis M through N, where N < num_axes - 1, is unsupported.)
+     * Suppose we have an n-axis bottom Blob with shape:
+     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+     * If axis == m, the output Blob will have shape
+     *     (d0, d1, d2, ..., d(m-1)),
+     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+     * If axis == 0 (the default), the output Blob always has the empty shape
+     * (count 1), performing reduction across the entire input --
+     * often useful for creating new loss functions.
+     * 
+ */ + int getAxis(); + + /** + * optional float coeff = 3 [default = 1]; + * + *
+     * coefficient for output
+     * 
+ */ + boolean hasCoeff(); + /** + * optional float coeff = 3 [default = 1]; + * + *
+     * coefficient for output
+     * 
+ */ + float getCoeff(); + } + /** + * Protobuf type {@code caffe.ReductionParameter} + * + *
+   * Message that stores parameters used by ReductionLayer
+   * 
+ */ + public static final class ReductionParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ReductionParameter) + ReductionParameterOrBuilder { + // Use ReductionParameter.newBuilder() to construct. + private ReductionParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ReductionParameter() { + operation_ = 1; + axis_ = 0; + coeff_ = 1F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReductionParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.ReductionParameter.ReductionOp value = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + operation_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + axis_ = input.readInt32(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + coeff_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ReductionParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReductionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReductionParameter.class, caffe.Caffe.ReductionParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.ReductionParameter.ReductionOp} + */ + public enum ReductionOp + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SUM = 1; + */ + SUM(0, 1), + /** + * ASUM = 2; + */ + ASUM(1, 2), + /** + * SUMSQ = 3; + */ + SUMSQ(2, 3), + /** + * MEAN = 4; + */ + MEAN(3, 4), + ; + + /** + * SUM = 1; + */ + public static final int SUM_VALUE = 1; + /** + * ASUM = 2; + */ + public static final int ASUM_VALUE = 2; + /** + * SUMSQ = 3; + */ + public static final int SUMSQ_VALUE = 3; + /** + * MEAN = 4; + */ + public static final int MEAN_VALUE = 4; + + + public final int getNumber() { + return value; + } + + public static ReductionOp valueOf(int value) { + switch (value) { + case 1: return SUM; + case 2: return ASUM; + case 3: return SUMSQ; + case 4: return MEAN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ReductionOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReductionOp findValueByNumber(int number) { + return ReductionOp.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.ReductionParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final ReductionOp[] VALUES = values(); + + public static ReductionOp 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 ReductionOp(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.ReductionParameter.ReductionOp) + } + + private int bitField0_; + public static final int OPERATION_FIELD_NUMBER = 1; + private int operation_; + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+     * reduction operation
+     * 
+ */ + public boolean hasOperation() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+     * reduction operation
+     * 
+ */ + public caffe.Caffe.ReductionParameter.ReductionOp getOperation() { + caffe.Caffe.ReductionParameter.ReductionOp result = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(operation_); + return result == null ? caffe.Caffe.ReductionParameter.ReductionOp.SUM : result; + } + + public static final int AXIS_FIELD_NUMBER = 2; + private int axis_; + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * The first axis to reduce to a scalar -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * (Currently, only reduction along ALL "tail" axes is supported; reduction
+     * of axis M through N, where N < num_axes - 1, is unsupported.)
+     * Suppose we have an n-axis bottom Blob with shape:
+     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+     * If axis == m, the output Blob will have shape
+     *     (d0, d1, d2, ..., d(m-1)),
+     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+     * If axis == 0 (the default), the output Blob always has the empty shape
+     * (count 1), performing reduction across the entire input --
+     * often useful for creating new loss functions.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * The first axis to reduce to a scalar -- may be negative to index from the
+     * end (e.g., -1 for the last axis).
+     * (Currently, only reduction along ALL "tail" axes is supported; reduction
+     * of axis M through N, where N < num_axes - 1, is unsupported.)
+     * Suppose we have an n-axis bottom Blob with shape:
+     *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+     * If axis == m, the output Blob will have shape
+     *     (d0, d1, d2, ..., d(m-1)),
+     * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+     * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+     * If axis == 0 (the default), the output Blob always has the empty shape
+     * (count 1), performing reduction across the entire input --
+     * often useful for creating new loss functions.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int COEFF_FIELD_NUMBER = 3; + private float coeff_; + /** + * optional float coeff = 3 [default = 1]; + * + *
+     * coefficient for output
+     * 
+ */ + public boolean hasCoeff() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float coeff = 3 [default = 1]; + * + *
+     * coefficient for output
+     * 
+ */ + public float getCoeff() { + return coeff_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, operation_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, coeff_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, operation_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, coeff_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ReductionParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReductionParameter 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.ReductionParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReductionParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ReductionParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReductionParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReductionParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ReductionParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReductionParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReductionParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ReductionParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ReductionParameter} + * + *
+     * Message that stores parameters used by ReductionLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ReductionParameter) + caffe.Caffe.ReductionParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ReductionParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReductionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReductionParameter.class, caffe.Caffe.ReductionParameter.Builder.class); + } + + // Construct using caffe.Caffe.ReductionParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + operation_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + coeff_ = 1F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ReductionParameter_descriptor; + } + + public caffe.Caffe.ReductionParameter getDefaultInstanceForType() { + return caffe.Caffe.ReductionParameter.getDefaultInstance(); + } + + public caffe.Caffe.ReductionParameter build() { + caffe.Caffe.ReductionParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ReductionParameter buildPartial() { + caffe.Caffe.ReductionParameter result = new caffe.Caffe.ReductionParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.operation_ = operation_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.coeff_ = coeff_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ReductionParameter) { + return mergeFrom((caffe.Caffe.ReductionParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ReductionParameter other) { + if (other == caffe.Caffe.ReductionParameter.getDefaultInstance()) return this; + if (other.hasOperation()) { + setOperation(other.getOperation()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasCoeff()) { + setCoeff(other.getCoeff()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ReductionParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ReductionParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int operation_ = 1; + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+       * reduction operation
+       * 
+ */ + public boolean hasOperation() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+       * reduction operation
+       * 
+ */ + public caffe.Caffe.ReductionParameter.ReductionOp getOperation() { + caffe.Caffe.ReductionParameter.ReductionOp result = caffe.Caffe.ReductionParameter.ReductionOp.valueOf(operation_); + return result == null ? caffe.Caffe.ReductionParameter.ReductionOp.SUM : result; + } + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+       * reduction operation
+       * 
+ */ + public Builder setOperation(caffe.Caffe.ReductionParameter.ReductionOp value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM]; + * + *
+       * reduction operation
+       * 
+ */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000001); + operation_ = 1; + onChanged(); + return this; + } + + private int axis_ ; + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * The first axis to reduce to a scalar -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * (Currently, only reduction along ALL "tail" axes is supported; reduction
+       * of axis M through N, where N < num_axes - 1, is unsupported.)
+       * Suppose we have an n-axis bottom Blob with shape:
+       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+       * If axis == m, the output Blob will have shape
+       *     (d0, d1, d2, ..., d(m-1)),
+       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+       * If axis == 0 (the default), the output Blob always has the empty shape
+       * (count 1), performing reduction across the entire input --
+       * often useful for creating new loss functions.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * The first axis to reduce to a scalar -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * (Currently, only reduction along ALL "tail" axes is supported; reduction
+       * of axis M through N, where N < num_axes - 1, is unsupported.)
+       * Suppose we have an n-axis bottom Blob with shape:
+       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+       * If axis == m, the output Blob will have shape
+       *     (d0, d1, d2, ..., d(m-1)),
+       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+       * If axis == 0 (the default), the output Blob always has the empty shape
+       * (count 1), performing reduction across the entire input --
+       * often useful for creating new loss functions.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * The first axis to reduce to a scalar -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * (Currently, only reduction along ALL "tail" axes is supported; reduction
+       * of axis M through N, where N < num_axes - 1, is unsupported.)
+       * Suppose we have an n-axis bottom Blob with shape:
+       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+       * If axis == m, the output Blob will have shape
+       *     (d0, d1, d2, ..., d(m-1)),
+       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+       * If axis == 0 (the default), the output Blob always has the empty shape
+       * (count 1), performing reduction across the entire input --
+       * often useful for creating new loss functions.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000002; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * The first axis to reduce to a scalar -- may be negative to index from the
+       * end (e.g., -1 for the last axis).
+       * (Currently, only reduction along ALL "tail" axes is supported; reduction
+       * of axis M through N, where N < num_axes - 1, is unsupported.)
+       * Suppose we have an n-axis bottom Blob with shape:
+       *     (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
+       * If axis == m, the output Blob will have shape
+       *     (d0, d1, d2, ..., d(m-1)),
+       * and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
+       * times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
+       * If axis == 0 (the default), the output Blob always has the empty shape
+       * (count 1), performing reduction across the entire input --
+       * often useful for creating new loss functions.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000002); + axis_ = 0; + onChanged(); + return this; + } + + private float coeff_ = 1F; + /** + * optional float coeff = 3 [default = 1]; + * + *
+       * coefficient for output
+       * 
+ */ + public boolean hasCoeff() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float coeff = 3 [default = 1]; + * + *
+       * coefficient for output
+       * 
+ */ + public float getCoeff() { + return coeff_; + } + /** + * optional float coeff = 3 [default = 1]; + * + *
+       * coefficient for output
+       * 
+ */ + public Builder setCoeff(float value) { + bitField0_ |= 0x00000004; + coeff_ = value; + onChanged(); + return this; + } + /** + * optional float coeff = 3 [default = 1]; + * + *
+       * coefficient for output
+       * 
+ */ + public Builder clearCoeff() { + bitField0_ = (bitField0_ & ~0x00000004); + coeff_ = 1F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ReductionParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ReductionParameter) + private static final caffe.Caffe.ReductionParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ReductionParameter(); + } + + public static caffe.Caffe.ReductionParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ReductionParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ReductionParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ReductionParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReLUParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ReLUParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+     * Allow non-zero slope for negative inputs to speed up optimization
+     * Described in:
+     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+     * improve neural network acoustic models. In ICML Workshop on Deep Learning
+     * for Audio, Speech, and Language Processing.
+     * 
+ */ + boolean hasNegativeSlope(); + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+     * Allow non-zero slope for negative inputs to speed up optimization
+     * Described in:
+     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+     * improve neural network acoustic models. In ICML Workshop on Deep Learning
+     * for Audio, Speech, and Language Processing.
+     * 
+ */ + float getNegativeSlope(); + + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + caffe.Caffe.ReLUParameter.Engine getEngine(); + } + /** + * Protobuf type {@code caffe.ReLUParameter} + * + *
+   * Message that stores parameters used by ReLULayer
+   * 
+ */ + public static final class ReLUParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ReLUParameter) + ReLUParameterOrBuilder { + // Use ReLUParameter.newBuilder() to construct. + private ReLUParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ReLUParameter() { + negativeSlope_ = 0F; + engine_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReLUParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + negativeSlope_ = input.readFloat(); + break; + } + case 16: { + int rawValue = input.readEnum(); + caffe.Caffe.ReLUParameter.Engine value = caffe.Caffe.ReLUParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + engine_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ReLUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReLUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReLUParameter.class, caffe.Caffe.ReLUParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.ReLUParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.ReLUParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.ReLUParameter.Engine) + } + + private int bitField0_; + public static final int NEGATIVE_SLOPE_FIELD_NUMBER = 1; + private float negativeSlope_; + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+     * Allow non-zero slope for negative inputs to speed up optimization
+     * Described in:
+     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+     * improve neural network acoustic models. In ICML Workshop on Deep Learning
+     * for Audio, Speech, and Language Processing.
+     * 
+ */ + public boolean hasNegativeSlope() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+     * Allow non-zero slope for negative inputs to speed up optimization
+     * Described in:
+     * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+     * improve neural network acoustic models. In ICML Workshop on Deep Learning
+     * for Audio, Speech, and Language Processing.
+     * 
+ */ + public float getNegativeSlope() { + return negativeSlope_; + } + + public static final int ENGINE_FIELD_NUMBER = 2; + private int engine_; + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public caffe.Caffe.ReLUParameter.Engine getEngine() { + caffe.Caffe.ReLUParameter.Engine result = caffe.Caffe.ReLUParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.ReLUParameter.Engine.DEFAULT : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, negativeSlope_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, engine_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, negativeSlope_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, engine_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ReLUParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReLUParameter 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.ReLUParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReLUParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ReLUParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReLUParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReLUParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ReLUParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReLUParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReLUParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ReLUParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ReLUParameter} + * + *
+     * Message that stores parameters used by ReLULayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ReLUParameter) + caffe.Caffe.ReLUParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ReLUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReLUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReLUParameter.class, caffe.Caffe.ReLUParameter.Builder.class); + } + + // Construct using caffe.Caffe.ReLUParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + negativeSlope_ = 0F; + bitField0_ = (bitField0_ & ~0x00000001); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ReLUParameter_descriptor; + } + + public caffe.Caffe.ReLUParameter getDefaultInstanceForType() { + return caffe.Caffe.ReLUParameter.getDefaultInstance(); + } + + public caffe.Caffe.ReLUParameter build() { + caffe.Caffe.ReLUParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ReLUParameter buildPartial() { + caffe.Caffe.ReLUParameter result = new caffe.Caffe.ReLUParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.negativeSlope_ = negativeSlope_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.engine_ = engine_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ReLUParameter) { + return mergeFrom((caffe.Caffe.ReLUParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ReLUParameter other) { + if (other == caffe.Caffe.ReLUParameter.getDefaultInstance()) return this; + if (other.hasNegativeSlope()) { + setNegativeSlope(other.getNegativeSlope()); + } + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ReLUParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ReLUParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float negativeSlope_ ; + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+       * Allow non-zero slope for negative inputs to speed up optimization
+       * Described in:
+       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+       * improve neural network acoustic models. In ICML Workshop on Deep Learning
+       * for Audio, Speech, and Language Processing.
+       * 
+ */ + public boolean hasNegativeSlope() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+       * Allow non-zero slope for negative inputs to speed up optimization
+       * Described in:
+       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+       * improve neural network acoustic models. In ICML Workshop on Deep Learning
+       * for Audio, Speech, and Language Processing.
+       * 
+ */ + public float getNegativeSlope() { + return negativeSlope_; + } + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+       * Allow non-zero slope for negative inputs to speed up optimization
+       * Described in:
+       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+       * improve neural network acoustic models. In ICML Workshop on Deep Learning
+       * for Audio, Speech, and Language Processing.
+       * 
+ */ + public Builder setNegativeSlope(float value) { + bitField0_ |= 0x00000001; + negativeSlope_ = value; + onChanged(); + return this; + } + /** + * optional float negative_slope = 1 [default = 0]; + * + *
+       * Allow non-zero slope for negative inputs to speed up optimization
+       * Described in:
+       * Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
+       * improve neural network acoustic models. In ICML Workshop on Deep Learning
+       * for Audio, Speech, and Language Processing.
+       * 
+ */ + public Builder clearNegativeSlope() { + bitField0_ = (bitField0_ & ~0x00000001); + negativeSlope_ = 0F; + onChanged(); + return this; + } + + private int engine_ = 0; + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public caffe.Caffe.ReLUParameter.Engine getEngine() { + caffe.Caffe.ReLUParameter.Engine result = caffe.Caffe.ReLUParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.ReLUParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.ReLUParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000002); + engine_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ReLUParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ReLUParameter) + private static final caffe.Caffe.ReLUParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ReLUParameter(); + } + + public static caffe.Caffe.ReLUParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ReLUParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ReLUParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ReLUParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReshapeParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ReshapeParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + boolean hasShape(); + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + caffe.Caffe.BlobShape getShape(); + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder(); + + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * axis and num_axes control the portion of the bottom blob's shape that are
+     * replaced by (included in) the reshape. By default (axis == 0 and
+     * num_axes == -1), the entire bottom blob shape is included in the reshape,
+     * and hence the shape field must specify the entire output shape.
+     * axis may be non-zero to retain some portion of the beginning of the input
+     * shape (and may be negative to index from the end; e.g., -1 to begin the
+     * reshape after the last axis, including nothing in the reshape,
+     * -2 to include only the last axis, etc.).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are all equivalent,
+     * producing a blob "output" with shape 2 x 2 x 4:
+     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+     * num_axes specifies the extent of the reshape.
+     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+     * input axes in the range [axis, axis+num_axes].
+     * num_axes may also be -1, the default, to include all remaining axes
+     * (starting from axis).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are equivalent,
+     * producing a blob "output" with shape 1 x 2 x 8.
+     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+     * On the other hand, these would produce output blob shape 2 x 1 x 8:
+     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * axis and num_axes control the portion of the bottom blob's shape that are
+     * replaced by (included in) the reshape. By default (axis == 0 and
+     * num_axes == -1), the entire bottom blob shape is included in the reshape,
+     * and hence the shape field must specify the entire output shape.
+     * axis may be non-zero to retain some portion of the beginning of the input
+     * shape (and may be negative to index from the end; e.g., -1 to begin the
+     * reshape after the last axis, including nothing in the reshape,
+     * -2 to include only the last axis, etc.).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are all equivalent,
+     * producing a blob "output" with shape 2 x 2 x 4:
+     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+     * num_axes specifies the extent of the reshape.
+     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+     * input axes in the range [axis, axis+num_axes].
+     * num_axes may also be -1, the default, to include all remaining axes
+     * (starting from axis).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are equivalent,
+     * producing a blob "output" with shape 1 x 2 x 8.
+     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+     * On the other hand, these would produce output blob shape 2 x 1 x 8:
+     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+     * 
+ */ + int getAxis(); + + /** + * optional int32 num_axes = 3 [default = -1]; + */ + boolean hasNumAxes(); + /** + * optional int32 num_axes = 3 [default = -1]; + */ + int getNumAxes(); + } + /** + * Protobuf type {@code caffe.ReshapeParameter} + */ + public static final class ReshapeParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ReshapeParameter) + ReshapeParameterOrBuilder { + // Use ReshapeParameter.newBuilder() to construct. + private ReshapeParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ReshapeParameter() { + axis_ = 0; + numAxes_ = -1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReshapeParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + 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 16: { + bitField0_ |= 0x00000002; + axis_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + numAxes_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ReshapeParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReshapeParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReshapeParameter.class, caffe.Caffe.ReshapeParameter.Builder.class); + } + + private int bitField0_; + public static final int SHAPE_FIELD_NUMBER = 1; + private caffe.Caffe.BlobShape shape_; + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + public boolean hasShape() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + public caffe.Caffe.BlobShape getShape() { + return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+     * Specify the output dimensions. If some of the dimensions are set to 0,
+     * the corresponding dimension from the bottom layer is used (unchanged).
+     * Exactly one dimension may be set to -1, in which case its value is
+     * inferred from the count of the bottom blob and the remaining dimensions.
+     * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+     *   layer {
+     *     type: "Reshape" bottom: "input" top: "output"
+     *     reshape_param { ... }
+     *   }
+     * If "input" is 2D with shape 2 x 8, then the following reshape_param
+     * specifications are all equivalent, producing a 3D blob "output" with shape
+     * 2 x 2 x 4:
+     *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+     *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+     *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+     * 
+ */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { + return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } + + public static final int AXIS_FIELD_NUMBER = 2; + private int axis_; + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * axis and num_axes control the portion of the bottom blob's shape that are
+     * replaced by (included in) the reshape. By default (axis == 0 and
+     * num_axes == -1), the entire bottom blob shape is included in the reshape,
+     * and hence the shape field must specify the entire output shape.
+     * axis may be non-zero to retain some portion of the beginning of the input
+     * shape (and may be negative to index from the end; e.g., -1 to begin the
+     * reshape after the last axis, including nothing in the reshape,
+     * -2 to include only the last axis, etc.).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are all equivalent,
+     * producing a blob "output" with shape 2 x 2 x 4:
+     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+     * num_axes specifies the extent of the reshape.
+     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+     * input axes in the range [axis, axis+num_axes].
+     * num_axes may also be -1, the default, to include all remaining axes
+     * (starting from axis).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are equivalent,
+     * producing a blob "output" with shape 1 x 2 x 8.
+     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+     * On the other hand, these would produce output blob shape 2 x 1 x 8:
+     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+     * axis and num_axes control the portion of the bottom blob's shape that are
+     * replaced by (included in) the reshape. By default (axis == 0 and
+     * num_axes == -1), the entire bottom blob shape is included in the reshape,
+     * and hence the shape field must specify the entire output shape.
+     * axis may be non-zero to retain some portion of the beginning of the input
+     * shape (and may be negative to index from the end; e.g., -1 to begin the
+     * reshape after the last axis, including nothing in the reshape,
+     * -2 to include only the last axis, etc.).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are all equivalent,
+     * producing a blob "output" with shape 2 x 2 x 4:
+     *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+     *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+     * num_axes specifies the extent of the reshape.
+     * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+     * input axes in the range [axis, axis+num_axes].
+     * num_axes may also be -1, the default, to include all remaining axes
+     * (starting from axis).
+     * For example, suppose "input" is a 2D blob with shape 2 x 8.
+     * Then the following ReshapeLayer specifications are equivalent,
+     * producing a blob "output" with shape 1 x 2 x 8.
+     *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+     *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+     *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+     * On the other hand, these would produce output blob shape 2 x 1 x 8:
+     *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+     *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int NUM_AXES_FIELD_NUMBER = 3; + private int numAxes_; + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public int getNumAxes() { + return numAxes_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getShape()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, numAxes_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getShape()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, axis_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, numAxes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ReshapeParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReshapeParameter 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.ReshapeParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ReshapeParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ReshapeParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReshapeParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReshapeParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ReshapeParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ReshapeParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ReshapeParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ReshapeParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ReshapeParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ReshapeParameter) + caffe.Caffe.ReshapeParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ReshapeParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ReshapeParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ReshapeParameter.class, caffe.Caffe.ReshapeParameter.Builder.class); + } + + // Construct using caffe.Caffe.ReshapeParameter.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(); + } + } + public Builder clear() { + super.clear(); + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shapeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + numAxes_ = -1; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ReshapeParameter_descriptor; + } + + public caffe.Caffe.ReshapeParameter getDefaultInstanceForType() { + return caffe.Caffe.ReshapeParameter.getDefaultInstance(); + } + + public caffe.Caffe.ReshapeParameter build() { + caffe.Caffe.ReshapeParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ReshapeParameter buildPartial() { + caffe.Caffe.ReshapeParameter result = new caffe.Caffe.ReshapeParameter(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 (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numAxes_ = numAxes_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ReshapeParameter) { + return mergeFrom((caffe.Caffe.ReshapeParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ReshapeParameter other) { + if (other == caffe.Caffe.ReshapeParameter.getDefaultInstance()) return this; + if (other.hasShape()) { + mergeShape(other.getShape()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasNumAxes()) { + setNumAxes(other.getNumAxes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ReshapeParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ReshapeParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private caffe.Caffe.BlobShape shape_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.BlobShape, caffe.Caffe.BlobShape.Builder, caffe.Caffe.BlobShapeOrBuilder> shapeBuilder_; + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public boolean hasShape() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public caffe.Caffe.BlobShape getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + 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 = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + 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 = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public Builder mergeShape(caffe.Caffe.BlobShape value) { + if (shapeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + shape_ != null && + 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 = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shapeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public caffe.Caffe.BlobShape.Builder getShapeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + public caffe.Caffe.BlobShapeOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + caffe.Caffe.BlobShape.getDefaultInstance() : shape_; + } + } + /** + * optional .caffe.BlobShape shape = 1; + * + *
+       * Specify the output dimensions. If some of the dimensions are set to 0,
+       * the corresponding dimension from the bottom layer is used (unchanged).
+       * Exactly one dimension may be set to -1, in which case its value is
+       * inferred from the count of the bottom blob and the remaining dimensions.
+       * For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
+       *   layer {
+       *     type: "Reshape" bottom: "input" top: "output"
+       *     reshape_param { ... }
+       *   }
+       * If "input" is 2D with shape 2 x 8, then the following reshape_param
+       * specifications are all equivalent, producing a 3D blob "output" with shape
+       * 2 x 2 x 4:
+       *   reshape_param { shape { dim:  2  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim:  4 } }
+       *   reshape_param { shape { dim:  0  dim: 2  dim: -1 } }
+       *   reshape_param { shape { dim: -1  dim: 0  dim:  2 } }
+       * 
+ */ + 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>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private int axis_ ; + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * axis and num_axes control the portion of the bottom blob's shape that are
+       * replaced by (included in) the reshape. By default (axis == 0 and
+       * num_axes == -1), the entire bottom blob shape is included in the reshape,
+       * and hence the shape field must specify the entire output shape.
+       * axis may be non-zero to retain some portion of the beginning of the input
+       * shape (and may be negative to index from the end; e.g., -1 to begin the
+       * reshape after the last axis, including nothing in the reshape,
+       * -2 to include only the last axis, etc.).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are all equivalent,
+       * producing a blob "output" with shape 2 x 2 x 4:
+       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+       * num_axes specifies the extent of the reshape.
+       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+       * input axes in the range [axis, axis+num_axes].
+       * num_axes may also be -1, the default, to include all remaining axes
+       * (starting from axis).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are equivalent,
+       * producing a blob "output" with shape 1 x 2 x 8.
+       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+       * On the other hand, these would produce output blob shape 2 x 1 x 8:
+       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * axis and num_axes control the portion of the bottom blob's shape that are
+       * replaced by (included in) the reshape. By default (axis == 0 and
+       * num_axes == -1), the entire bottom blob shape is included in the reshape,
+       * and hence the shape field must specify the entire output shape.
+       * axis may be non-zero to retain some portion of the beginning of the input
+       * shape (and may be negative to index from the end; e.g., -1 to begin the
+       * reshape after the last axis, including nothing in the reshape,
+       * -2 to include only the last axis, etc.).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are all equivalent,
+       * producing a blob "output" with shape 2 x 2 x 4:
+       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+       * num_axes specifies the extent of the reshape.
+       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+       * input axes in the range [axis, axis+num_axes].
+       * num_axes may also be -1, the default, to include all remaining axes
+       * (starting from axis).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are equivalent,
+       * producing a blob "output" with shape 1 x 2 x 8.
+       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+       * On the other hand, these would produce output blob shape 2 x 1 x 8:
+       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * axis and num_axes control the portion of the bottom blob's shape that are
+       * replaced by (included in) the reshape. By default (axis == 0 and
+       * num_axes == -1), the entire bottom blob shape is included in the reshape,
+       * and hence the shape field must specify the entire output shape.
+       * axis may be non-zero to retain some portion of the beginning of the input
+       * shape (and may be negative to index from the end; e.g., -1 to begin the
+       * reshape after the last axis, including nothing in the reshape,
+       * -2 to include only the last axis, etc.).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are all equivalent,
+       * producing a blob "output" with shape 2 x 2 x 4:
+       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+       * num_axes specifies the extent of the reshape.
+       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+       * input axes in the range [axis, axis+num_axes].
+       * num_axes may also be -1, the default, to include all remaining axes
+       * (starting from axis).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are equivalent,
+       * producing a blob "output" with shape 1 x 2 x 8.
+       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+       * On the other hand, these would produce output blob shape 2 x 1 x 8:
+       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000002; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 2 [default = 0]; + * + *
+       * axis and num_axes control the portion of the bottom blob's shape that are
+       * replaced by (included in) the reshape. By default (axis == 0 and
+       * num_axes == -1), the entire bottom blob shape is included in the reshape,
+       * and hence the shape field must specify the entire output shape.
+       * axis may be non-zero to retain some portion of the beginning of the input
+       * shape (and may be negative to index from the end; e.g., -1 to begin the
+       * reshape after the last axis, including nothing in the reshape,
+       * -2 to include only the last axis, etc.).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are all equivalent,
+       * producing a blob "output" with shape 2 x 2 x 4:
+       *   reshape_param { shape { dim: 2  dim: 2  dim: 4 } }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis:  1 }
+       *   reshape_param { shape { dim: 2  dim: 4 } axis: -3 }
+       * num_axes specifies the extent of the reshape.
+       * If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
+       * input axes in the range [axis, axis+num_axes].
+       * num_axes may also be -1, the default, to include all remaining axes
+       * (starting from axis).
+       * For example, suppose "input" is a 2D blob with shape 2 x 8.
+       * Then the following ReshapeLayer specifications are equivalent,
+       * producing a blob "output" with shape 1 x 2 x 8.
+       *   reshape_param { shape { dim:  1  dim: 2  dim:  8 } }
+       *   reshape_param { shape { dim:  1  dim: 2  }  num_axes: 1 }
+       *   reshape_param { shape { dim:  1  }  num_axes: 0 }
+       * On the other hand, these would produce output blob shape 2 x 1 x 8:
+       *   reshape_param { shape { dim: 2  dim: 1  dim: 8  }  }
+       *   reshape_param { shape { dim: 1 }  axis: 1  num_axes: 0 }
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000002); + axis_ = 0; + onChanged(); + return this; + } + + private int numAxes_ = -1; + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public int getNumAxes() { + return numAxes_; + } + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public Builder setNumAxes(int value) { + bitField0_ |= 0x00000004; + numAxes_ = value; + onChanged(); + return this; + } + /** + * optional int32 num_axes = 3 [default = -1]; + */ + public Builder clearNumAxes() { + bitField0_ = (bitField0_ & ~0x00000004); + numAxes_ = -1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ReshapeParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ReshapeParameter) + private static final caffe.Caffe.ReshapeParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ReshapeParameter(); + } + + public static caffe.Caffe.ReshapeParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ReshapeParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ReshapeParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ReshapeParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ScaleParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ScaleParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar multiplier.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar multiplier.
+     * 
+ */ + int getAxis(); + + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the scale
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+     * 
+ */ + boolean hasNumAxes(); + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the scale
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+     * 
+ */ + int getNumAxes(); + + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + boolean hasFiller(); + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + caffe.Caffe.FillerParameter getFiller(); + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder(); + + /** + * optional bool bias_term = 4 [default = false]; + * + *
+     * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+     * may be more efficient).  Initialized with bias_filler (defaults to 0).
+     * 
+ */ + boolean hasBiasTerm(); + /** + * optional bool bias_term = 4 [default = false]; + * + *
+     * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+     * may be more efficient).  Initialized with bias_filler (defaults to 0).
+     * 
+ */ + boolean getBiasTerm(); + + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + boolean hasBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + caffe.Caffe.FillerParameter getBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); + } + /** + * Protobuf type {@code caffe.ScaleParameter} + */ + public static final class ScaleParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ScaleParameter) + ScaleParameterOrBuilder { + // Use ScaleParameter.newBuilder() to construct. + private ScaleParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ScaleParameter() { + axis_ = 1; + numAxes_ = 1; + biasTerm_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ScaleParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + axis_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + numAxes_ = input.readInt32(); + break; + } + case 26: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = filler_.toBuilder(); + } + filler_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filler_); + filler_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 32: { + bitField0_ |= 0x00000008; + biasTerm_ = input.readBool(); + break; + } + case 42: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = biasFiller_.toBuilder(); + } + biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(biasFiller_); + biasFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ScaleParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ScaleParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ScaleParameter.class, caffe.Caffe.ScaleParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 1; + private int axis_; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar multiplier.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The first axis of bottom[0] (the first input Blob) along which to apply
+     * bottom[1] (the second input Blob).  May be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+     * top[0] will have the same shape, and bottom[1] may have any of the
+     * following shapes (for the given value of axis):
+     *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+     *    (axis == 1 == -3)          3;     3x40;     3x40x60
+     *    (axis == 2 == -2)                   40;       40x60
+     *    (axis == 3 == -1)                                60
+     * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+     * "axis") -- a scalar multiplier.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int NUM_AXES_FIELD_NUMBER = 2; + private int numAxes_; + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the scale
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+     * 
+ */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+     * (num_axes is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+     * number of axes by the second bottom.)
+     * The number of axes of the input (bottom[0]) covered by the scale
+     * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+     * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+     * 
+ */ + public int getNumAxes() { + return numAxes_; + } + + public static final int FILLER_FIELD_NUMBER = 3; + private caffe.Caffe.FillerParameter filler_; + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+     * (filler is ignored unless just one bottom is given and the scale is
+     * a learned parameter of the layer.)
+     * The initialization for the learned scale parameter.
+     * Default is the unit (1) initialization, resulting in the ScaleLayer
+     * initially performing the identity operation.
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + + public static final int BIAS_TERM_FIELD_NUMBER = 4; + private boolean biasTerm_; + /** + * optional bool bias_term = 4 [default = false]; + * + *
+     * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+     * may be more efficient).  Initialized with bias_filler (defaults to 0).
+     * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool bias_term = 4 [default = false]; + * + *
+     * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+     * may be more efficient).  Initialized with bias_filler (defaults to 0).
+     * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + + public static final int BIAS_FILLER_FIELD_NUMBER = 5; + private caffe.Caffe.FillerParameter biasFiller_; + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public caffe.Caffe.FillerParameter getBiasFiller() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, numAxes_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, getFiller()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, biasTerm_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, getBiasFiller()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, numAxes_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFiller()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, biasTerm_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBiasFiller()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ScaleParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ScaleParameter 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.ScaleParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ScaleParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ScaleParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ScaleParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ScaleParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ScaleParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ScaleParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ScaleParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ScaleParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ScaleParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ScaleParameter) + caffe.Caffe.ScaleParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ScaleParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ScaleParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ScaleParameter.class, caffe.Caffe.ScaleParameter.Builder.class); + } + + // Construct using caffe.Caffe.ScaleParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFillerFieldBuilder(); + getBiasFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + numAxes_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + if (fillerBuilder_ == null) { + filler_ = null; + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + biasTerm_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ScaleParameter_descriptor; + } + + public caffe.Caffe.ScaleParameter getDefaultInstanceForType() { + return caffe.Caffe.ScaleParameter.getDefaultInstance(); + } + + public caffe.Caffe.ScaleParameter build() { + caffe.Caffe.ScaleParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ScaleParameter buildPartial() { + caffe.Caffe.ScaleParameter result = new caffe.Caffe.ScaleParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.numAxes_ = numAxes_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (fillerBuilder_ == null) { + result.filler_ = filler_; + } else { + result.filler_ = fillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.biasTerm_ = biasTerm_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (biasFillerBuilder_ == null) { + result.biasFiller_ = biasFiller_; + } else { + result.biasFiller_ = biasFillerBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ScaleParameter) { + return mergeFrom((caffe.Caffe.ScaleParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ScaleParameter other) { + if (other == caffe.Caffe.ScaleParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasNumAxes()) { + setNumAxes(other.getNumAxes()); + } + if (other.hasFiller()) { + mergeFiller(other.getFiller()); + } + if (other.hasBiasTerm()) { + setBiasTerm(other.getBiasTerm()); + } + if (other.hasBiasFiller()) { + mergeBiasFiller(other.getBiasFiller()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ScaleParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ScaleParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar multiplier.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar multiplier.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar multiplier.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The first axis of bottom[0] (the first input Blob) along which to apply
+       * bottom[1] (the second input Blob).  May be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * For example, if bottom[0] is 4D with shape 100x3x40x60, the output
+       * top[0] will have the same shape, and bottom[1] may have any of the
+       * following shapes (for the given value of axis):
+       *    (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
+       *    (axis == 1 == -3)          3;     3x40;     3x40x60
+       *    (axis == 2 == -2)                   40;       40x60
+       *    (axis == 3 == -1)                                60
+       * Furthermore, bottom[1] may have the empty shape (regardless of the value of
+       * "axis") -- a scalar multiplier.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private int numAxes_ = 1; + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the scale
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+       * 
+ */ + public boolean hasNumAxes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the scale
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+       * 
+ */ + public int getNumAxes() { + return numAxes_; + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the scale
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+       * 
+ */ + public Builder setNumAxes(int value) { + bitField0_ |= 0x00000002; + numAxes_ = value; + onChanged(); + return this; + } + /** + * optional int32 num_axes = 2 [default = 1]; + * + *
+       * (num_axes is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.  Otherwise, num_axes is determined by the
+       * number of axes by the second bottom.)
+       * The number of axes of the input (bottom[0]) covered by the scale
+       * parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
+       * Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
+       * 
+ */ + public Builder clearNumAxes() { + bitField0_ = (bitField0_ & ~0x00000002); + numAxes_ = 1; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter filler_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> fillerBuilder_; + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + if (fillerBuilder_ == null) { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } else { + return fillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder setFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filler_ = value; + onChanged(); + } else { + fillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder setFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (fillerBuilder_ == null) { + filler_ = builderForValue.build(); + onChanged(); + } else { + fillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder mergeFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + filler_ != null && + filler_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + filler_ = + caffe.Caffe.FillerParameter.newBuilder(filler_).mergeFrom(value).buildPartial(); + } else { + filler_ = value; + } + onChanged(); + } else { + fillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public Builder clearFiller() { + if (fillerBuilder_ == null) { + filler_ = null; + onChanged(); + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getFillerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + if (fillerBuilder_ != null) { + return fillerBuilder_.getMessageOrBuilder(); + } else { + return filler_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + } + /** + * optional .caffe.FillerParameter filler = 3; + * + *
+       * (filler is ignored unless just one bottom is given and the scale is
+       * a learned parameter of the layer.)
+       * The initialization for the learned scale parameter.
+       * Default is the unit (1) initialization, resulting in the ScaleLayer
+       * initially performing the identity operation.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getFillerFieldBuilder() { + if (fillerBuilder_ == null) { + fillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getFiller(), + getParentForChildren(), + isClean()); + filler_ = null; + } + return fillerBuilder_; + } + + private boolean biasTerm_ ; + /** + * optional bool bias_term = 4 [default = false]; + * + *
+       * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+       * may be more efficient).  Initialized with bias_filler (defaults to 0).
+       * 
+ */ + public boolean hasBiasTerm() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool bias_term = 4 [default = false]; + * + *
+       * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+       * may be more efficient).  Initialized with bias_filler (defaults to 0).
+       * 
+ */ + public boolean getBiasTerm() { + return biasTerm_; + } + /** + * optional bool bias_term = 4 [default = false]; + * + *
+       * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+       * may be more efficient).  Initialized with bias_filler (defaults to 0).
+       * 
+ */ + public Builder setBiasTerm(boolean value) { + bitField0_ |= 0x00000008; + biasTerm_ = value; + onChanged(); + return this; + } + /** + * optional bool bias_term = 4 [default = false]; + * + *
+       * Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
+       * may be more efficient).  Initialized with bias_filler (defaults to 0).
+       * 
+ */ + public Builder clearBiasTerm() { + bitField0_ = (bitField0_ & ~0x00000008); + biasTerm_ = false; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter biasFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public caffe.Caffe.FillerParameter getBiasFiller() { + if (biasFillerBuilder_ == null) { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } else { + return biasFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasFiller_ = value; + onChanged(); + } else { + biasFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public Builder setBiasFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (biasFillerBuilder_ == null) { + biasFiller_ = builderForValue.build(); + onChanged(); + } else { + biasFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + biasFiller_ != null && + biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + biasFiller_ = + caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); + } else { + biasFiller_ = value; + } + onChanged(); + } else { + biasFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public Builder clearBiasFiller() { + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + onChanged(); + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBiasFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + if (biasFillerBuilder_ != null) { + return biasFillerBuilder_.getMessageOrBuilder(); + } else { + return biasFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + } + /** + * optional .caffe.FillerParameter bias_filler = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getBiasFillerFieldBuilder() { + if (biasFillerBuilder_ == null) { + biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getBiasFiller(), + getParentForChildren(), + isClean()); + biasFiller_ = null; + } + return biasFillerBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.ScaleParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ScaleParameter) + private static final caffe.Caffe.ScaleParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ScaleParameter(); + } + + public static caffe.Caffe.ScaleParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ScaleParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ScaleParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ScaleParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SigmoidParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SigmoidParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + caffe.Caffe.SigmoidParameter.Engine getEngine(); + } + /** + * Protobuf type {@code caffe.SigmoidParameter} + */ + public static final class SigmoidParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.SigmoidParameter) + SigmoidParameterOrBuilder { + // Use SigmoidParameter.newBuilder() to construct. + private SigmoidParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SigmoidParameter() { + engine_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SigmoidParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.SigmoidParameter.Engine value = caffe.Caffe.SigmoidParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + engine_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_SigmoidParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SigmoidParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SigmoidParameter.class, caffe.Caffe.SigmoidParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.SigmoidParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.SigmoidParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.SigmoidParameter.Engine) + } + + private int bitField0_; + public static final int ENGINE_FIELD_NUMBER = 1; + private int engine_; + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.SigmoidParameter.Engine getEngine() { + caffe.Caffe.SigmoidParameter.Engine result = caffe.Caffe.SigmoidParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SigmoidParameter.Engine.DEFAULT : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, engine_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, engine_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.SigmoidParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SigmoidParameter 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.SigmoidParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SigmoidParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.SigmoidParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SigmoidParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.SigmoidParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.SigmoidParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.SigmoidParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SigmoidParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SigmoidParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.SigmoidParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.SigmoidParameter) + caffe.Caffe.SigmoidParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_SigmoidParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SigmoidParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SigmoidParameter.class, caffe.Caffe.SigmoidParameter.Builder.class); + } + + // Construct using caffe.Caffe.SigmoidParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_SigmoidParameter_descriptor; + } + + public caffe.Caffe.SigmoidParameter getDefaultInstanceForType() { + return caffe.Caffe.SigmoidParameter.getDefaultInstance(); + } + + public caffe.Caffe.SigmoidParameter build() { + caffe.Caffe.SigmoidParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.SigmoidParameter buildPartial() { + caffe.Caffe.SigmoidParameter result = new caffe.Caffe.SigmoidParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.engine_ = engine_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.SigmoidParameter) { + return mergeFrom((caffe.Caffe.SigmoidParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.SigmoidParameter other) { + if (other == caffe.Caffe.SigmoidParameter.getDefaultInstance()) return this; + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.SigmoidParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.SigmoidParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int engine_ = 0; + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.SigmoidParameter.Engine getEngine() { + caffe.Caffe.SigmoidParameter.Engine result = caffe.Caffe.SigmoidParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SigmoidParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.SigmoidParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000001); + engine_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.SigmoidParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.SigmoidParameter) + private static final caffe.Caffe.SigmoidParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SigmoidParameter(); + } + + public static caffe.Caffe.SigmoidParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SigmoidParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SigmoidParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SigmoidParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SliceParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SliceParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 3 [default = 1]; + * + *
+     * The axis along which to slice -- may be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 3 [default = 1]; + * + *
+     * The axis along which to slice -- may be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + int getAxis(); + + /** + * repeated uint32 slice_point = 2; + */ + java.util.List getSlicePointList(); + /** + * repeated uint32 slice_point = 2; + */ + int getSlicePointCount(); + /** + * repeated uint32 slice_point = 2; + */ + int getSlicePoint(int index); + + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + boolean hasSliceDim(); + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + int getSliceDim(); + } + /** + * Protobuf type {@code caffe.SliceParameter} + */ + public static final class SliceParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.SliceParameter) + SliceParameterOrBuilder { + // Use SliceParameter.newBuilder() to construct. + private SliceParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SliceParameter() { + axis_ = 1; + slicePoint_ = java.util.Collections.emptyList(); + sliceDim_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SliceParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + sliceDim_ = input.readUInt32(); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + slicePoint_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + slicePoint_.add(input.readUInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { + slicePoint_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + slicePoint_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 24: { + bitField0_ |= 0x00000001; + axis_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + slicePoint_ = java.util.Collections.unmodifiableList(slicePoint_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SliceParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SliceParameter.class, caffe.Caffe.SliceParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 3; + private int axis_; + /** + * optional int32 axis = 3 [default = 1]; + * + *
+     * The axis along which to slice -- may be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 3 [default = 1]; + * + *
+     * The axis along which to slice -- may be negative to index from the end
+     * (e.g., -1 for the last axis).
+     * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int SLICE_POINT_FIELD_NUMBER = 2; + private java.util.List slicePoint_; + /** + * repeated uint32 slice_point = 2; + */ + public java.util.List + getSlicePointList() { + return slicePoint_; + } + /** + * repeated uint32 slice_point = 2; + */ + public int getSlicePointCount() { + return slicePoint_.size(); + } + /** + * repeated uint32 slice_point = 2; + */ + public int getSlicePoint(int index) { + return slicePoint_.get(index); + } + + public static final int SLICE_DIM_FIELD_NUMBER = 1; + private int sliceDim_; + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + public boolean hasSliceDim() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+     * DEPRECATED: alias for "axis" -- does not support negative indexing.
+     * 
+ */ + public int getSliceDim() { + return sliceDim_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(1, sliceDim_); + } + for (int i = 0; i < slicePoint_.size(); i++) { + output.writeUInt32(2, slicePoint_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(3, axis_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, sliceDim_); + } + { + int dataSize = 0; + for (int i = 0; i < slicePoint_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(slicePoint_.get(i)); + } + size += dataSize; + size += 1 * getSlicePointList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, axis_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.SliceParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SliceParameter 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.SliceParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SliceParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.SliceParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SliceParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.SliceParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.SliceParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.SliceParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SliceParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SliceParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.SliceParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.SliceParameter) + caffe.Caffe.SliceParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SliceParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SliceParameter.class, caffe.Caffe.SliceParameter.Builder.class); + } + + // Construct using caffe.Caffe.SliceParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + slicePoint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + sliceDim_ = 1; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_SliceParameter_descriptor; + } + + public caffe.Caffe.SliceParameter getDefaultInstanceForType() { + return caffe.Caffe.SliceParameter.getDefaultInstance(); + } + + public caffe.Caffe.SliceParameter build() { + caffe.Caffe.SliceParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.SliceParameter buildPartial() { + caffe.Caffe.SliceParameter result = new caffe.Caffe.SliceParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + slicePoint_ = java.util.Collections.unmodifiableList(slicePoint_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.slicePoint_ = slicePoint_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.sliceDim_ = sliceDim_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.SliceParameter) { + return mergeFrom((caffe.Caffe.SliceParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.SliceParameter other) { + if (other == caffe.Caffe.SliceParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (!other.slicePoint_.isEmpty()) { + if (slicePoint_.isEmpty()) { + slicePoint_ = other.slicePoint_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSlicePointIsMutable(); + slicePoint_.addAll(other.slicePoint_); + } + onChanged(); + } + if (other.hasSliceDim()) { + setSliceDim(other.getSliceDim()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.SliceParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.SliceParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 3 [default = 1]; + * + *
+       * The axis along which to slice -- may be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 3 [default = 1]; + * + *
+       * The axis along which to slice -- may be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 3 [default = 1]; + * + *
+       * The axis along which to slice -- may be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 3 [default = 1]; + * + *
+       * The axis along which to slice -- may be negative to index from the end
+       * (e.g., -1 for the last axis).
+       * By default, SliceLayer concatenates blobs along the "channels" axis (1).
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private java.util.List slicePoint_ = java.util.Collections.emptyList(); + private void ensureSlicePointIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + slicePoint_ = new java.util.ArrayList(slicePoint_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated uint32 slice_point = 2; + */ + public java.util.List + getSlicePointList() { + return java.util.Collections.unmodifiableList(slicePoint_); + } + /** + * repeated uint32 slice_point = 2; + */ + public int getSlicePointCount() { + return slicePoint_.size(); + } + /** + * repeated uint32 slice_point = 2; + */ + public int getSlicePoint(int index) { + return slicePoint_.get(index); + } + /** + * repeated uint32 slice_point = 2; + */ + public Builder setSlicePoint( + int index, int value) { + ensureSlicePointIsMutable(); + slicePoint_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 slice_point = 2; + */ + public Builder addSlicePoint(int value) { + ensureSlicePointIsMutable(); + slicePoint_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 slice_point = 2; + */ + public Builder addAllSlicePoint( + java.lang.Iterable values) { + ensureSlicePointIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, slicePoint_); + onChanged(); + return this; + } + /** + * repeated uint32 slice_point = 2; + */ + public Builder clearSlicePoint() { + slicePoint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private int sliceDim_ = 1; + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public boolean hasSliceDim() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public int getSliceDim() { + return sliceDim_; + } + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public Builder setSliceDim(int value) { + bitField0_ |= 0x00000004; + sliceDim_ = value; + onChanged(); + return this; + } + /** + * optional uint32 slice_dim = 1 [default = 1]; + * + *
+       * DEPRECATED: alias for "axis" -- does not support negative indexing.
+       * 
+ */ + public Builder clearSliceDim() { + bitField0_ = (bitField0_ & ~0x00000004); + sliceDim_ = 1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.SliceParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.SliceParameter) + private static final caffe.Caffe.SliceParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SliceParameter(); + } + + public static caffe.Caffe.SliceParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SliceParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SliceParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SliceParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SoftmaxParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SoftmaxParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + caffe.Caffe.SoftmaxParameter.Engine getEngine(); + + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to perform the softmax -- may be negative to index
+     * from the end (e.g., -1 for the last axis).
+     * Any other axes will be evaluated as independent softmaxes.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to perform the softmax -- may be negative to index
+     * from the end (e.g., -1 for the last axis).
+     * Any other axes will be evaluated as independent softmaxes.
+     * 
+ */ + int getAxis(); + } + /** + * Protobuf type {@code caffe.SoftmaxParameter} + * + *
+   * Message that stores parameters used by SoftmaxLayer, SoftmaxWithLossLayer
+   * 
+ */ + public static final class SoftmaxParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.SoftmaxParameter) + SoftmaxParameterOrBuilder { + // Use SoftmaxParameter.newBuilder() to construct. + private SoftmaxParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SoftmaxParameter() { + engine_ = 0; + axis_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SoftmaxParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.SoftmaxParameter.Engine value = caffe.Caffe.SoftmaxParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + engine_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + axis_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_SoftmaxParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SoftmaxParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SoftmaxParameter.class, caffe.Caffe.SoftmaxParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.SoftmaxParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.SoftmaxParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.SoftmaxParameter.Engine) + } + + private int bitField0_; + public static final int ENGINE_FIELD_NUMBER = 1; + private int engine_; + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.SoftmaxParameter.Engine getEngine() { + caffe.Caffe.SoftmaxParameter.Engine result = caffe.Caffe.SoftmaxParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SoftmaxParameter.Engine.DEFAULT : result; + } + + public static final int AXIS_FIELD_NUMBER = 2; + private int axis_; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to perform the softmax -- may be negative to index
+     * from the end (e.g., -1 for the last axis).
+     * Any other axes will be evaluated as independent softmaxes.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+     * The axis along which to perform the softmax -- may be negative to index
+     * from the end (e.g., -1 for the last axis).
+     * Any other axes will be evaluated as independent softmaxes.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, engine_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, axis_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, engine_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, axis_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.SoftmaxParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SoftmaxParameter 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.SoftmaxParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SoftmaxParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.SoftmaxParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SoftmaxParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.SoftmaxParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.SoftmaxParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.SoftmaxParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SoftmaxParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SoftmaxParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.SoftmaxParameter} + * + *
+     * Message that stores parameters used by SoftmaxLayer, SoftmaxWithLossLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.SoftmaxParameter) + caffe.Caffe.SoftmaxParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_SoftmaxParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SoftmaxParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SoftmaxParameter.class, caffe.Caffe.SoftmaxParameter.Builder.class); + } + + // Construct using caffe.Caffe.SoftmaxParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_SoftmaxParameter_descriptor; + } + + public caffe.Caffe.SoftmaxParameter getDefaultInstanceForType() { + return caffe.Caffe.SoftmaxParameter.getDefaultInstance(); + } + + public caffe.Caffe.SoftmaxParameter build() { + caffe.Caffe.SoftmaxParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.SoftmaxParameter buildPartial() { + caffe.Caffe.SoftmaxParameter result = new caffe.Caffe.SoftmaxParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.engine_ = engine_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.axis_ = axis_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.SoftmaxParameter) { + return mergeFrom((caffe.Caffe.SoftmaxParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.SoftmaxParameter other) { + if (other == caffe.Caffe.SoftmaxParameter.getDefaultInstance()) return this; + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.SoftmaxParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.SoftmaxParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int engine_ = 0; + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.SoftmaxParameter.Engine getEngine() { + caffe.Caffe.SoftmaxParameter.Engine result = caffe.Caffe.SoftmaxParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SoftmaxParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.SoftmaxParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000001); + engine_ = 0; + onChanged(); + return this; + } + + private int axis_ = 1; + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to perform the softmax -- may be negative to index
+       * from the end (e.g., -1 for the last axis).
+       * Any other axes will be evaluated as independent softmaxes.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to perform the softmax -- may be negative to index
+       * from the end (e.g., -1 for the last axis).
+       * Any other axes will be evaluated as independent softmaxes.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to perform the softmax -- may be negative to index
+       * from the end (e.g., -1 for the last axis).
+       * Any other axes will be evaluated as independent softmaxes.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000002; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 2 [default = 1]; + * + *
+       * The axis along which to perform the softmax -- may be negative to index
+       * from the end (e.g., -1 for the last axis).
+       * Any other axes will be evaluated as independent softmaxes.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000002); + axis_ = 1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.SoftmaxParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.SoftmaxParameter) + private static final caffe.Caffe.SoftmaxParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SoftmaxParameter(); + } + + public static caffe.Caffe.SoftmaxParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SoftmaxParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SoftmaxParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SoftmaxParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TanHParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.TanHParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + caffe.Caffe.TanHParameter.Engine getEngine(); + } + /** + * Protobuf type {@code caffe.TanHParameter} + */ + public static final class TanHParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.TanHParameter) + TanHParameterOrBuilder { + // Use TanHParameter.newBuilder() to construct. + private TanHParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TanHParameter() { + engine_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TanHParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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.TanHParameter.Engine value = caffe.Caffe.TanHParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + engine_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_TanHParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TanHParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TanHParameter.class, caffe.Caffe.TanHParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.TanHParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.TanHParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.TanHParameter.Engine) + } + + private int bitField0_; + public static final int ENGINE_FIELD_NUMBER = 1; + private int engine_; + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.TanHParameter.Engine getEngine() { + caffe.Caffe.TanHParameter.Engine result = caffe.Caffe.TanHParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.TanHParameter.Engine.DEFAULT : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, engine_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, engine_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.TanHParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TanHParameter 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.TanHParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TanHParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.TanHParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TanHParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.TanHParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.TanHParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.TanHParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TanHParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.TanHParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.TanHParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.TanHParameter) + caffe.Caffe.TanHParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_TanHParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TanHParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TanHParameter.class, caffe.Caffe.TanHParameter.Builder.class); + } + + // Construct using caffe.Caffe.TanHParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_TanHParameter_descriptor; + } + + public caffe.Caffe.TanHParameter getDefaultInstanceForType() { + return caffe.Caffe.TanHParameter.getDefaultInstance(); + } + + public caffe.Caffe.TanHParameter build() { + caffe.Caffe.TanHParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.TanHParameter buildPartial() { + caffe.Caffe.TanHParameter result = new caffe.Caffe.TanHParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.engine_ = engine_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.TanHParameter) { + return mergeFrom((caffe.Caffe.TanHParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.TanHParameter other) { + if (other == caffe.Caffe.TanHParameter.getDefaultInstance()) return this; + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.TanHParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.TanHParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int engine_ = 0; + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public caffe.Caffe.TanHParameter.Engine getEngine() { + caffe.Caffe.TanHParameter.Engine result = caffe.Caffe.TanHParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.TanHParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.TanHParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000001); + engine_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.TanHParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.TanHParameter) + private static final caffe.Caffe.TanHParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.TanHParameter(); + } + + public static caffe.Caffe.TanHParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TanHParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TanHParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.TanHParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TileParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.TileParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The index of the axis to tile.
+     * 
+ */ + boolean hasAxis(); + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The index of the axis to tile.
+     * 
+ */ + int getAxis(); + + /** + * optional int32 tiles = 2; + * + *
+     * The number of copies (tiles) of the blob to output.
+     * 
+ */ + boolean hasTiles(); + /** + * optional int32 tiles = 2; + * + *
+     * The number of copies (tiles) of the blob to output.
+     * 
+ */ + int getTiles(); + } + /** + * Protobuf type {@code caffe.TileParameter} + * + *
+   * Message that stores parameters used by TileLayer
+   * 
+ */ + public static final class TileParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.TileParameter) + TileParameterOrBuilder { + // Use TileParameter.newBuilder() to construct. + private TileParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TileParameter() { + axis_ = 1; + tiles_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TileParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + axis_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + tiles_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_TileParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TileParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TileParameter.class, caffe.Caffe.TileParameter.Builder.class); + } + + private int bitField0_; + public static final int AXIS_FIELD_NUMBER = 1; + private int axis_; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The index of the axis to tile.
+     * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+     * The index of the axis to tile.
+     * 
+ */ + public int getAxis() { + return axis_; + } + + public static final int TILES_FIELD_NUMBER = 2; + private int tiles_; + /** + * optional int32 tiles = 2; + * + *
+     * The number of copies (tiles) of the blob to output.
+     * 
+ */ + public boolean hasTiles() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 tiles = 2; + * + *
+     * The number of copies (tiles) of the blob to output.
+     * 
+ */ + public int getTiles() { + return tiles_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, tiles_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, axis_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, tiles_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.TileParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TileParameter 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.TileParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.TileParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.TileParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TileParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.TileParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.TileParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.TileParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.TileParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.TileParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.TileParameter} + * + *
+     * Message that stores parameters used by TileLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.TileParameter) + caffe.Caffe.TileParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_TileParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_TileParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.TileParameter.class, caffe.Caffe.TileParameter.Builder.class); + } + + // Construct using caffe.Caffe.TileParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + axis_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + tiles_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_TileParameter_descriptor; + } + + public caffe.Caffe.TileParameter getDefaultInstanceForType() { + return caffe.Caffe.TileParameter.getDefaultInstance(); + } + + public caffe.Caffe.TileParameter build() { + caffe.Caffe.TileParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.TileParameter buildPartial() { + caffe.Caffe.TileParameter result = new caffe.Caffe.TileParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.axis_ = axis_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.tiles_ = tiles_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.TileParameter) { + return mergeFrom((caffe.Caffe.TileParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.TileParameter other) { + if (other == caffe.Caffe.TileParameter.getDefaultInstance()) return this; + if (other.hasAxis()) { + setAxis(other.getAxis()); + } + if (other.hasTiles()) { + setTiles(other.getTiles()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.TileParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.TileParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int axis_ = 1; + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The index of the axis to tile.
+       * 
+ */ + public boolean hasAxis() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The index of the axis to tile.
+       * 
+ */ + public int getAxis() { + return axis_; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The index of the axis to tile.
+       * 
+ */ + public Builder setAxis(int value) { + bitField0_ |= 0x00000001; + axis_ = value; + onChanged(); + return this; + } + /** + * optional int32 axis = 1 [default = 1]; + * + *
+       * The index of the axis to tile.
+       * 
+ */ + public Builder clearAxis() { + bitField0_ = (bitField0_ & ~0x00000001); + axis_ = 1; + onChanged(); + return this; + } + + private int tiles_ ; + /** + * optional int32 tiles = 2; + * + *
+       * The number of copies (tiles) of the blob to output.
+       * 
+ */ + public boolean hasTiles() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 tiles = 2; + * + *
+       * The number of copies (tiles) of the blob to output.
+       * 
+ */ + public int getTiles() { + return tiles_; + } + /** + * optional int32 tiles = 2; + * + *
+       * The number of copies (tiles) of the blob to output.
+       * 
+ */ + public Builder setTiles(int value) { + bitField0_ |= 0x00000002; + tiles_ = value; + onChanged(); + return this; + } + /** + * optional int32 tiles = 2; + * + *
+       * The number of copies (tiles) of the blob to output.
+       * 
+ */ + public Builder clearTiles() { + bitField0_ = (bitField0_ & ~0x00000002); + tiles_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.TileParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.TileParameter) + private static final caffe.Caffe.TileParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.TileParameter(); + } + + public static caffe.Caffe.TileParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TileParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TileParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.TileParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ThresholdParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.ThresholdParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float threshold = 1 [default = 0]; + * + *
+     * Strictly positive values
+     * 
+ */ + boolean hasThreshold(); + /** + * optional float threshold = 1 [default = 0]; + * + *
+     * Strictly positive values
+     * 
+ */ + float getThreshold(); + } + /** + * Protobuf type {@code caffe.ThresholdParameter} + * + *
+   * Message that stores parameters used by ThresholdLayer
+   * 
+ */ + public static final class ThresholdParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.ThresholdParameter) + ThresholdParameterOrBuilder { + // Use ThresholdParameter.newBuilder() to construct. + private ThresholdParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ThresholdParameter() { + threshold_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ThresholdParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 13: { + bitField0_ |= 0x00000001; + threshold_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_ThresholdParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ThresholdParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ThresholdParameter.class, caffe.Caffe.ThresholdParameter.Builder.class); + } + + private int bitField0_; + public static final int THRESHOLD_FIELD_NUMBER = 1; + private float threshold_; + /** + * optional float threshold = 1 [default = 0]; + * + *
+     * Strictly positive values
+     * 
+ */ + public boolean hasThreshold() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float threshold = 1 [default = 0]; + * + *
+     * Strictly positive values
+     * 
+ */ + public float getThreshold() { + return threshold_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeFloat(1, threshold_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, threshold_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.ThresholdParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ThresholdParameter 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.ThresholdParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.ThresholdParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.ThresholdParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ThresholdParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.ThresholdParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.ThresholdParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.ThresholdParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.ThresholdParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.ThresholdParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.ThresholdParameter} + * + *
+     * Message that stores parameters used by ThresholdLayer
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.ThresholdParameter) + caffe.Caffe.ThresholdParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_ThresholdParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_ThresholdParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.ThresholdParameter.class, caffe.Caffe.ThresholdParameter.Builder.class); + } + + // Construct using caffe.Caffe.ThresholdParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + threshold_ = 0F; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_ThresholdParameter_descriptor; + } + + public caffe.Caffe.ThresholdParameter getDefaultInstanceForType() { + return caffe.Caffe.ThresholdParameter.getDefaultInstance(); + } + + public caffe.Caffe.ThresholdParameter build() { + caffe.Caffe.ThresholdParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.ThresholdParameter buildPartial() { + caffe.Caffe.ThresholdParameter result = new caffe.Caffe.ThresholdParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.threshold_ = threshold_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.ThresholdParameter) { + return mergeFrom((caffe.Caffe.ThresholdParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.ThresholdParameter other) { + if (other == caffe.Caffe.ThresholdParameter.getDefaultInstance()) return this; + if (other.hasThreshold()) { + setThreshold(other.getThreshold()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.ThresholdParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.ThresholdParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float threshold_ ; + /** + * optional float threshold = 1 [default = 0]; + * + *
+       * Strictly positive values
+       * 
+ */ + public boolean hasThreshold() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional float threshold = 1 [default = 0]; + * + *
+       * Strictly positive values
+       * 
+ */ + public float getThreshold() { + return threshold_; + } + /** + * optional float threshold = 1 [default = 0]; + * + *
+       * Strictly positive values
+       * 
+ */ + public Builder setThreshold(float value) { + bitField0_ |= 0x00000001; + threshold_ = value; + onChanged(); + return this; + } + /** + * optional float threshold = 1 [default = 0]; + * + *
+       * Strictly positive values
+       * 
+ */ + public Builder clearThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + threshold_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.ThresholdParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.ThresholdParameter) + private static final caffe.Caffe.ThresholdParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.ThresholdParameter(); + } + + public static caffe.Caffe.ThresholdParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ThresholdParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ThresholdParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.ThresholdParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WindowDataParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.WindowDataParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + * optional float scale = 2 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + boolean hasScale(); + /** + * optional float scale = 2 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + float getScale(); + + /** + * optional string mean_file = 3; + */ + boolean hasMeanFile(); + /** + * optional string mean_file = 3; + */ + java.lang.String getMeanFile(); + /** + * optional string mean_file = 3; + */ + com.google.protobuf.ByteString + getMeanFileBytes(); + + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + boolean hasBatchSize(); + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + int getBatchSize(); + + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + boolean hasCropSize(); + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + int getCropSize(); + + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + boolean hasMirror(); + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + boolean getMirror(); + + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+     * Foreground (object) overlap threshold
+     * 
+ */ + boolean hasFgThreshold(); + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+     * Foreground (object) overlap threshold
+     * 
+ */ + float getFgThreshold(); + + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+     * Background (non-object) overlap threshold
+     * 
+ */ + boolean hasBgThreshold(); + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+     * Background (non-object) overlap threshold
+     * 
+ */ + float getBgThreshold(); + + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + boolean hasFgFraction(); + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + float getFgFraction(); + + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + boolean hasContextPad(); + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + int getContextPad(); + + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + boolean hasCropMode(); + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + java.lang.String getCropMode(); + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + com.google.protobuf.ByteString + getCropModeBytes(); + + /** + * optional bool cache_images = 12 [default = false]; + * + *
+     * cache_images: will load all images in memory for faster access
+     * 
+ */ + boolean hasCacheImages(); + /** + * optional bool cache_images = 12 [default = false]; + * + *
+     * cache_images: will load all images in memory for faster access
+     * 
+ */ + boolean getCacheImages(); + + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + boolean hasRootFolder(); + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + java.lang.String getRootFolder(); + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + com.google.protobuf.ByteString + getRootFolderBytes(); + } + /** + * Protobuf type {@code caffe.WindowDataParameter} + */ + public static final class WindowDataParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.WindowDataParameter) + WindowDataParameterOrBuilder { + // Use WindowDataParameter.newBuilder() to construct. + private WindowDataParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WindowDataParameter() { + source_ = ""; + scale_ = 1F; + meanFile_ = ""; + batchSize_ = 0; + cropSize_ = 0; + mirror_ = false; + fgThreshold_ = 0.5F; + bgThreshold_ = 0.5F; + fgFraction_ = 0.25F; + contextPad_ = 0; + cropMode_ = "warp"; + cacheImages_ = false; + rootFolder_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WindowDataParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + source_ = bs; + break; + } + case 21: { + bitField0_ |= 0x00000002; + scale_ = input.readFloat(); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + meanFile_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000008; + batchSize_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + cropSize_ = input.readUInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + mirror_ = input.readBool(); + break; + } + case 61: { + bitField0_ |= 0x00000040; + fgThreshold_ = input.readFloat(); + break; + } + case 69: { + bitField0_ |= 0x00000080; + bgThreshold_ = input.readFloat(); + break; + } + case 77: { + bitField0_ |= 0x00000100; + fgFraction_ = input.readFloat(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + contextPad_ = input.readUInt32(); + break; + } + case 90: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000400; + cropMode_ = bs; + break; + } + case 96: { + bitField0_ |= 0x00000800; + cacheImages_ = input.readBool(); + break; + } + case 106: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00001000; + rootFolder_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_WindowDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_WindowDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.WindowDataParameter.class, caffe.Caffe.WindowDataParameter.Builder.class); + } + + private int bitField0_; + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 1; + * + *
+     * Specify the data source.
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCALE_FIELD_NUMBER = 2; + private float scale_; + /** + * optional float scale = 2 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public float getScale() { + return scale_; + } + + public static final int MEAN_FILE_FIELD_NUMBER = 3; + private volatile java.lang.Object meanFile_; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + 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()) { + meanFile_ = s; + } + return s; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 4; + private int batchSize_; + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 batch_size = 4; + * + *
+     * Specify the batch size.
+     * 
+ */ + public int getBatchSize() { + return batchSize_; + } + + public static final int CROP_SIZE_FIELD_NUMBER = 5; + private int cropSize_; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+     * Specify if we would like to randomly crop an image.
+     * 
+ */ + public int getCropSize() { + return cropSize_; + } + + public static final int MIRROR_FIELD_NUMBER = 6; + private boolean mirror_; + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+     * Specify if we want to randomly mirror data.
+     * 
+ */ + public boolean getMirror() { + return mirror_; + } + + public static final int FG_THRESHOLD_FIELD_NUMBER = 7; + private float fgThreshold_; + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+     * Foreground (object) overlap threshold
+     * 
+ */ + public boolean hasFgThreshold() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+     * Foreground (object) overlap threshold
+     * 
+ */ + public float getFgThreshold() { + return fgThreshold_; + } + + public static final int BG_THRESHOLD_FIELD_NUMBER = 8; + private float bgThreshold_; + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+     * Background (non-object) overlap threshold
+     * 
+ */ + public boolean hasBgThreshold() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+     * Background (non-object) overlap threshold
+     * 
+ */ + public float getBgThreshold() { + return bgThreshold_; + } + + public static final int FG_FRACTION_FIELD_NUMBER = 9; + private float fgFraction_; + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + public boolean hasFgFraction() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + public float getFgFraction() { + return fgFraction_; + } + + public static final int CONTEXT_PAD_FIELD_NUMBER = 10; + private int contextPad_; + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + public boolean hasContextPad() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + public int getContextPad() { + return contextPad_; + } + + public static final int CROP_MODE_FIELD_NUMBER = 11; + private volatile java.lang.Object cropMode_; + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public boolean hasCropMode() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public java.lang.String getCropMode() { + java.lang.Object ref = cropMode_; + 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()) { + cropMode_ = s; + } + return s; + } + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public com.google.protobuf.ByteString + getCropModeBytes() { + java.lang.Object ref = cropMode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cropMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CACHE_IMAGES_FIELD_NUMBER = 12; + private boolean cacheImages_; + /** + * optional bool cache_images = 12 [default = false]; + * + *
+     * cache_images: will load all images in memory for faster access
+     * 
+ */ + public boolean hasCacheImages() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional bool cache_images = 12 [default = false]; + * + *
+     * cache_images: will load all images in memory for faster access
+     * 
+ */ + public boolean getCacheImages() { + return cacheImages_; + } + + public static final int ROOT_FOLDER_FIELD_NUMBER = 13; + private volatile java.lang.Object rootFolder_; + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + public boolean hasRootFolder() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + public java.lang.String getRootFolder() { + java.lang.Object ref = rootFolder_; + 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()) { + rootFolder_ = s; + } + return s; + } + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+     * append root_folder to locate images
+     * 
+ */ + public com.google.protobuf.ByteString + getRootFolderBytes() { + java.lang.Object ref = rootFolder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, source_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, meanFile_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(4, batchSize_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeUInt32(5, cropSize_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(6, mirror_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeFloat(7, fgThreshold_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeFloat(8, bgThreshold_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeFloat(9, fgFraction_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeUInt32(10, contextPad_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, cropMode_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBool(12, cacheImages_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, rootFolder_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, source_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scale_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, meanFile_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, batchSize_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, cropSize_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, mirror_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, fgThreshold_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, bgThreshold_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(9, fgFraction_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, contextPad_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, cropMode_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, cacheImages_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, rootFolder_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.WindowDataParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.WindowDataParameter 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.WindowDataParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.WindowDataParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.WindowDataParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.WindowDataParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.WindowDataParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.WindowDataParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.WindowDataParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.WindowDataParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.WindowDataParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.WindowDataParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.WindowDataParameter) + caffe.Caffe.WindowDataParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_WindowDataParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_WindowDataParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.WindowDataParameter.class, caffe.Caffe.WindowDataParameter.Builder.class); + } + + // Construct using caffe.Caffe.WindowDataParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00000002); + meanFile_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + batchSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + cropSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + mirror_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + fgThreshold_ = 0.5F; + bitField0_ = (bitField0_ & ~0x00000040); + bgThreshold_ = 0.5F; + bitField0_ = (bitField0_ & ~0x00000080); + fgFraction_ = 0.25F; + bitField0_ = (bitField0_ & ~0x00000100); + contextPad_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); + cropMode_ = "warp"; + bitField0_ = (bitField0_ & ~0x00000400); + cacheImages_ = false; + bitField0_ = (bitField0_ & ~0x00000800); + rootFolder_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_WindowDataParameter_descriptor; + } + + public caffe.Caffe.WindowDataParameter getDefaultInstanceForType() { + return caffe.Caffe.WindowDataParameter.getDefaultInstance(); + } + + public caffe.Caffe.WindowDataParameter build() { + caffe.Caffe.WindowDataParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.WindowDataParameter buildPartial() { + caffe.Caffe.WindowDataParameter result = new caffe.Caffe.WindowDataParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.meanFile_ = meanFile_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.cropSize_ = cropSize_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.mirror_ = mirror_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.fgThreshold_ = fgThreshold_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.bgThreshold_ = bgThreshold_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.fgFraction_ = fgFraction_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.contextPad_ = contextPad_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.cropMode_ = cropMode_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.cacheImages_ = cacheImages_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00001000; + } + result.rootFolder_ = rootFolder_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.WindowDataParameter) { + return mergeFrom((caffe.Caffe.WindowDataParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.WindowDataParameter other) { + if (other == caffe.Caffe.WindowDataParameter.getDefaultInstance()) return this; + if (other.hasSource()) { + bitField0_ |= 0x00000001; + source_ = other.source_; + onChanged(); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasMeanFile()) { + bitField0_ |= 0x00000004; + meanFile_ = other.meanFile_; + onChanged(); + } + if (other.hasBatchSize()) { + setBatchSize(other.getBatchSize()); + } + if (other.hasCropSize()) { + setCropSize(other.getCropSize()); + } + if (other.hasMirror()) { + setMirror(other.getMirror()); + } + if (other.hasFgThreshold()) { + setFgThreshold(other.getFgThreshold()); + } + if (other.hasBgThreshold()) { + setBgThreshold(other.getBgThreshold()); + } + if (other.hasFgFraction()) { + setFgFraction(other.getFgFraction()); + } + if (other.hasContextPad()) { + setContextPad(other.getContextPad()); + } + if (other.hasCropMode()) { + bitField0_ |= 0x00000400; + cropMode_ = other.cropMode_; + onChanged(); + } + if (other.hasCacheImages()) { + setCacheImages(other.getCacheImages()); + } + if (other.hasRootFolder()) { + bitField0_ |= 0x00001000; + rootFolder_ = other.rootFolder_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.WindowDataParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.WindowDataParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000001); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 1; + * + *
+       * Specify the data source.
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + source_ = value; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 2 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder setScale(float value) { + bitField0_ |= 0x00000002; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 2 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000002); + scale_ = 1F; + onChanged(); + return this; + } + + private java.lang.Object meanFile_ = ""; + /** + * optional string mean_file = 3; + */ + public boolean hasMeanFile() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string mean_file = 3; + */ + public java.lang.String getMeanFile() { + java.lang.Object ref = meanFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + meanFile_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string mean_file = 3; + */ + public com.google.protobuf.ByteString + getMeanFileBytes() { + java.lang.Object ref = meanFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + meanFile_ = value; + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder clearMeanFile() { + bitField0_ = (bitField0_ & ~0x00000004); + meanFile_ = getDefaultInstance().getMeanFile(); + onChanged(); + return this; + } + /** + * optional string mean_file = 3; + */ + public Builder setMeanFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + meanFile_ = value; + onChanged(); + return this; + } + + private int batchSize_ ; + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public boolean hasBatchSize() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public int getBatchSize() { + return batchSize_; + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder setBatchSize(int value) { + bitField0_ |= 0x00000008; + batchSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batch_size = 4; + * + *
+       * Specify the batch size.
+       * 
+ */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000008); + batchSize_ = 0; + onChanged(); + return this; + } + + private int cropSize_ ; + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public boolean hasCropSize() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public int getCropSize() { + return cropSize_; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder setCropSize(int value) { + bitField0_ |= 0x00000010; + cropSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 crop_size = 5 [default = 0]; + * + *
+       * Specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder clearCropSize() { + bitField0_ = (bitField0_ & ~0x00000010); + cropSize_ = 0; + onChanged(); + return this; + } + + private boolean mirror_ ; + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public boolean getMirror() { + return mirror_; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public Builder setMirror(boolean value) { + bitField0_ |= 0x00000020; + mirror_ = value; + onChanged(); + return this; + } + /** + * optional bool mirror = 6 [default = false]; + * + *
+       * Specify if we want to randomly mirror data.
+       * 
+ */ + public Builder clearMirror() { + bitField0_ = (bitField0_ & ~0x00000020); + mirror_ = false; + onChanged(); + return this; + } + + private float fgThreshold_ = 0.5F; + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+       * Foreground (object) overlap threshold
+       * 
+ */ + public boolean hasFgThreshold() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+       * Foreground (object) overlap threshold
+       * 
+ */ + public float getFgThreshold() { + return fgThreshold_; + } + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+       * Foreground (object) overlap threshold
+       * 
+ */ + public Builder setFgThreshold(float value) { + bitField0_ |= 0x00000040; + fgThreshold_ = value; + onChanged(); + return this; + } + /** + * optional float fg_threshold = 7 [default = 0.5]; + * + *
+       * Foreground (object) overlap threshold
+       * 
+ */ + public Builder clearFgThreshold() { + bitField0_ = (bitField0_ & ~0x00000040); + fgThreshold_ = 0.5F; + onChanged(); + return this; + } + + private float bgThreshold_ = 0.5F; + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+       * Background (non-object) overlap threshold
+       * 
+ */ + public boolean hasBgThreshold() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+       * Background (non-object) overlap threshold
+       * 
+ */ + public float getBgThreshold() { + return bgThreshold_; + } + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+       * Background (non-object) overlap threshold
+       * 
+ */ + public Builder setBgThreshold(float value) { + bitField0_ |= 0x00000080; + bgThreshold_ = value; + onChanged(); + return this; + } + /** + * optional float bg_threshold = 8 [default = 0.5]; + * + *
+       * Background (non-object) overlap threshold
+       * 
+ */ + public Builder clearBgThreshold() { + bitField0_ = (bitField0_ & ~0x00000080); + bgThreshold_ = 0.5F; + onChanged(); + return this; + } + + private float fgFraction_ = 0.25F; + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public boolean hasFgFraction() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public float getFgFraction() { + return fgFraction_; + } + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public Builder setFgFraction(float value) { + bitField0_ |= 0x00000100; + fgFraction_ = value; + onChanged(); + return this; + } + /** + * optional float fg_fraction = 9 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public Builder clearFgFraction() { + bitField0_ = (bitField0_ & ~0x00000100); + fgFraction_ = 0.25F; + onChanged(); + return this; + } + + private int contextPad_ ; + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public boolean hasContextPad() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public int getContextPad() { + return contextPad_; + } + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public Builder setContextPad(int value) { + bitField0_ |= 0x00000200; + contextPad_ = value; + onChanged(); + return this; + } + /** + * optional uint32 context_pad = 10 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public Builder clearContextPad() { + bitField0_ = (bitField0_ & ~0x00000200); + contextPad_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cropMode_ = "warp"; + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public boolean hasCropMode() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public java.lang.String getCropMode() { + java.lang.Object ref = cropMode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + cropMode_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public com.google.protobuf.ByteString + getCropModeBytes() { + java.lang.Object ref = cropMode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cropMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder setCropMode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + cropMode_ = value; + onChanged(); + return this; + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder clearCropMode() { + bitField0_ = (bitField0_ & ~0x00000400); + cropMode_ = getDefaultInstance().getCropMode(); + onChanged(); + return this; + } + /** + * optional string crop_mode = 11 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder setCropModeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + cropMode_ = value; + onChanged(); + return this; + } + + private boolean cacheImages_ ; + /** + * optional bool cache_images = 12 [default = false]; + * + *
+       * cache_images: will load all images in memory for faster access
+       * 
+ */ + public boolean hasCacheImages() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional bool cache_images = 12 [default = false]; + * + *
+       * cache_images: will load all images in memory for faster access
+       * 
+ */ + public boolean getCacheImages() { + return cacheImages_; + } + /** + * optional bool cache_images = 12 [default = false]; + * + *
+       * cache_images: will load all images in memory for faster access
+       * 
+ */ + public Builder setCacheImages(boolean value) { + bitField0_ |= 0x00000800; + cacheImages_ = value; + onChanged(); + return this; + } + /** + * optional bool cache_images = 12 [default = false]; + * + *
+       * cache_images: will load all images in memory for faster access
+       * 
+ */ + public Builder clearCacheImages() { + bitField0_ = (bitField0_ & ~0x00000800); + cacheImages_ = false; + onChanged(); + return this; + } + + private java.lang.Object rootFolder_ = ""; + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public boolean hasRootFolder() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public java.lang.String getRootFolder() { + java.lang.Object ref = rootFolder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + rootFolder_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public com.google.protobuf.ByteString + getRootFolderBytes() { + java.lang.Object ref = rootFolder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public Builder setRootFolder( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + rootFolder_ = value; + onChanged(); + return this; + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public Builder clearRootFolder() { + bitField0_ = (bitField0_ & ~0x00001000); + rootFolder_ = getDefaultInstance().getRootFolder(); + onChanged(); + return this; + } + /** + * optional string root_folder = 13 [default = ""]; + * + *
+       * append root_folder to locate images
+       * 
+ */ + public Builder setRootFolderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + rootFolder_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.WindowDataParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.WindowDataParameter) + private static final caffe.Caffe.WindowDataParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.WindowDataParameter(); + } + + public static caffe.Caffe.WindowDataParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public WindowDataParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WindowDataParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.WindowDataParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SPPParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.SPPParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional uint32 pyramid_height = 1; + */ + boolean hasPyramidHeight(); + /** + * optional uint32 pyramid_height = 1; + */ + int getPyramidHeight(); + + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + boolean hasPool(); + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + caffe.Caffe.SPPParameter.PoolMethod getPool(); + + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + boolean hasEngine(); + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + caffe.Caffe.SPPParameter.Engine getEngine(); + } + /** + * Protobuf type {@code caffe.SPPParameter} + */ + public static final class SPPParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.SPPParameter) + SPPParameterOrBuilder { + // Use SPPParameter.newBuilder() to construct. + private SPPParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SPPParameter() { + pyramidHeight_ = 0; + pool_ = 0; + engine_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SPPParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + pyramidHeight_ = input.readUInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + caffe.Caffe.SPPParameter.PoolMethod value = caffe.Caffe.SPPParameter.PoolMethod.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + pool_ = rawValue; + } + break; + } + case 48: { + int rawValue = input.readEnum(); + caffe.Caffe.SPPParameter.Engine value = caffe.Caffe.SPPParameter.Engine.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(6, rawValue); + } else { + bitField0_ |= 0x00000004; + engine_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_SPPParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SPPParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SPPParameter.class, caffe.Caffe.SPPParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.SPPParameter.PoolMethod} + */ + public enum PoolMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + * MAX = 0; + */ + MAX(0, 0), + /** + * AVE = 1; + */ + AVE(1, 1), + /** + * STOCHASTIC = 2; + */ + STOCHASTIC(2, 2), + ; + + /** + * MAX = 0; + */ + public static final int MAX_VALUE = 0; + /** + * AVE = 1; + */ + public static final int AVE_VALUE = 1; + /** + * STOCHASTIC = 2; + */ + public static final int STOCHASTIC_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static PoolMethod valueOf(int value) { + switch (value) { + case 0: return MAX; + case 1: return AVE; + case 2: return STOCHASTIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PoolMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PoolMethod findValueByNumber(int number) { + return PoolMethod.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.SPPParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final PoolMethod[] VALUES = values(); + + public static PoolMethod 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 PoolMethod(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.SPPParameter.PoolMethod) + } + + /** + * Protobuf enum {@code caffe.SPPParameter.Engine} + */ + public enum Engine + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0, 0), + /** + * CAFFE = 1; + */ + CAFFE(1, 1), + /** + * CUDNN = 2; + */ + CUDNN(2, 2), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * CAFFE = 1; + */ + public static final int CAFFE_VALUE = 1; + /** + * CUDNN = 2; + */ + public static final int CUDNN_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static Engine valueOf(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return CAFFE; + case 2: return CUDNN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Engine> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Engine findValueByNumber(int number) { + return Engine.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.SPPParameter.getDescriptor().getEnumTypes().get(1); + } + + private static final Engine[] VALUES = values(); + + public static Engine 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 Engine(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.SPPParameter.Engine) + } + + private int bitField0_; + public static final int PYRAMID_HEIGHT_FIELD_NUMBER = 1; + private int pyramidHeight_; + /** + * optional uint32 pyramid_height = 1; + */ + public boolean hasPyramidHeight() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 pyramid_height = 1; + */ + public int getPyramidHeight() { + return pyramidHeight_; + } + + public static final int POOL_FIELD_NUMBER = 2; + private int pool_; + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public caffe.Caffe.SPPParameter.PoolMethod getPool() { + caffe.Caffe.SPPParameter.PoolMethod result = caffe.Caffe.SPPParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.SPPParameter.PoolMethod.MAX : result; + } + + public static final int ENGINE_FIELD_NUMBER = 6; + private int engine_; + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public caffe.Caffe.SPPParameter.Engine getEngine() { + caffe.Caffe.SPPParameter.Engine result = caffe.Caffe.SPPParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SPPParameter.Engine.DEFAULT : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, pyramidHeight_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, pool_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(6, engine_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, pyramidHeight_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, pool_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, engine_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.SPPParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SPPParameter 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.SPPParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.SPPParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.SPPParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SPPParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.SPPParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.SPPParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.SPPParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.SPPParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.SPPParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.SPPParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.SPPParameter) + caffe.Caffe.SPPParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_SPPParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_SPPParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.SPPParameter.class, caffe.Caffe.SPPParameter.Builder.class); + } + + // Construct using caffe.Caffe.SPPParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pyramidHeight_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + pool_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + engine_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_SPPParameter_descriptor; + } + + public caffe.Caffe.SPPParameter getDefaultInstanceForType() { + return caffe.Caffe.SPPParameter.getDefaultInstance(); + } + + public caffe.Caffe.SPPParameter build() { + caffe.Caffe.SPPParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.SPPParameter buildPartial() { + caffe.Caffe.SPPParameter result = new caffe.Caffe.SPPParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.pyramidHeight_ = pyramidHeight_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.pool_ = pool_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.engine_ = engine_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.SPPParameter) { + return mergeFrom((caffe.Caffe.SPPParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.SPPParameter other) { + if (other == caffe.Caffe.SPPParameter.getDefaultInstance()) return this; + if (other.hasPyramidHeight()) { + setPyramidHeight(other.getPyramidHeight()); + } + if (other.hasPool()) { + setPool(other.getPool()); + } + if (other.hasEngine()) { + setEngine(other.getEngine()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.SPPParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.SPPParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int pyramidHeight_ ; + /** + * optional uint32 pyramid_height = 1; + */ + public boolean hasPyramidHeight() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional uint32 pyramid_height = 1; + */ + public int getPyramidHeight() { + return pyramidHeight_; + } + /** + * optional uint32 pyramid_height = 1; + */ + public Builder setPyramidHeight(int value) { + bitField0_ |= 0x00000001; + pyramidHeight_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pyramid_height = 1; + */ + public Builder clearPyramidHeight() { + bitField0_ = (bitField0_ & ~0x00000001); + pyramidHeight_ = 0; + onChanged(); + return this; + } + + private int pool_ = 0; + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public caffe.Caffe.SPPParameter.PoolMethod getPool() { + caffe.Caffe.SPPParameter.PoolMethod result = caffe.Caffe.SPPParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.SPPParameter.PoolMethod.MAX : result; + } + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder setPool(caffe.Caffe.SPPParameter.PoolMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + pool_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder clearPool() { + bitField0_ = (bitField0_ & ~0x00000002); + pool_ = 0; + onChanged(); + return this; + } + + private int engine_ = 0; + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public boolean hasEngine() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public caffe.Caffe.SPPParameter.Engine getEngine() { + caffe.Caffe.SPPParameter.Engine result = caffe.Caffe.SPPParameter.Engine.valueOf(engine_); + return result == null ? caffe.Caffe.SPPParameter.Engine.DEFAULT : result; + } + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public Builder setEngine(caffe.Caffe.SPPParameter.Engine value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT]; + */ + public Builder clearEngine() { + bitField0_ = (bitField0_ & ~0x00000004); + engine_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.SPPParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.SPPParameter) + private static final caffe.Caffe.SPPParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.SPPParameter(); + } + + public static caffe.Caffe.SPPParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SPPParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SPPParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.SPPParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface V1LayerParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.V1LayerParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string bottom = 2; + */ + com.google.protobuf.ProtocolStringList + getBottomList(); + /** + * repeated string bottom = 2; + */ + int getBottomCount(); + /** + * repeated string bottom = 2; + */ + java.lang.String getBottom(int index); + /** + * repeated string bottom = 2; + */ + com.google.protobuf.ByteString + getBottomBytes(int index); + + /** + * repeated string top = 3; + */ + com.google.protobuf.ProtocolStringList + getTopList(); + /** + * repeated string top = 3; + */ + int getTopCount(); + /** + * repeated string top = 3; + */ + java.lang.String getTop(int index); + /** + * repeated string top = 3; + */ + com.google.protobuf.ByteString + getTopBytes(int index); + + /** + * optional string name = 4; + */ + boolean hasName(); + /** + * optional string name = 4; + */ + java.lang.String getName(); + /** + * optional string name = 4; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .caffe.NetStateRule include = 32; + */ + java.util.List + getIncludeList(); + /** + * repeated .caffe.NetStateRule include = 32; + */ + caffe.Caffe.NetStateRule getInclude(int index); + /** + * repeated .caffe.NetStateRule include = 32; + */ + int getIncludeCount(); + /** + * repeated .caffe.NetStateRule include = 32; + */ + java.util.List + getIncludeOrBuilderList(); + /** + * repeated .caffe.NetStateRule include = 32; + */ + caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( + int index); + + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + java.util.List + getExcludeList(); + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + caffe.Caffe.NetStateRule getExclude(int index); + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + int getExcludeCount(); + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + java.util.List + getExcludeOrBuilderList(); + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( + int index); + + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + boolean hasType(); + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + caffe.Caffe.V1LayerParameter.LayerType getType(); + + /** + * repeated .caffe.BlobProto blobs = 6; + */ + java.util.List + getBlobsList(); + /** + * repeated .caffe.BlobProto blobs = 6; + */ + caffe.Caffe.BlobProto getBlobs(int index); + /** + * repeated .caffe.BlobProto blobs = 6; + */ + int getBlobsCount(); + /** + * repeated .caffe.BlobProto blobs = 6; + */ + java.util.List + getBlobsOrBuilderList(); + /** + * repeated .caffe.BlobProto blobs = 6; + */ + caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index); + + /** + * repeated string param = 1001; + */ + com.google.protobuf.ProtocolStringList + getParamList(); + /** + * repeated string param = 1001; + */ + int getParamCount(); + /** + * repeated string param = 1001; + */ + java.lang.String getParam(int index); + /** + * repeated string param = 1001; + */ + com.google.protobuf.ByteString + getParamBytes(int index); + + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + java.util.List getBlobShareModeList(); + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + int getBlobShareModeCount(); + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index); + + /** + * repeated float blobs_lr = 7; + */ + java.util.List getBlobsLrList(); + /** + * repeated float blobs_lr = 7; + */ + int getBlobsLrCount(); + /** + * repeated float blobs_lr = 7; + */ + float getBlobsLr(int index); + + /** + * repeated float weight_decay = 8; + */ + java.util.List getWeightDecayList(); + /** + * repeated float weight_decay = 8; + */ + int getWeightDecayCount(); + /** + * repeated float weight_decay = 8; + */ + float getWeightDecay(int index); + + /** + * repeated float loss_weight = 35; + */ + java.util.List getLossWeightList(); + /** + * repeated float loss_weight = 35; + */ + int getLossWeightCount(); + /** + * repeated float loss_weight = 35; + */ + float getLossWeight(int index); + + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + boolean hasAccuracyParam(); + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + caffe.Caffe.AccuracyParameter getAccuracyParam(); + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder(); + + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + boolean hasArgmaxParam(); + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + caffe.Caffe.ArgMaxParameter getArgmaxParam(); + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder(); + + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + boolean hasConcatParam(); + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + caffe.Caffe.ConcatParameter getConcatParam(); + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder(); + + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + boolean hasContrastiveLossParam(); + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam(); + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder(); + + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + boolean hasConvolutionParam(); + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + caffe.Caffe.ConvolutionParameter getConvolutionParam(); + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder(); + + /** + * optional .caffe.DataParameter data_param = 11; + */ + boolean hasDataParam(); + /** + * optional .caffe.DataParameter data_param = 11; + */ + caffe.Caffe.DataParameter getDataParam(); + /** + * optional .caffe.DataParameter data_param = 11; + */ + caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder(); + + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + boolean hasDropoutParam(); + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + caffe.Caffe.DropoutParameter getDropoutParam(); + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder(); + + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + boolean hasDummyDataParam(); + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + caffe.Caffe.DummyDataParameter getDummyDataParam(); + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder(); + + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + boolean hasEltwiseParam(); + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + caffe.Caffe.EltwiseParameter getEltwiseParam(); + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder(); + + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + boolean hasExpParam(); + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + caffe.Caffe.ExpParameter getExpParam(); + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder(); + + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + boolean hasHdf5DataParam(); + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + caffe.Caffe.HDF5DataParameter getHdf5DataParam(); + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder(); + + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + boolean hasHdf5OutputParam(); + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + caffe.Caffe.HDF5OutputParameter getHdf5OutputParam(); + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder(); + + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + boolean hasHingeLossParam(); + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + caffe.Caffe.HingeLossParameter getHingeLossParam(); + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder(); + + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + boolean hasImageDataParam(); + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + caffe.Caffe.ImageDataParameter getImageDataParam(); + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder(); + + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + boolean hasInfogainLossParam(); + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + caffe.Caffe.InfogainLossParameter getInfogainLossParam(); + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder(); + + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + boolean hasInnerProductParam(); + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + caffe.Caffe.InnerProductParameter getInnerProductParam(); + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder(); + + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + boolean hasLrnParam(); + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + caffe.Caffe.LRNParameter getLrnParam(); + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder(); + + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + boolean hasMemoryDataParam(); + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + caffe.Caffe.MemoryDataParameter getMemoryDataParam(); + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder(); + + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + boolean hasMvnParam(); + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + caffe.Caffe.MVNParameter getMvnParam(); + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder(); + + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + boolean hasPoolingParam(); + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + caffe.Caffe.PoolingParameter getPoolingParam(); + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder(); + + /** + * optional .caffe.PowerParameter power_param = 21; + */ + boolean hasPowerParam(); + /** + * optional .caffe.PowerParameter power_param = 21; + */ + caffe.Caffe.PowerParameter getPowerParam(); + /** + * optional .caffe.PowerParameter power_param = 21; + */ + caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder(); + + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + boolean hasReluParam(); + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + caffe.Caffe.ReLUParameter getReluParam(); + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder(); + + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + boolean hasSigmoidParam(); + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + caffe.Caffe.SigmoidParameter getSigmoidParam(); + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder(); + + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + boolean hasSoftmaxParam(); + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + caffe.Caffe.SoftmaxParameter getSoftmaxParam(); + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder(); + + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + boolean hasSliceParam(); + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + caffe.Caffe.SliceParameter getSliceParam(); + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder(); + + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + boolean hasTanhParam(); + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + caffe.Caffe.TanHParameter getTanhParam(); + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder(); + + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + boolean hasThresholdParam(); + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + caffe.Caffe.ThresholdParameter getThresholdParam(); + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder(); + + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + boolean hasWindowDataParam(); + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + caffe.Caffe.WindowDataParameter getWindowDataParam(); + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder(); + + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + boolean hasTransformParam(); + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + caffe.Caffe.TransformationParameter getTransformParam(); + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder(); + + /** + * optional .caffe.LossParameter loss_param = 42; + */ + boolean hasLossParam(); + /** + * optional .caffe.LossParameter loss_param = 42; + */ + caffe.Caffe.LossParameter getLossParam(); + /** + * optional .caffe.LossParameter loss_param = 42; + */ + caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder(); + + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + boolean hasLayer(); + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + caffe.Caffe.V0LayerParameter getLayer(); + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder(); + } + /** + * Protobuf type {@code caffe.V1LayerParameter} + * + *
+   * DEPRECATED: use LayerParameter.
+   * 
+ */ + public static final class V1LayerParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.V1LayerParameter) + V1LayerParameterOrBuilder { + // Use V1LayerParameter.newBuilder() to construct. + private V1LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private V1LayerParameter() { + bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; + top_ = com.google.protobuf.LazyStringArrayList.EMPTY; + name_ = ""; + include_ = java.util.Collections.emptyList(); + exclude_ = java.util.Collections.emptyList(); + type_ = 0; + blobs_ = java.util.Collections.emptyList(); + param_ = com.google.protobuf.LazyStringArrayList.EMPTY; + blobShareMode_ = java.util.Collections.emptyList(); + blobsLr_ = java.util.Collections.emptyList(); + weightDecay_ = java.util.Collections.emptyList(); + lossWeight_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private V1LayerParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + caffe.Caffe.V0LayerParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000001) == 0x00000001)) { + subBuilder = layer_.toBuilder(); + } + layer_ = input.readMessage(caffe.Caffe.V0LayerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(layer_); + layer_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000001; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + bottom_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bottom_.add(bs); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + top_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + top_.add(bs); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + name_ = bs; + break; + } + case 40: { + int rawValue = input.readEnum(); + caffe.Caffe.V1LayerParameter.LayerType value = caffe.Caffe.V1LayerParameter.LayerType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(5, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = rawValue; + } + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + blobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + blobs_.add(input.readMessage(caffe.Caffe.BlobProto.parser(), extensionRegistry)); + break; + } + case 61: { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + blobsLr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000200; + } + blobsLr_.add(input.readFloat()); + break; + } + case 58: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { + blobsLr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000200; + } + while (input.getBytesUntilLimit() > 0) { + blobsLr_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 69: { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + weightDecay_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000400; + } + weightDecay_.add(input.readFloat()); + break; + } + case 66: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { + weightDecay_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000400; + } + while (input.getBytesUntilLimit() > 0) { + weightDecay_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 74: { + caffe.Caffe.ConcatParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = concatParam_.toBuilder(); + } + concatParam_ = input.readMessage(caffe.Caffe.ConcatParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(concatParam_); + concatParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + case 82: { + caffe.Caffe.ConvolutionParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + subBuilder = convolutionParam_.toBuilder(); + } + convolutionParam_ = input.readMessage(caffe.Caffe.ConvolutionParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(convolutionParam_); + convolutionParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000040; + break; + } + case 90: { + caffe.Caffe.DataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000080) == 0x00000080)) { + subBuilder = dataParam_.toBuilder(); + } + dataParam_ = input.readMessage(caffe.Caffe.DataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataParam_); + dataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000080; + break; + } + case 98: { + caffe.Caffe.DropoutParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000100) == 0x00000100)) { + subBuilder = dropoutParam_.toBuilder(); + } + dropoutParam_ = input.readMessage(caffe.Caffe.DropoutParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dropoutParam_); + dropoutParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000100; + break; + } + case 106: { + caffe.Caffe.HDF5DataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00001000) == 0x00001000)) { + subBuilder = hdf5DataParam_.toBuilder(); + } + hdf5DataParam_ = input.readMessage(caffe.Caffe.HDF5DataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hdf5DataParam_); + hdf5DataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00001000; + break; + } + case 114: { + caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00002000) == 0x00002000)) { + subBuilder = hdf5OutputParam_.toBuilder(); + } + hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hdf5OutputParam_); + hdf5OutputParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00002000; + break; + } + case 122: { + caffe.Caffe.ImageDataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00008000) == 0x00008000)) { + subBuilder = imageDataParam_.toBuilder(); + } + imageDataParam_ = input.readMessage(caffe.Caffe.ImageDataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageDataParam_); + imageDataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00008000; + break; + } + case 130: { + caffe.Caffe.InfogainLossParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00010000) == 0x00010000)) { + subBuilder = infogainLossParam_.toBuilder(); + } + infogainLossParam_ = input.readMessage(caffe.Caffe.InfogainLossParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infogainLossParam_); + infogainLossParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00010000; + break; + } + case 138: { + caffe.Caffe.InnerProductParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00020000) == 0x00020000)) { + subBuilder = innerProductParam_.toBuilder(); + } + innerProductParam_ = input.readMessage(caffe.Caffe.InnerProductParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(innerProductParam_); + innerProductParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00020000; + break; + } + case 146: { + caffe.Caffe.LRNParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00040000) == 0x00040000)) { + subBuilder = lrnParam_.toBuilder(); + } + lrnParam_ = input.readMessage(caffe.Caffe.LRNParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lrnParam_); + lrnParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00040000; + break; + } + case 154: { + caffe.Caffe.PoolingParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00200000) == 0x00200000)) { + subBuilder = poolingParam_.toBuilder(); + } + poolingParam_ = input.readMessage(caffe.Caffe.PoolingParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(poolingParam_); + poolingParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00200000; + break; + } + case 162: { + caffe.Caffe.WindowDataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x20000000) == 0x20000000)) { + subBuilder = windowDataParam_.toBuilder(); + } + windowDataParam_ = input.readMessage(caffe.Caffe.WindowDataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowDataParam_); + windowDataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x20000000; + break; + } + case 170: { + caffe.Caffe.PowerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00400000) == 0x00400000)) { + subBuilder = powerParam_.toBuilder(); + } + powerParam_ = input.readMessage(caffe.Caffe.PowerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(powerParam_); + powerParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00400000; + break; + } + case 178: { + caffe.Caffe.MemoryDataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00080000) == 0x00080000)) { + subBuilder = memoryDataParam_.toBuilder(); + } + memoryDataParam_ = input.readMessage(caffe.Caffe.MemoryDataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(memoryDataParam_); + memoryDataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00080000; + break; + } + case 186: { + caffe.Caffe.ArgMaxParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = argmaxParam_.toBuilder(); + } + argmaxParam_ = input.readMessage(caffe.Caffe.ArgMaxParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(argmaxParam_); + argmaxParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 194: { + caffe.Caffe.EltwiseParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000400) == 0x00000400)) { + subBuilder = eltwiseParam_.toBuilder(); + } + eltwiseParam_ = input.readMessage(caffe.Caffe.EltwiseParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(eltwiseParam_); + eltwiseParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000400; + break; + } + case 202: { + caffe.Caffe.ThresholdParameter.Builder subBuilder = null; + if (((bitField0_ & 0x10000000) == 0x10000000)) { + subBuilder = thresholdParam_.toBuilder(); + } + thresholdParam_ = input.readMessage(caffe.Caffe.ThresholdParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(thresholdParam_); + thresholdParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x10000000; + break; + } + case 210: { + caffe.Caffe.DummyDataParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + subBuilder = dummyDataParam_.toBuilder(); + } + dummyDataParam_ = input.readMessage(caffe.Caffe.DummyDataParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dummyDataParam_); + dummyDataParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000200; + break; + } + case 218: { + caffe.Caffe.AccuracyParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = accuracyParam_.toBuilder(); + } + accuracyParam_ = input.readMessage(caffe.Caffe.AccuracyParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accuracyParam_); + accuracyParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 234: { + caffe.Caffe.HingeLossParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00004000) == 0x00004000)) { + subBuilder = hingeLossParam_.toBuilder(); + } + hingeLossParam_ = input.readMessage(caffe.Caffe.HingeLossParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hingeLossParam_); + hingeLossParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00004000; + break; + } + case 242: { + caffe.Caffe.ReLUParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00800000) == 0x00800000)) { + subBuilder = reluParam_.toBuilder(); + } + reluParam_ = input.readMessage(caffe.Caffe.ReLUParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reluParam_); + reluParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00800000; + break; + } + case 250: { + caffe.Caffe.SliceParameter.Builder subBuilder = null; + if (((bitField0_ & 0x04000000) == 0x04000000)) { + subBuilder = sliceParam_.toBuilder(); + } + sliceParam_ = input.readMessage(caffe.Caffe.SliceParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sliceParam_); + sliceParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x04000000; + break; + } + case 258: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + include_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + include_.add(input.readMessage(caffe.Caffe.NetStateRule.parser(), extensionRegistry)); + break; + } + case 266: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + exclude_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + exclude_.add(input.readMessage(caffe.Caffe.NetStateRule.parser(), extensionRegistry)); + break; + } + case 274: { + caffe.Caffe.MVNParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00100000) == 0x00100000)) { + subBuilder = mvnParam_.toBuilder(); + } + mvnParam_ = input.readMessage(caffe.Caffe.MVNParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mvnParam_); + mvnParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00100000; + break; + } + case 285: { + if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { + lossWeight_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000800; + } + lossWeight_.add(input.readFloat()); + break; + } + case 282: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000800) == 0x00000800) && input.getBytesUntilLimit() > 0) { + lossWeight_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000800; + } + while (input.getBytesUntilLimit() > 0) { + lossWeight_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 290: { + caffe.Caffe.TransformationParameter.Builder subBuilder = null; + if (((bitField0_ & 0x40000000) == 0x40000000)) { + subBuilder = transformParam_.toBuilder(); + } + transformParam_ = input.readMessage(caffe.Caffe.TransformationParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformParam_); + transformParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x40000000; + break; + } + case 298: { + caffe.Caffe.TanHParameter.Builder subBuilder = null; + if (((bitField0_ & 0x08000000) == 0x08000000)) { + subBuilder = tanhParam_.toBuilder(); + } + tanhParam_ = input.readMessage(caffe.Caffe.TanHParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tanhParam_); + tanhParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x08000000; + break; + } + case 306: { + caffe.Caffe.SigmoidParameter.Builder subBuilder = null; + if (((bitField0_ & 0x01000000) == 0x01000000)) { + subBuilder = sigmoidParam_.toBuilder(); + } + sigmoidParam_ = input.readMessage(caffe.Caffe.SigmoidParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sigmoidParam_); + sigmoidParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x01000000; + break; + } + case 314: { + caffe.Caffe.SoftmaxParameter.Builder subBuilder = null; + if (((bitField0_ & 0x02000000) == 0x02000000)) { + subBuilder = softmaxParam_.toBuilder(); + } + softmaxParam_ = input.readMessage(caffe.Caffe.SoftmaxParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softmaxParam_); + softmaxParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x02000000; + break; + } + case 322: { + caffe.Caffe.ContrastiveLossParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = contrastiveLossParam_.toBuilder(); + } + contrastiveLossParam_ = input.readMessage(caffe.Caffe.ContrastiveLossParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(contrastiveLossParam_); + contrastiveLossParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } + case 330: { + caffe.Caffe.ExpParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000800) == 0x00000800)) { + subBuilder = expParam_.toBuilder(); + } + expParam_ = input.readMessage(caffe.Caffe.ExpParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expParam_); + expParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000800; + break; + } + case 338: { + caffe.Caffe.LossParameter.Builder subBuilder = null; + if (((bitField0_ & 0x80000000) == 0x80000000)) { + subBuilder = lossParam_.toBuilder(); + } + lossParam_ = input.readMessage(caffe.Caffe.LossParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lossParam_); + lossParam_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x80000000; + break; + } + case 8010: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + param_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000080; + } + param_.add(bs); + break; + } + case 8016: { + int rawValue = input.readEnum(); + caffe.Caffe.V1LayerParameter.DimCheckMode value = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1002, rawValue); + } else { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + blobShareMode_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000100; + } + blobShareMode_.add(rawValue); + } + break; + } + case 8018: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + caffe.Caffe.V1LayerParameter.DimCheckMode value = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1002, rawValue); + } else { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + blobShareMode_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000100; + } + blobShareMode_.add(rawValue); + } + } + input.popLimit(oldLimit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + bottom_ = bottom_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + top_ = top_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + blobs_ = java.util.Collections.unmodifiableList(blobs_); + } + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); + } + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + include_ = java.util.Collections.unmodifiableList(include_); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + exclude_ = java.util.Collections.unmodifiableList(exclude_); + } + if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { + lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_); + } + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + param_ = param_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + blobShareMode_ = java.util.Collections.unmodifiableList(blobShareMode_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_V1LayerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.V1LayerParameter.class, caffe.Caffe.V1LayerParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.V1LayerParameter.LayerType} + */ + public enum LayerType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * ABSVAL = 35; + */ + ABSVAL(1, 35), + /** + * ACCURACY = 1; + */ + ACCURACY(2, 1), + /** + * ARGMAX = 30; + */ + ARGMAX(3, 30), + /** + * BNLL = 2; + */ + BNLL(4, 2), + /** + * CONCAT = 3; + */ + CONCAT(5, 3), + /** + * CONTRASTIVE_LOSS = 37; + */ + CONTRASTIVE_LOSS(6, 37), + /** + * CONVOLUTION = 4; + */ + CONVOLUTION(7, 4), + /** + * DATA = 5; + */ + DATA(8, 5), + /** + * DECONVOLUTION = 39; + */ + DECONVOLUTION(9, 39), + /** + * DROPOUT = 6; + */ + DROPOUT(10, 6), + /** + * DUMMY_DATA = 32; + */ + DUMMY_DATA(11, 32), + /** + * EUCLIDEAN_LOSS = 7; + */ + EUCLIDEAN_LOSS(12, 7), + /** + * ELTWISE = 25; + */ + ELTWISE(13, 25), + /** + * EXP = 38; + */ + EXP(14, 38), + /** + * FLATTEN = 8; + */ + FLATTEN(15, 8), + /** + * HDF5_DATA = 9; + */ + HDF5_DATA(16, 9), + /** + * HDF5_OUTPUT = 10; + */ + HDF5_OUTPUT(17, 10), + /** + * HINGE_LOSS = 28; + */ + HINGE_LOSS(18, 28), + /** + * IM2COL = 11; + */ + IM2COL(19, 11), + /** + * IMAGE_DATA = 12; + */ + IMAGE_DATA(20, 12), + /** + * INFOGAIN_LOSS = 13; + */ + INFOGAIN_LOSS(21, 13), + /** + * INNER_PRODUCT = 14; + */ + INNER_PRODUCT(22, 14), + /** + * LRN = 15; + */ + LRN(23, 15), + /** + * MEMORY_DATA = 29; + */ + MEMORY_DATA(24, 29), + /** + * MULTINOMIAL_LOGISTIC_LOSS = 16; + */ + MULTINOMIAL_LOGISTIC_LOSS(25, 16), + /** + * MVN = 34; + */ + MVN(26, 34), + /** + * POOLING = 17; + */ + POOLING(27, 17), + /** + * POWER = 26; + */ + POWER(28, 26), + /** + * RELU = 18; + */ + RELU(29, 18), + /** + * SIGMOID = 19; + */ + SIGMOID(30, 19), + /** + * SIGMOID_CROSS_ENTROPY_LOSS = 27; + */ + SIGMOID_CROSS_ENTROPY_LOSS(31, 27), + /** + * SILENCE = 36; + */ + SILENCE(32, 36), + /** + * SOFTMAX = 20; + */ + SOFTMAX(33, 20), + /** + * SOFTMAX_LOSS = 21; + */ + SOFTMAX_LOSS(34, 21), + /** + * SPLIT = 22; + */ + SPLIT(35, 22), + /** + * SLICE = 33; + */ + SLICE(36, 33), + /** + * TANH = 23; + */ + TANH(37, 23), + /** + * WINDOW_DATA = 24; + */ + WINDOW_DATA(38, 24), + /** + * THRESHOLD = 31; + */ + THRESHOLD(39, 31), + ; + + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * ABSVAL = 35; + */ + public static final int ABSVAL_VALUE = 35; + /** + * ACCURACY = 1; + */ + public static final int ACCURACY_VALUE = 1; + /** + * ARGMAX = 30; + */ + public static final int ARGMAX_VALUE = 30; + /** + * BNLL = 2; + */ + public static final int BNLL_VALUE = 2; + /** + * CONCAT = 3; + */ + public static final int CONCAT_VALUE = 3; + /** + * CONTRASTIVE_LOSS = 37; + */ + public static final int CONTRASTIVE_LOSS_VALUE = 37; + /** + * CONVOLUTION = 4; + */ + public static final int CONVOLUTION_VALUE = 4; + /** + * DATA = 5; + */ + public static final int DATA_VALUE = 5; + /** + * DECONVOLUTION = 39; + */ + public static final int DECONVOLUTION_VALUE = 39; + /** + * DROPOUT = 6; + */ + public static final int DROPOUT_VALUE = 6; + /** + * DUMMY_DATA = 32; + */ + public static final int DUMMY_DATA_VALUE = 32; + /** + * EUCLIDEAN_LOSS = 7; + */ + public static final int EUCLIDEAN_LOSS_VALUE = 7; + /** + * ELTWISE = 25; + */ + public static final int ELTWISE_VALUE = 25; + /** + * EXP = 38; + */ + public static final int EXP_VALUE = 38; + /** + * FLATTEN = 8; + */ + public static final int FLATTEN_VALUE = 8; + /** + * HDF5_DATA = 9; + */ + public static final int HDF5_DATA_VALUE = 9; + /** + * HDF5_OUTPUT = 10; + */ + public static final int HDF5_OUTPUT_VALUE = 10; + /** + * HINGE_LOSS = 28; + */ + public static final int HINGE_LOSS_VALUE = 28; + /** + * IM2COL = 11; + */ + public static final int IM2COL_VALUE = 11; + /** + * IMAGE_DATA = 12; + */ + public static final int IMAGE_DATA_VALUE = 12; + /** + * INFOGAIN_LOSS = 13; + */ + public static final int INFOGAIN_LOSS_VALUE = 13; + /** + * INNER_PRODUCT = 14; + */ + public static final int INNER_PRODUCT_VALUE = 14; + /** + * LRN = 15; + */ + public static final int LRN_VALUE = 15; + /** + * MEMORY_DATA = 29; + */ + public static final int MEMORY_DATA_VALUE = 29; + /** + * MULTINOMIAL_LOGISTIC_LOSS = 16; + */ + public static final int MULTINOMIAL_LOGISTIC_LOSS_VALUE = 16; + /** + * MVN = 34; + */ + public static final int MVN_VALUE = 34; + /** + * POOLING = 17; + */ + public static final int POOLING_VALUE = 17; + /** + * POWER = 26; + */ + public static final int POWER_VALUE = 26; + /** + * RELU = 18; + */ + public static final int RELU_VALUE = 18; + /** + * SIGMOID = 19; + */ + public static final int SIGMOID_VALUE = 19; + /** + * SIGMOID_CROSS_ENTROPY_LOSS = 27; + */ + public static final int SIGMOID_CROSS_ENTROPY_LOSS_VALUE = 27; + /** + * SILENCE = 36; + */ + public static final int SILENCE_VALUE = 36; + /** + * SOFTMAX = 20; + */ + public static final int SOFTMAX_VALUE = 20; + /** + * SOFTMAX_LOSS = 21; + */ + public static final int SOFTMAX_LOSS_VALUE = 21; + /** + * SPLIT = 22; + */ + public static final int SPLIT_VALUE = 22; + /** + * SLICE = 33; + */ + public static final int SLICE_VALUE = 33; + /** + * TANH = 23; + */ + public static final int TANH_VALUE = 23; + /** + * WINDOW_DATA = 24; + */ + public static final int WINDOW_DATA_VALUE = 24; + /** + * THRESHOLD = 31; + */ + public static final int THRESHOLD_VALUE = 31; + + + public final int getNumber() { + return value; + } + + public static LayerType valueOf(int value) { + switch (value) { + case 0: return NONE; + case 35: return ABSVAL; + case 1: return ACCURACY; + case 30: return ARGMAX; + case 2: return BNLL; + case 3: return CONCAT; + case 37: return CONTRASTIVE_LOSS; + case 4: return CONVOLUTION; + case 5: return DATA; + case 39: return DECONVOLUTION; + case 6: return DROPOUT; + case 32: return DUMMY_DATA; + case 7: return EUCLIDEAN_LOSS; + case 25: return ELTWISE; + case 38: return EXP; + case 8: return FLATTEN; + case 9: return HDF5_DATA; + case 10: return HDF5_OUTPUT; + case 28: return HINGE_LOSS; + case 11: return IM2COL; + case 12: return IMAGE_DATA; + case 13: return INFOGAIN_LOSS; + case 14: return INNER_PRODUCT; + case 15: return LRN; + case 29: return MEMORY_DATA; + case 16: return MULTINOMIAL_LOGISTIC_LOSS; + case 34: return MVN; + case 17: return POOLING; + case 26: return POWER; + case 18: return RELU; + case 19: return SIGMOID; + case 27: return SIGMOID_CROSS_ENTROPY_LOSS; + case 36: return SILENCE; + case 20: return SOFTMAX; + case 21: return SOFTMAX_LOSS; + case 22: return SPLIT; + case 33: return SLICE; + case 23: return TANH; + case 24: return WINDOW_DATA; + case 31: return THRESHOLD; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LayerType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LayerType findValueByNumber(int number) { + return LayerType.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.V1LayerParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final LayerType[] VALUES = values(); + + public static LayerType 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 LayerType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.V1LayerParameter.LayerType) + } + + /** + * Protobuf enum {@code caffe.V1LayerParameter.DimCheckMode} + */ + public enum DimCheckMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STRICT = 0; + */ + STRICT(0, 0), + /** + * PERMISSIVE = 1; + */ + PERMISSIVE(1, 1), + ; + + /** + * STRICT = 0; + */ + public static final int STRICT_VALUE = 0; + /** + * PERMISSIVE = 1; + */ + 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 final com.google.protobuf.Internal.EnumLiteMap< + DimCheckMode> 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.V1LayerParameter.getDescriptor().getEnumTypes().get(1); + } + + 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.V1LayerParameter.DimCheckMode) + } + + private int bitField0_; + private int bitField1_; + public static final int BOTTOM_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList bottom_; + /** + * repeated string bottom = 2; + */ + public com.google.protobuf.ProtocolStringList + getBottomList() { + return bottom_; + } + /** + * repeated string bottom = 2; + */ + public int getBottomCount() { + return bottom_.size(); + } + /** + * repeated string bottom = 2; + */ + public java.lang.String getBottom(int index) { + return bottom_.get(index); + } + /** + * repeated string bottom = 2; + */ + public com.google.protobuf.ByteString + getBottomBytes(int index) { + return bottom_.getByteString(index); + } + + public static final int TOP_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList top_; + /** + * repeated string top = 3; + */ + public com.google.protobuf.ProtocolStringList + getTopList() { + return top_; + } + /** + * repeated string top = 3; + */ + public int getTopCount() { + return top_.size(); + } + /** + * repeated string top = 3; + */ + public java.lang.String getTop(int index) { + return top_.get(index); + } + /** + * repeated string top = 3; + */ + public com.google.protobuf.ByteString + getTopBytes(int index) { + return top_.getByteString(index); + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * optional string name = 4; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 4; + */ + 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 = 4; + */ + 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; + } + } + + public static final int INCLUDE_FIELD_NUMBER = 32; + private java.util.List include_; + /** + * repeated .caffe.NetStateRule include = 32; + */ + public java.util.List getIncludeList() { + return include_; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public java.util.List + getIncludeOrBuilderList() { + return include_; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public int getIncludeCount() { + return include_.size(); + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRule getInclude(int index) { + return include_.get(index); + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( + int index) { + return include_.get(index); + } + + public static final int EXCLUDE_FIELD_NUMBER = 33; + private java.util.List exclude_; + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public java.util.List getExcludeList() { + return exclude_; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public java.util.List + getExcludeOrBuilderList() { + return exclude_; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public int getExcludeCount() { + return exclude_.size(); + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRule getExclude(int index) { + return exclude_.get(index); + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( + int index) { + return exclude_.get(index); + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_; + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public caffe.Caffe.V1LayerParameter.LayerType getType() { + caffe.Caffe.V1LayerParameter.LayerType result = caffe.Caffe.V1LayerParameter.LayerType.valueOf(type_); + return result == null ? caffe.Caffe.V1LayerParameter.LayerType.NONE : result; + } + + public static final int BLOBS_FIELD_NUMBER = 6; + private java.util.List blobs_; + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public java.util.List getBlobsList() { + return blobs_; + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public java.util.List + getBlobsOrBuilderList() { + return blobs_; + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public int getBlobsCount() { + return blobs_.size(); + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProto getBlobs(int index) { + return blobs_.get(index); + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index) { + return blobs_.get(index); + } + + public static final int PARAM_FIELD_NUMBER = 1001; + private com.google.protobuf.LazyStringList param_; + /** + * repeated string param = 1001; + */ + public com.google.protobuf.ProtocolStringList + getParamList() { + return param_; + } + /** + * repeated string param = 1001; + */ + public int getParamCount() { + return param_.size(); + } + /** + * repeated string param = 1001; + */ + public java.lang.String getParam(int index) { + return param_.get(index); + } + /** + * repeated string param = 1001; + */ + public com.google.protobuf.ByteString + getParamBytes(int index) { + return param_.getByteString(index); + } + + public static final int BLOB_SHARE_MODE_FIELD_NUMBER = 1002; + private java.util.List blobShareMode_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode> blobShareMode_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>() { + public caffe.Caffe.V1LayerParameter.DimCheckMode convert(java.lang.Integer from) { + caffe.Caffe.V1LayerParameter.DimCheckMode result = caffe.Caffe.V1LayerParameter.DimCheckMode.valueOf(from); + return result == null ? caffe.Caffe.V1LayerParameter.DimCheckMode.STRICT : result; + } + }; + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public java.util.List getBlobShareModeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>(blobShareMode_, blobShareMode_converter_); + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public int getBlobShareModeCount() { + return blobShareMode_.size(); + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index) { + return blobShareMode_converter_.convert(blobShareMode_.get(index)); + } + + public static final int BLOBS_LR_FIELD_NUMBER = 7; + private java.util.List blobsLr_; + /** + * repeated float blobs_lr = 7; + */ + public java.util.List + getBlobsLrList() { + return blobsLr_; + } + /** + * repeated float blobs_lr = 7; + */ + public int getBlobsLrCount() { + return blobsLr_.size(); + } + /** + * repeated float blobs_lr = 7; + */ + public float getBlobsLr(int index) { + return blobsLr_.get(index); + } + + public static final int WEIGHT_DECAY_FIELD_NUMBER = 8; + private java.util.List weightDecay_; + /** + * repeated float weight_decay = 8; + */ + public java.util.List + getWeightDecayList() { + return weightDecay_; + } + /** + * repeated float weight_decay = 8; + */ + public int getWeightDecayCount() { + return weightDecay_.size(); + } + /** + * repeated float weight_decay = 8; + */ + public float getWeightDecay(int index) { + return weightDecay_.get(index); + } + + public static final int LOSS_WEIGHT_FIELD_NUMBER = 35; + private java.util.List lossWeight_; + /** + * repeated float loss_weight = 35; + */ + public java.util.List + getLossWeightList() { + return lossWeight_; + } + /** + * repeated float loss_weight = 35; + */ + public int getLossWeightCount() { + return lossWeight_.size(); + } + /** + * repeated float loss_weight = 35; + */ + public float getLossWeight(int index) { + return lossWeight_.get(index); + } + + public static final int ACCURACY_PARAM_FIELD_NUMBER = 27; + private caffe.Caffe.AccuracyParameter accuracyParam_; + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public boolean hasAccuracyParam() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public caffe.Caffe.AccuracyParameter getAccuracyParam() { + return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder() { + return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } + + public static final int ARGMAX_PARAM_FIELD_NUMBER = 23; + private caffe.Caffe.ArgMaxParameter argmaxParam_; + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public boolean hasArgmaxParam() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public caffe.Caffe.ArgMaxParameter getArgmaxParam() { + return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { + return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + + public static final int CONCAT_PARAM_FIELD_NUMBER = 9; + private caffe.Caffe.ConcatParameter concatParam_; + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public boolean hasConcatParam() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public caffe.Caffe.ConcatParameter getConcatParam() { + return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { + return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + + public static final int CONTRASTIVE_LOSS_PARAM_FIELD_NUMBER = 40; + private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_; + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public boolean hasContrastiveLossParam() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { + return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { + return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + + public static final int CONVOLUTION_PARAM_FIELD_NUMBER = 10; + private caffe.Caffe.ConvolutionParameter convolutionParam_; + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public boolean hasConvolutionParam() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public caffe.Caffe.ConvolutionParameter getConvolutionParam() { + return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { + return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + + public static final int DATA_PARAM_FIELD_NUMBER = 11; + private caffe.Caffe.DataParameter dataParam_; + /** + * optional .caffe.DataParameter data_param = 11; + */ + public boolean hasDataParam() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public caffe.Caffe.DataParameter getDataParam() { + return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { + return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + + public static final int DROPOUT_PARAM_FIELD_NUMBER = 12; + private caffe.Caffe.DropoutParameter dropoutParam_; + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public boolean hasDropoutParam() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public caffe.Caffe.DropoutParameter getDropoutParam() { + return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { + return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + + public static final int DUMMY_DATA_PARAM_FIELD_NUMBER = 26; + private caffe.Caffe.DummyDataParameter dummyDataParam_; + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public boolean hasDummyDataParam() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public caffe.Caffe.DummyDataParameter getDummyDataParam() { + return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { + return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + + public static final int ELTWISE_PARAM_FIELD_NUMBER = 24; + private caffe.Caffe.EltwiseParameter eltwiseParam_; + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public boolean hasEltwiseParam() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public caffe.Caffe.EltwiseParameter getEltwiseParam() { + return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { + return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + + public static final int EXP_PARAM_FIELD_NUMBER = 41; + private caffe.Caffe.ExpParameter expParam_; + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public boolean hasExpParam() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public caffe.Caffe.ExpParameter getExpParam() { + return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { + return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + + public static final int HDF5_DATA_PARAM_FIELD_NUMBER = 13; + private caffe.Caffe.HDF5DataParameter hdf5DataParam_; + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public boolean hasHdf5DataParam() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { + return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { + return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + + public static final int HDF5_OUTPUT_PARAM_FIELD_NUMBER = 14; + private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_; + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public boolean hasHdf5OutputParam() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + + public static final int HINGE_LOSS_PARAM_FIELD_NUMBER = 29; + private caffe.Caffe.HingeLossParameter hingeLossParam_; + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public boolean hasHingeLossParam() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public caffe.Caffe.HingeLossParameter getHingeLossParam() { + return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { + return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + + public static final int IMAGE_DATA_PARAM_FIELD_NUMBER = 15; + private caffe.Caffe.ImageDataParameter imageDataParam_; + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public boolean hasImageDataParam() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public caffe.Caffe.ImageDataParameter getImageDataParam() { + return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { + return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + + public static final int INFOGAIN_LOSS_PARAM_FIELD_NUMBER = 16; + private caffe.Caffe.InfogainLossParameter infogainLossParam_; + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public boolean hasInfogainLossParam() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { + return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { + return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + + public static final int INNER_PRODUCT_PARAM_FIELD_NUMBER = 17; + private caffe.Caffe.InnerProductParameter innerProductParam_; + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public boolean hasInnerProductParam() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public caffe.Caffe.InnerProductParameter getInnerProductParam() { + return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { + return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + + public static final int LRN_PARAM_FIELD_NUMBER = 18; + private caffe.Caffe.LRNParameter lrnParam_; + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public boolean hasLrnParam() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public caffe.Caffe.LRNParameter getLrnParam() { + return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { + return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + + public static final int MEMORY_DATA_PARAM_FIELD_NUMBER = 22; + private caffe.Caffe.MemoryDataParameter memoryDataParam_; + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public boolean hasMemoryDataParam() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { + return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { + return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + + public static final int MVN_PARAM_FIELD_NUMBER = 34; + private caffe.Caffe.MVNParameter mvnParam_; + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public boolean hasMvnParam() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public caffe.Caffe.MVNParameter getMvnParam() { + return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { + return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + + public static final int POOLING_PARAM_FIELD_NUMBER = 19; + private caffe.Caffe.PoolingParameter poolingParam_; + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public boolean hasPoolingParam() { + return ((bitField0_ & 0x00200000) == 0x00200000); + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public caffe.Caffe.PoolingParameter getPoolingParam() { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + + public static final int POWER_PARAM_FIELD_NUMBER = 21; + private caffe.Caffe.PowerParameter powerParam_; + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public boolean hasPowerParam() { + return ((bitField0_ & 0x00400000) == 0x00400000); + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public caffe.Caffe.PowerParameter getPowerParam() { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + + public static final int RELU_PARAM_FIELD_NUMBER = 30; + private caffe.Caffe.ReLUParameter reluParam_; + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public boolean hasReluParam() { + return ((bitField0_ & 0x00800000) == 0x00800000); + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public caffe.Caffe.ReLUParameter getReluParam() { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + + public static final int SIGMOID_PARAM_FIELD_NUMBER = 38; + private caffe.Caffe.SigmoidParameter sigmoidParam_; + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public boolean hasSigmoidParam() { + return ((bitField0_ & 0x01000000) == 0x01000000); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public caffe.Caffe.SigmoidParameter getSigmoidParam() { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + + public static final int SOFTMAX_PARAM_FIELD_NUMBER = 39; + private caffe.Caffe.SoftmaxParameter softmaxParam_; + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public boolean hasSoftmaxParam() { + return ((bitField0_ & 0x02000000) == 0x02000000); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + + public static final int SLICE_PARAM_FIELD_NUMBER = 31; + private caffe.Caffe.SliceParameter sliceParam_; + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public boolean hasSliceParam() { + return ((bitField0_ & 0x04000000) == 0x04000000); + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public caffe.Caffe.SliceParameter getSliceParam() { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + + public static final int TANH_PARAM_FIELD_NUMBER = 37; + private caffe.Caffe.TanHParameter tanhParam_; + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public boolean hasTanhParam() { + return ((bitField0_ & 0x08000000) == 0x08000000); + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public caffe.Caffe.TanHParameter getTanhParam() { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + + public static final int THRESHOLD_PARAM_FIELD_NUMBER = 25; + private caffe.Caffe.ThresholdParameter thresholdParam_; + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public boolean hasThresholdParam() { + return ((bitField0_ & 0x10000000) == 0x10000000); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public caffe.Caffe.ThresholdParameter getThresholdParam() { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + + public static final int WINDOW_DATA_PARAM_FIELD_NUMBER = 20; + private caffe.Caffe.WindowDataParameter windowDataParam_; + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public boolean hasWindowDataParam() { + return ((bitField0_ & 0x20000000) == 0x20000000); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public caffe.Caffe.WindowDataParameter getWindowDataParam() { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + + public static final int TRANSFORM_PARAM_FIELD_NUMBER = 36; + private caffe.Caffe.TransformationParameter transformParam_; + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public boolean hasTransformParam() { + return ((bitField0_ & 0x40000000) == 0x40000000); + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public caffe.Caffe.TransformationParameter getTransformParam() { + return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { + return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + + public static final int LOSS_PARAM_FIELD_NUMBER = 42; + private caffe.Caffe.LossParameter lossParam_; + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public boolean hasLossParam() { + return ((bitField0_ & 0x80000000) == 0x80000000); + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public caffe.Caffe.LossParameter getLossParam() { + return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { + return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + + public static final int LAYER_FIELD_NUMBER = 1; + private caffe.Caffe.V0LayerParameter layer_; + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public boolean hasLayer() { + return ((bitField1_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public caffe.Caffe.V0LayerParameter getLayer() { + return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder() { + return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField1_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getLayer()); + } + for (int i = 0; i < bottom_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bottom_.getRaw(i)); + } + for (int i = 0; i < top_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, top_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(5, type_); + } + for (int i = 0; i < blobs_.size(); i++) { + output.writeMessage(6, blobs_.get(i)); + } + for (int i = 0; i < blobsLr_.size(); i++) { + output.writeFloat(7, blobsLr_.get(i)); + } + for (int i = 0; i < weightDecay_.size(); i++) { + output.writeFloat(8, weightDecay_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(9, getConcatParam()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(10, getConvolutionParam()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(11, getDataParam()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeMessage(12, getDropoutParam()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeMessage(13, getHdf5DataParam()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeMessage(14, getHdf5OutputParam()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeMessage(15, getImageDataParam()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + output.writeMessage(16, getInfogainLossParam()); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeMessage(17, getInnerProductParam()); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + output.writeMessage(18, getLrnParam()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + output.writeMessage(19, getPoolingParam()); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + output.writeMessage(20, getWindowDataParam()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + output.writeMessage(21, getPowerParam()); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + output.writeMessage(22, getMemoryDataParam()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(23, getArgmaxParam()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeMessage(24, getEltwiseParam()); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + output.writeMessage(25, getThresholdParam()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(26, getDummyDataParam()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(27, getAccuracyParam()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + output.writeMessage(29, getHingeLossParam()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + output.writeMessage(30, getReluParam()); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + output.writeMessage(31, getSliceParam()); + } + for (int i = 0; i < include_.size(); i++) { + output.writeMessage(32, include_.get(i)); + } + for (int i = 0; i < exclude_.size(); i++) { + output.writeMessage(33, exclude_.get(i)); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + output.writeMessage(34, getMvnParam()); + } + for (int i = 0; i < lossWeight_.size(); i++) { + output.writeFloat(35, lossWeight_.get(i)); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + output.writeMessage(36, getTransformParam()); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + output.writeMessage(37, getTanhParam()); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + output.writeMessage(38, getSigmoidParam()); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + output.writeMessage(39, getSoftmaxParam()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(40, getContrastiveLossParam()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeMessage(41, getExpParam()); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + output.writeMessage(42, getLossParam()); + } + for (int i = 0; i < param_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1001, param_.getRaw(i)); + } + for (int i = 0; i < blobShareMode_.size(); i++) { + output.writeEnum(1002, blobShareMode_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField1_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLayer()); + } + { + int dataSize = 0; + for (int i = 0; i < bottom_.size(); i++) { + dataSize += computeStringSizeNoTag(bottom_.getRaw(i)); + } + size += dataSize; + size += 1 * getBottomList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < top_.size(); i++) { + dataSize += computeStringSizeNoTag(top_.getRaw(i)); + } + size += dataSize; + size += 1 * getTopList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, type_); + } + for (int i = 0; i < blobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, blobs_.get(i)); + } + { + int dataSize = 0; + dataSize = 4 * getBlobsLrList().size(); + size += dataSize; + size += 1 * getBlobsLrList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getWeightDecayList().size(); + size += dataSize; + size += 1 * getWeightDecayList().size(); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getConcatParam()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getConvolutionParam()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getDataParam()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getDropoutParam()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getHdf5DataParam()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getHdf5OutputParam()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getImageDataParam()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getInfogainLossParam()); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getInnerProductParam()); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLrnParam()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getPoolingParam()); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getWindowDataParam()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getPowerParam()); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getMemoryDataParam()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getArgmaxParam()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getEltwiseParam()); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getThresholdParam()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(26, getDummyDataParam()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, getAccuracyParam()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(29, getHingeLossParam()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, getReluParam()); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, getSliceParam()); + } + for (int i = 0; i < include_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, include_.get(i)); + } + for (int i = 0; i < exclude_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, exclude_.get(i)); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, getMvnParam()); + } + { + int dataSize = 0; + dataSize = 4 * getLossWeightList().size(); + size += dataSize; + size += 2 * getLossWeightList().size(); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, getTransformParam()); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, getTanhParam()); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(38, getSigmoidParam()); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, getSoftmaxParam()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(40, getContrastiveLossParam()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, getExpParam()); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, getLossParam()); + } + { + int dataSize = 0; + for (int i = 0; i < param_.size(); i++) { + dataSize += computeStringSizeNoTag(param_.getRaw(i)); + } + size += dataSize; + size += 2 * getParamList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < blobShareMode_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(blobShareMode_.get(i)); + } + size += dataSize; + size += 2 * blobShareMode_.size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.V1LayerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.V1LayerParameter 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.V1LayerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.V1LayerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.V1LayerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.V1LayerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.V1LayerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.V1LayerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.V1LayerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.V1LayerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.V1LayerParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.V1LayerParameter} + * + *
+     * DEPRECATED: use LayerParameter.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.V1LayerParameter) + caffe.Caffe.V1LayerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_V1LayerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.V1LayerParameter.class, caffe.Caffe.V1LayerParameter.Builder.class); + } + + // Construct using caffe.Caffe.V1LayerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getIncludeFieldBuilder(); + getExcludeFieldBuilder(); + getBlobsFieldBuilder(); + getAccuracyParamFieldBuilder(); + getArgmaxParamFieldBuilder(); + getConcatParamFieldBuilder(); + getContrastiveLossParamFieldBuilder(); + getConvolutionParamFieldBuilder(); + getDataParamFieldBuilder(); + getDropoutParamFieldBuilder(); + getDummyDataParamFieldBuilder(); + getEltwiseParamFieldBuilder(); + getExpParamFieldBuilder(); + getHdf5DataParamFieldBuilder(); + getHdf5OutputParamFieldBuilder(); + getHingeLossParamFieldBuilder(); + getImageDataParamFieldBuilder(); + getInfogainLossParamFieldBuilder(); + getInnerProductParamFieldBuilder(); + getLrnParamFieldBuilder(); + getMemoryDataParamFieldBuilder(); + getMvnParamFieldBuilder(); + getPoolingParamFieldBuilder(); + getPowerParamFieldBuilder(); + getReluParamFieldBuilder(); + getSigmoidParamFieldBuilder(); + getSoftmaxParamFieldBuilder(); + getSliceParamFieldBuilder(); + getTanhParamFieldBuilder(); + getThresholdParamFieldBuilder(); + getWindowDataParamFieldBuilder(); + getTransformParamFieldBuilder(); + getLossParamFieldBuilder(); + getLayerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + top_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + if (includeBuilder_ == null) { + include_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + includeBuilder_.clear(); + } + if (excludeBuilder_ == null) { + exclude_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + excludeBuilder_.clear(); + } + type_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + blobsBuilder_.clear(); + } + param_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + blobShareMode_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + blobsLr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + weightDecay_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + lossWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + if (accuracyParamBuilder_ == null) { + accuracyParam_ = null; + } else { + accuracyParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + if (argmaxParamBuilder_ == null) { + argmaxParam_ = null; + } else { + argmaxParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (concatParamBuilder_ == null) { + concatParam_ = null; + } else { + concatParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = null; + } else { + contrastiveLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + if (convolutionParamBuilder_ == null) { + convolutionParam_ = null; + } else { + convolutionParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + if (dataParamBuilder_ == null) { + dataParam_ = null; + } else { + dataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + if (dropoutParamBuilder_ == null) { + dropoutParam_ = null; + } else { + dropoutParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = null; + } else { + dummyDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = null; + } else { + eltwiseParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + if (expParamBuilder_ == null) { + expParam_ = null; + } else { + expParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00200000); + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = null; + } else { + hdf5DataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00800000); + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = null; + } else { + hingeLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); + if (imageDataParamBuilder_ == null) { + imageDataParam_ = null; + } else { + imageDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = null; + } else { + infogainLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x04000000); + if (innerProductParamBuilder_ == null) { + innerProductParam_ = null; + } else { + innerProductParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x08000000); + if (lrnParamBuilder_ == null) { + lrnParam_ = null; + } else { + lrnParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = null; + } else { + memoryDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + if (mvnParamBuilder_ == null) { + mvnParam_ = null; + } else { + mvnParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x40000000); + if (poolingParamBuilder_ == null) { + poolingParam_ = null; + } else { + poolingParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + if (powerParamBuilder_ == null) { + powerParam_ = null; + } else { + powerParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + if (reluParamBuilder_ == null) { + reluParam_ = null; + } else { + reluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000002); + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = null; + } else { + sigmoidParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000004); + if (softmaxParamBuilder_ == null) { + softmaxParam_ = null; + } else { + softmaxParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000008); + if (sliceParamBuilder_ == null) { + sliceParam_ = null; + } else { + sliceParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000010); + if (tanhParamBuilder_ == null) { + tanhParam_ = null; + } else { + tanhParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + if (thresholdParamBuilder_ == null) { + thresholdParam_ = null; + } else { + thresholdParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000040); + if (windowDataParamBuilder_ == null) { + windowDataParam_ = null; + } else { + windowDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000080); + if (transformParamBuilder_ == null) { + transformParam_ = null; + } else { + transformParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000100); + if (lossParamBuilder_ == null) { + lossParam_ = null; + } else { + lossParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000200); + if (layerBuilder_ == null) { + layer_ = null; + } else { + layerBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000400); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_V1LayerParameter_descriptor; + } + + public caffe.Caffe.V1LayerParameter getDefaultInstanceForType() { + return caffe.Caffe.V1LayerParameter.getDefaultInstance(); + } + + public caffe.Caffe.V1LayerParameter build() { + caffe.Caffe.V1LayerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.V1LayerParameter buildPartial() { + caffe.Caffe.V1LayerParameter result = new caffe.Caffe.V1LayerParameter(this); + int from_bitField0_ = bitField0_; + int from_bitField1_ = bitField1_; + int to_bitField0_ = 0; + int to_bitField1_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + bottom_ = bottom_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bottom_ = bottom_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + top_ = top_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.top_ = top_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (includeBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + include_ = java.util.Collections.unmodifiableList(include_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.include_ = include_; + } else { + result.include_ = includeBuilder_.build(); + } + if (excludeBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + exclude_ = java.util.Collections.unmodifiableList(exclude_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.exclude_ = exclude_; + } else { + result.exclude_ = excludeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (blobsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + blobs_ = java.util.Collections.unmodifiableList(blobs_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.blobs_ = blobs_; + } else { + result.blobs_ = blobsBuilder_.build(); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + param_ = param_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.param_ = param_; + if (((bitField0_ & 0x00000100) == 0x00000100)) { + blobShareMode_ = java.util.Collections.unmodifiableList(blobShareMode_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.blobShareMode_ = blobShareMode_; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.blobsLr_ = blobsLr_; + if (((bitField0_ & 0x00000400) == 0x00000400)) { + weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.weightDecay_ = weightDecay_; + if (((bitField0_ & 0x00000800) == 0x00000800)) { + lossWeight_ = java.util.Collections.unmodifiableList(lossWeight_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.lossWeight_ = lossWeight_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000004; + } + if (accuracyParamBuilder_ == null) { + result.accuracyParam_ = accuracyParam_; + } else { + result.accuracyParam_ = accuracyParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00000008; + } + if (argmaxParamBuilder_ == null) { + result.argmaxParam_ = argmaxParam_; + } else { + result.argmaxParam_ = argmaxParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00000010; + } + if (concatParamBuilder_ == null) { + result.concatParam_ = concatParam_; + } else { + result.concatParam_ = concatParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) == 0x00008000)) { + to_bitField0_ |= 0x00000020; + } + if (contrastiveLossParamBuilder_ == null) { + result.contrastiveLossParam_ = contrastiveLossParam_; + } else { + result.contrastiveLossParam_ = contrastiveLossParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00000040; + } + if (convolutionParamBuilder_ == null) { + result.convolutionParam_ = convolutionParam_; + } else { + result.convolutionParam_ = convolutionParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00000080; + } + if (dataParamBuilder_ == null) { + result.dataParam_ = dataParam_; + } else { + result.dataParam_ = dataParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) == 0x00040000)) { + to_bitField0_ |= 0x00000100; + } + if (dropoutParamBuilder_ == null) { + result.dropoutParam_ = dropoutParam_; + } else { + result.dropoutParam_ = dropoutParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) == 0x00080000)) { + to_bitField0_ |= 0x00000200; + } + if (dummyDataParamBuilder_ == null) { + result.dummyDataParam_ = dummyDataParam_; + } else { + result.dummyDataParam_ = dummyDataParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) == 0x00100000)) { + to_bitField0_ |= 0x00000400; + } + if (eltwiseParamBuilder_ == null) { + result.eltwiseParam_ = eltwiseParam_; + } else { + result.eltwiseParam_ = eltwiseParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00200000) == 0x00200000)) { + to_bitField0_ |= 0x00000800; + } + if (expParamBuilder_ == null) { + result.expParam_ = expParam_; + } else { + result.expParam_ = expParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00400000) == 0x00400000)) { + to_bitField0_ |= 0x00001000; + } + if (hdf5DataParamBuilder_ == null) { + result.hdf5DataParam_ = hdf5DataParam_; + } else { + result.hdf5DataParam_ = hdf5DataParamBuilder_.build(); + } + if (((from_bitField0_ & 0x00800000) == 0x00800000)) { + to_bitField0_ |= 0x00002000; + } + if (hdf5OutputParamBuilder_ == null) { + result.hdf5OutputParam_ = hdf5OutputParam_; + } else { + result.hdf5OutputParam_ = hdf5OutputParamBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) == 0x01000000)) { + to_bitField0_ |= 0x00004000; + } + if (hingeLossParamBuilder_ == null) { + result.hingeLossParam_ = hingeLossParam_; + } else { + result.hingeLossParam_ = hingeLossParamBuilder_.build(); + } + if (((from_bitField0_ & 0x02000000) == 0x02000000)) { + to_bitField0_ |= 0x00008000; + } + if (imageDataParamBuilder_ == null) { + result.imageDataParam_ = imageDataParam_; + } else { + result.imageDataParam_ = imageDataParamBuilder_.build(); + } + if (((from_bitField0_ & 0x04000000) == 0x04000000)) { + to_bitField0_ |= 0x00010000; + } + if (infogainLossParamBuilder_ == null) { + result.infogainLossParam_ = infogainLossParam_; + } else { + result.infogainLossParam_ = infogainLossParamBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) == 0x08000000)) { + to_bitField0_ |= 0x00020000; + } + if (innerProductParamBuilder_ == null) { + result.innerProductParam_ = innerProductParam_; + } else { + result.innerProductParam_ = innerProductParamBuilder_.build(); + } + if (((from_bitField0_ & 0x10000000) == 0x10000000)) { + to_bitField0_ |= 0x00040000; + } + if (lrnParamBuilder_ == null) { + result.lrnParam_ = lrnParam_; + } else { + result.lrnParam_ = lrnParamBuilder_.build(); + } + if (((from_bitField0_ & 0x20000000) == 0x20000000)) { + to_bitField0_ |= 0x00080000; + } + if (memoryDataParamBuilder_ == null) { + result.memoryDataParam_ = memoryDataParam_; + } else { + result.memoryDataParam_ = memoryDataParamBuilder_.build(); + } + if (((from_bitField0_ & 0x40000000) == 0x40000000)) { + to_bitField0_ |= 0x00100000; + } + if (mvnParamBuilder_ == null) { + result.mvnParam_ = mvnParam_; + } else { + result.mvnParam_ = mvnParamBuilder_.build(); + } + if (((from_bitField0_ & 0x80000000) == 0x80000000)) { + to_bitField0_ |= 0x00200000; + } + if (poolingParamBuilder_ == null) { + result.poolingParam_ = poolingParam_; + } else { + result.poolingParam_ = poolingParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00400000; + } + if (powerParamBuilder_ == null) { + result.powerParam_ = powerParam_; + } else { + result.powerParam_ = powerParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00800000; + } + if (reluParamBuilder_ == null) { + result.reluParam_ = reluParam_; + } else { + result.reluParam_ = reluParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x01000000; + } + if (sigmoidParamBuilder_ == null) { + result.sigmoidParam_ = sigmoidParam_; + } else { + result.sigmoidParam_ = sigmoidParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x02000000; + } + if (softmaxParamBuilder_ == null) { + result.softmaxParam_ = softmaxParam_; + } else { + result.softmaxParam_ = softmaxParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x04000000; + } + if (sliceParamBuilder_ == null) { + result.sliceParam_ = sliceParam_; + } else { + result.sliceParam_ = sliceParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x08000000; + } + if (tanhParamBuilder_ == null) { + result.tanhParam_ = tanhParam_; + } else { + result.tanhParam_ = tanhParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x10000000; + } + if (thresholdParamBuilder_ == null) { + result.thresholdParam_ = thresholdParam_; + } else { + result.thresholdParam_ = thresholdParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x20000000; + } + if (windowDataParamBuilder_ == null) { + result.windowDataParam_ = windowDataParam_; + } else { + result.windowDataParam_ = windowDataParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x40000000; + } + if (transformParamBuilder_ == null) { + result.transformParam_ = transformParam_; + } else { + result.transformParam_ = transformParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x80000000; + } + if (lossParamBuilder_ == null) { + result.lossParam_ = lossParam_; + } else { + result.lossParam_ = lossParamBuilder_.build(); + } + if (((from_bitField1_ & 0x00000400) == 0x00000400)) { + to_bitField1_ |= 0x00000001; + } + if (layerBuilder_ == null) { + result.layer_ = layer_; + } else { + result.layer_ = layerBuilder_.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.V1LayerParameter) { + return mergeFrom((caffe.Caffe.V1LayerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.V1LayerParameter other) { + if (other == caffe.Caffe.V1LayerParameter.getDefaultInstance()) return this; + if (!other.bottom_.isEmpty()) { + if (bottom_.isEmpty()) { + bottom_ = other.bottom_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBottomIsMutable(); + bottom_.addAll(other.bottom_); + } + onChanged(); + } + if (!other.top_.isEmpty()) { + if (top_.isEmpty()) { + top_ = other.top_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTopIsMutable(); + top_.addAll(other.top_); + } + onChanged(); + } + if (other.hasName()) { + bitField0_ |= 0x00000004; + name_ = other.name_; + onChanged(); + } + if (includeBuilder_ == null) { + if (!other.include_.isEmpty()) { + if (include_.isEmpty()) { + include_ = other.include_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureIncludeIsMutable(); + include_.addAll(other.include_); + } + onChanged(); + } + } else { + if (!other.include_.isEmpty()) { + if (includeBuilder_.isEmpty()) { + includeBuilder_.dispose(); + includeBuilder_ = null; + include_ = other.include_; + bitField0_ = (bitField0_ & ~0x00000008); + 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_ & ~0x00000010); + } else { + ensureExcludeIsMutable(); + exclude_.addAll(other.exclude_); + } + onChanged(); + } + } else { + if (!other.exclude_.isEmpty()) { + if (excludeBuilder_.isEmpty()) { + excludeBuilder_.dispose(); + excludeBuilder_ = null; + exclude_ = other.exclude_; + bitField0_ = (bitField0_ & ~0x00000010); + excludeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getExcludeFieldBuilder() : null; + } else { + excludeBuilder_.addAllMessages(other.exclude_); + } + } + } + if (other.hasType()) { + setType(other.getType()); + } + if (blobsBuilder_ == null) { + if (!other.blobs_.isEmpty()) { + if (blobs_.isEmpty()) { + blobs_ = other.blobs_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureBlobsIsMutable(); + blobs_.addAll(other.blobs_); + } + onChanged(); + } + } else { + if (!other.blobs_.isEmpty()) { + if (blobsBuilder_.isEmpty()) { + blobsBuilder_.dispose(); + blobsBuilder_ = null; + blobs_ = other.blobs_; + bitField0_ = (bitField0_ & ~0x00000040); + blobsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBlobsFieldBuilder() : null; + } else { + blobsBuilder_.addAllMessages(other.blobs_); + } + } + } + if (!other.param_.isEmpty()) { + if (param_.isEmpty()) { + param_ = other.param_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureParamIsMutable(); + param_.addAll(other.param_); + } + onChanged(); + } + if (!other.blobShareMode_.isEmpty()) { + if (blobShareMode_.isEmpty()) { + blobShareMode_ = other.blobShareMode_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureBlobShareModeIsMutable(); + blobShareMode_.addAll(other.blobShareMode_); + } + onChanged(); + } + if (!other.blobsLr_.isEmpty()) { + if (blobsLr_.isEmpty()) { + blobsLr_ = other.blobsLr_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureBlobsLrIsMutable(); + blobsLr_.addAll(other.blobsLr_); + } + onChanged(); + } + if (!other.weightDecay_.isEmpty()) { + if (weightDecay_.isEmpty()) { + weightDecay_ = other.weightDecay_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureWeightDecayIsMutable(); + weightDecay_.addAll(other.weightDecay_); + } + onChanged(); + } + if (!other.lossWeight_.isEmpty()) { + if (lossWeight_.isEmpty()) { + lossWeight_ = other.lossWeight_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureLossWeightIsMutable(); + lossWeight_.addAll(other.lossWeight_); + } + onChanged(); + } + if (other.hasAccuracyParam()) { + mergeAccuracyParam(other.getAccuracyParam()); + } + if (other.hasArgmaxParam()) { + mergeArgmaxParam(other.getArgmaxParam()); + } + if (other.hasConcatParam()) { + mergeConcatParam(other.getConcatParam()); + } + if (other.hasContrastiveLossParam()) { + mergeContrastiveLossParam(other.getContrastiveLossParam()); + } + if (other.hasConvolutionParam()) { + mergeConvolutionParam(other.getConvolutionParam()); + } + 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.hasExpParam()) { + mergeExpParam(other.getExpParam()); + } + 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.hasLrnParam()) { + mergeLrnParam(other.getLrnParam()); + } + if (other.hasMemoryDataParam()) { + mergeMemoryDataParam(other.getMemoryDataParam()); + } + if (other.hasMvnParam()) { + mergeMvnParam(other.getMvnParam()); + } + if (other.hasPoolingParam()) { + mergePoolingParam(other.getPoolingParam()); + } + if (other.hasPowerParam()) { + mergePowerParam(other.getPowerParam()); + } + if (other.hasReluParam()) { + mergeReluParam(other.getReluParam()); + } + if (other.hasSigmoidParam()) { + mergeSigmoidParam(other.getSigmoidParam()); + } + if (other.hasSoftmaxParam()) { + mergeSoftmaxParam(other.getSoftmaxParam()); + } + if (other.hasSliceParam()) { + mergeSliceParam(other.getSliceParam()); + } + if (other.hasTanhParam()) { + mergeTanhParam(other.getTanhParam()); + } + if (other.hasThresholdParam()) { + mergeThresholdParam(other.getThresholdParam()); + } + if (other.hasWindowDataParam()) { + mergeWindowDataParam(other.getWindowDataParam()); + } + if (other.hasTransformParam()) { + mergeTransformParam(other.getTransformParam()); + } + if (other.hasLossParam()) { + mergeLossParam(other.getLossParam()); + } + if (other.hasLayer()) { + mergeLayer(other.getLayer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.V1LayerParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.V1LayerParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + private int bitField1_; + + private com.google.protobuf.LazyStringList bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureBottomIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + bottom_ = new com.google.protobuf.LazyStringArrayList(bottom_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string bottom = 2; + */ + public com.google.protobuf.ProtocolStringList + getBottomList() { + return bottom_.getUnmodifiableView(); + } + /** + * repeated string bottom = 2; + */ + public int getBottomCount() { + return bottom_.size(); + } + /** + * repeated string bottom = 2; + */ + public java.lang.String getBottom(int index) { + return bottom_.get(index); + } + /** + * repeated string bottom = 2; + */ + public com.google.protobuf.ByteString + getBottomBytes(int index) { + return bottom_.getByteString(index); + } + /** + * repeated string bottom = 2; + */ + 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 = 2; + */ + public Builder addBottom( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBottomIsMutable(); + bottom_.add(value); + onChanged(); + return this; + } + /** + * repeated string bottom = 2; + */ + public Builder addAllBottom( + java.lang.Iterable values) { + ensureBottomIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bottom_); + onChanged(); + return this; + } + /** + * repeated string bottom = 2; + */ + public Builder clearBottom() { + bottom_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string bottom = 2; + */ + public Builder addBottomBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBottomIsMutable(); + bottom_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList top_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTopIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + top_ = new com.google.protobuf.LazyStringArrayList(top_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string top = 3; + */ + public com.google.protobuf.ProtocolStringList + getTopList() { + return top_.getUnmodifiableView(); + } + /** + * repeated string top = 3; + */ + public int getTopCount() { + return top_.size(); + } + /** + * repeated string top = 3; + */ + public java.lang.String getTop(int index) { + return top_.get(index); + } + /** + * repeated string top = 3; + */ + public com.google.protobuf.ByteString + getTopBytes(int index) { + return top_.getByteString(index); + } + /** + * repeated string top = 3; + */ + 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 = 3; + */ + public Builder addTop( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopIsMutable(); + top_.add(value); + onChanged(); + return this; + } + /** + * repeated string top = 3; + */ + public Builder addAllTop( + java.lang.Iterable values) { + ensureTopIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, top_); + onChanged(); + return this; + } + /** + * repeated string top = 3; + */ + public Builder clearTop() { + top_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string top = 3; + */ + public Builder addTopBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopIsMutable(); + top_.add(value); + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 4; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string name = 4; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 4; + */ + 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 = 4; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 4; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000004); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 4; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; + onChanged(); + return this; + } + + private java.util.List include_ = + java.util.Collections.emptyList(); + private void ensureIncludeIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + include_ = new java.util.ArrayList(include_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> includeBuilder_; + + /** + * repeated .caffe.NetStateRule include = 32; + */ + public java.util.List getIncludeList() { + if (includeBuilder_ == null) { + return java.util.Collections.unmodifiableList(include_); + } else { + return includeBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public int getIncludeCount() { + if (includeBuilder_ == null) { + return include_.size(); + } else { + return includeBuilder_.getCount(); + } + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRule getInclude(int index) { + if (includeBuilder_ == null) { + return include_.get(index); + } else { + return includeBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder setInclude( + int index, caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.set(index, value); + onChanged(); + } else { + includeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder setInclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.set(index, builderForValue.build()); + onChanged(); + } else { + includeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder addInclude(caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.add(value); + onChanged(); + } else { + includeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder addInclude( + int index, caffe.Caffe.NetStateRule value) { + if (includeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeIsMutable(); + include_.add(index, value); + onChanged(); + } else { + includeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder addInclude( + caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.add(builderForValue.build()); + onChanged(); + } else { + includeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder addInclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.add(index, builderForValue.build()); + onChanged(); + } else { + includeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder addAllInclude( + java.lang.Iterable values) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, include_); + onChanged(); + } else { + includeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder clearInclude() { + if (includeBuilder_ == null) { + include_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + includeBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public Builder removeInclude(int index) { + if (includeBuilder_ == null) { + ensureIncludeIsMutable(); + include_.remove(index); + onChanged(); + } else { + includeBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRule.Builder getIncludeBuilder( + int index) { + return getIncludeFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRuleOrBuilder getIncludeOrBuilder( + int index) { + if (includeBuilder_ == null) { + return include_.get(index); } else { + return includeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public java.util.List + getIncludeOrBuilderList() { + if (includeBuilder_ != null) { + return includeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(include_); + } + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRule.Builder addIncludeBuilder() { + return getIncludeFieldBuilder().addBuilder( + caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public caffe.Caffe.NetStateRule.Builder addIncludeBuilder( + int index) { + return getIncludeFieldBuilder().addBuilder( + index, caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule include = 32; + */ + public java.util.List + getIncludeBuilderList() { + return getIncludeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> + getIncludeFieldBuilder() { + if (includeBuilder_ == null) { + includeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( + include_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + include_ = null; + } + return includeBuilder_; + } + + private java.util.List exclude_ = + java.util.Collections.emptyList(); + private void ensureExcludeIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + exclude_ = new java.util.ArrayList(exclude_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> excludeBuilder_; + + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public java.util.List getExcludeList() { + if (excludeBuilder_ == null) { + return java.util.Collections.unmodifiableList(exclude_); + } else { + return excludeBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public int getExcludeCount() { + if (excludeBuilder_ == null) { + return exclude_.size(); + } else { + return excludeBuilder_.getCount(); + } + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRule getExclude(int index) { + if (excludeBuilder_ == null) { + return exclude_.get(index); + } else { + return excludeBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder setExclude( + int index, caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.set(index, value); + onChanged(); + } else { + excludeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder setExclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.set(index, builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder addExclude(caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.add(value); + onChanged(); + } else { + excludeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder addExclude( + int index, caffe.Caffe.NetStateRule value) { + if (excludeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeIsMutable(); + exclude_.add(index, value); + onChanged(); + } else { + excludeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder addExclude( + caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.add(builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder addExclude( + int index, caffe.Caffe.NetStateRule.Builder builderForValue) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.add(index, builderForValue.build()); + onChanged(); + } else { + excludeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder addAllExclude( + java.lang.Iterable values) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, exclude_); + onChanged(); + } else { + excludeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder clearExclude() { + if (excludeBuilder_ == null) { + exclude_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + excludeBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public Builder removeExclude(int index) { + if (excludeBuilder_ == null) { + ensureExcludeIsMutable(); + exclude_.remove(index); + onChanged(); + } else { + excludeBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRule.Builder getExcludeBuilder( + int index) { + return getExcludeFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRuleOrBuilder getExcludeOrBuilder( + int index) { + if (excludeBuilder_ == null) { + return exclude_.get(index); } else { + return excludeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public java.util.List + getExcludeOrBuilderList() { + if (excludeBuilder_ != null) { + return excludeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exclude_); + } + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRule.Builder addExcludeBuilder() { + return getExcludeFieldBuilder().addBuilder( + caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public caffe.Caffe.NetStateRule.Builder addExcludeBuilder( + int index) { + return getExcludeFieldBuilder().addBuilder( + index, caffe.Caffe.NetStateRule.getDefaultInstance()); + } + /** + * repeated .caffe.NetStateRule exclude = 33; + */ + public java.util.List + getExcludeBuilderList() { + return getExcludeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder> + getExcludeFieldBuilder() { + if (excludeBuilder_ == null) { + excludeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.NetStateRule, caffe.Caffe.NetStateRule.Builder, caffe.Caffe.NetStateRuleOrBuilder>( + exclude_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + exclude_ = null; + } + return excludeBuilder_; + } + + private int type_ = 0; + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public caffe.Caffe.V1LayerParameter.LayerType getType() { + caffe.Caffe.V1LayerParameter.LayerType result = caffe.Caffe.V1LayerParameter.LayerType.valueOf(type_); + return result == null ? caffe.Caffe.V1LayerParameter.LayerType.NONE : result; + } + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public Builder setType(caffe.Caffe.V1LayerParameter.LayerType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.V1LayerParameter.LayerType type = 5; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; + onChanged(); + return this; + } + + private java.util.List blobs_ = + java.util.Collections.emptyList(); + private void ensureBlobsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + blobs_ = new java.util.ArrayList(blobs_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; + + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public java.util.List getBlobsList() { + if (blobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobs_); + } else { + return blobsBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public int getBlobsCount() { + if (blobsBuilder_ == null) { + return blobs_.size(); + } else { + return blobsBuilder_.getCount(); + } + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProto getBlobs(int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); + } else { + return blobsBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + 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 = 6; + */ + 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 = 6; + */ + 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 = 6; + */ + 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 = 6; + */ + 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 = 6; + */ + 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 = 6; + */ + public Builder addAllBlobs( + java.lang.Iterable values) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blobs_); + onChanged(); + } else { + blobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public Builder clearBlobs() { + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + blobsBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public Builder removeBlobs(int index) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + blobs_.remove(index); + onChanged(); + } else { + blobsBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProto.Builder getBlobsBuilder( + int index) { + return getBlobsFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); } else { + return blobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public java.util.List + getBlobsOrBuilderList() { + if (blobsBuilder_ != null) { + return blobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blobs_); + } + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { + return getBlobsFieldBuilder().addBuilder( + caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder( + int index) { + return getBlobsFieldBuilder().addBuilder( + index, caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 6; + */ + 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_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + blobs_ = null; + } + return blobsBuilder_; + } + + private com.google.protobuf.LazyStringList param_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureParamIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + param_ = new com.google.protobuf.LazyStringArrayList(param_); + bitField0_ |= 0x00000080; + } + } + /** + * repeated string param = 1001; + */ + public com.google.protobuf.ProtocolStringList + getParamList() { + return param_.getUnmodifiableView(); + } + /** + * repeated string param = 1001; + */ + public int getParamCount() { + return param_.size(); + } + /** + * repeated string param = 1001; + */ + public java.lang.String getParam(int index) { + return param_.get(index); + } + /** + * repeated string param = 1001; + */ + public com.google.protobuf.ByteString + getParamBytes(int index) { + return param_.getByteString(index); + } + /** + * repeated string param = 1001; + */ + public Builder setParam( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string param = 1001; + */ + public Builder addParam( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(value); + onChanged(); + return this; + } + /** + * repeated string param = 1001; + */ + public Builder addAllParam( + java.lang.Iterable values) { + ensureParamIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, param_); + onChanged(); + return this; + } + /** + * repeated string param = 1001; + */ + public Builder clearParam() { + param_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * repeated string param = 1001; + */ + public Builder addParamBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(value); + onChanged(); + return this; + } + + private java.util.List blobShareMode_ = + java.util.Collections.emptyList(); + private void ensureBlobShareModeIsMutable() { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { + blobShareMode_ = new java.util.ArrayList(blobShareMode_); + bitField0_ |= 0x00000100; + } + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public java.util.List getBlobShareModeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, caffe.Caffe.V1LayerParameter.DimCheckMode>(blobShareMode_, blobShareMode_converter_); + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public int getBlobShareModeCount() { + return blobShareMode_.size(); + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public caffe.Caffe.V1LayerParameter.DimCheckMode getBlobShareMode(int index) { + return blobShareMode_converter_.convert(blobShareMode_.get(index)); + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public Builder setBlobShareMode( + int index, caffe.Caffe.V1LayerParameter.DimCheckMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobShareModeIsMutable(); + blobShareMode_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public Builder addBlobShareMode(caffe.Caffe.V1LayerParameter.DimCheckMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobShareModeIsMutable(); + blobShareMode_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public Builder addAllBlobShareMode( + java.lang.Iterable values) { + ensureBlobShareModeIsMutable(); + for (caffe.Caffe.V1LayerParameter.DimCheckMode value : values) { + blobShareMode_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002; + */ + public Builder clearBlobShareMode() { + blobShareMode_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + private java.util.List blobsLr_ = java.util.Collections.emptyList(); + private void ensureBlobsLrIsMutable() { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { + blobsLr_ = new java.util.ArrayList(blobsLr_); + bitField0_ |= 0x00000200; + } + } + /** + * repeated float blobs_lr = 7; + */ + public java.util.List + getBlobsLrList() { + return java.util.Collections.unmodifiableList(blobsLr_); + } + /** + * repeated float blobs_lr = 7; + */ + public int getBlobsLrCount() { + return blobsLr_.size(); + } + /** + * repeated float blobs_lr = 7; + */ + public float getBlobsLr(int index) { + return blobsLr_.get(index); + } + /** + * repeated float blobs_lr = 7; + */ + public Builder setBlobsLr( + int index, float value) { + ensureBlobsLrIsMutable(); + blobsLr_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 7; + */ + public Builder addBlobsLr(float value) { + ensureBlobsLrIsMutable(); + blobsLr_.add(value); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 7; + */ + public Builder addAllBlobsLr( + java.lang.Iterable values) { + ensureBlobsLrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blobsLr_); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 7; + */ + public Builder clearBlobsLr() { + blobsLr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + private java.util.List weightDecay_ = java.util.Collections.emptyList(); + private void ensureWeightDecayIsMutable() { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { + weightDecay_ = new java.util.ArrayList(weightDecay_); + bitField0_ |= 0x00000400; + } + } + /** + * repeated float weight_decay = 8; + */ + public java.util.List + getWeightDecayList() { + return java.util.Collections.unmodifiableList(weightDecay_); + } + /** + * repeated float weight_decay = 8; + */ + public int getWeightDecayCount() { + return weightDecay_.size(); + } + /** + * repeated float weight_decay = 8; + */ + public float getWeightDecay(int index) { + return weightDecay_.get(index); + } + /** + * repeated float weight_decay = 8; + */ + public Builder setWeightDecay( + int index, float value) { + ensureWeightDecayIsMutable(); + weightDecay_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 8; + */ + public Builder addWeightDecay(float value) { + ensureWeightDecayIsMutable(); + weightDecay_.add(value); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 8; + */ + public Builder addAllWeightDecay( + java.lang.Iterable values) { + ensureWeightDecayIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, weightDecay_); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 8; + */ + public Builder clearWeightDecay() { + weightDecay_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + private java.util.List lossWeight_ = java.util.Collections.emptyList(); + private void ensureLossWeightIsMutable() { + if (!((bitField0_ & 0x00000800) == 0x00000800)) { + lossWeight_ = new java.util.ArrayList(lossWeight_); + bitField0_ |= 0x00000800; + } + } + /** + * repeated float loss_weight = 35; + */ + public java.util.List + getLossWeightList() { + return java.util.Collections.unmodifiableList(lossWeight_); + } + /** + * repeated float loss_weight = 35; + */ + public int getLossWeightCount() { + return lossWeight_.size(); + } + /** + * repeated float loss_weight = 35; + */ + public float getLossWeight(int index) { + return lossWeight_.get(index); + } + /** + * repeated float loss_weight = 35; + */ + public Builder setLossWeight( + int index, float value) { + ensureLossWeightIsMutable(); + lossWeight_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float loss_weight = 35; + */ + public Builder addLossWeight(float value) { + ensureLossWeightIsMutable(); + lossWeight_.add(value); + onChanged(); + return this; + } + /** + * repeated float loss_weight = 35; + */ + public Builder addAllLossWeight( + java.lang.Iterable values) { + ensureLossWeightIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, lossWeight_); + onChanged(); + return this; + } + /** + * repeated float loss_weight = 35; + */ + public Builder clearLossWeight() { + lossWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + private caffe.Caffe.AccuracyParameter accuracyParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> accuracyParamBuilder_; + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public boolean hasAccuracyParam() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public caffe.Caffe.AccuracyParameter getAccuracyParam() { + if (accuracyParamBuilder_ == null) { + return accuracyParam_ == null ? caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } else { + return accuracyParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public Builder setAccuracyParam(caffe.Caffe.AccuracyParameter value) { + if (accuracyParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accuracyParam_ = value; + onChanged(); + } else { + accuracyParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public Builder setAccuracyParam( + caffe.Caffe.AccuracyParameter.Builder builderForValue) { + if (accuracyParamBuilder_ == null) { + accuracyParam_ = builderForValue.build(); + onChanged(); + } else { + accuracyParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public Builder mergeAccuracyParam(caffe.Caffe.AccuracyParameter value) { + if (accuracyParamBuilder_ == null) { + if (((bitField0_ & 0x00001000) == 0x00001000) && + accuracyParam_ != null && + accuracyParam_ != caffe.Caffe.AccuracyParameter.getDefaultInstance()) { + accuracyParam_ = + caffe.Caffe.AccuracyParameter.newBuilder(accuracyParam_).mergeFrom(value).buildPartial(); + } else { + accuracyParam_ = value; + } + onChanged(); + } else { + accuracyParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + return this; + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public Builder clearAccuracyParam() { + if (accuracyParamBuilder_ == null) { + accuracyParam_ = null; + onChanged(); + } else { + accuracyParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public caffe.Caffe.AccuracyParameter.Builder getAccuracyParamBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getAccuracyParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + public caffe.Caffe.AccuracyParameterOrBuilder getAccuracyParamOrBuilder() { + if (accuracyParamBuilder_ != null) { + return accuracyParamBuilder_.getMessageOrBuilder(); + } else { + return accuracyParam_ == null ? + caffe.Caffe.AccuracyParameter.getDefaultInstance() : accuracyParam_; + } + } + /** + * optional .caffe.AccuracyParameter accuracy_param = 27; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder> + getAccuracyParamFieldBuilder() { + if (accuracyParamBuilder_ == null) { + accuracyParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.AccuracyParameter, caffe.Caffe.AccuracyParameter.Builder, caffe.Caffe.AccuracyParameterOrBuilder>( + getAccuracyParam(), + getParentForChildren(), + isClean()); + accuracyParam_ = null; + } + return accuracyParamBuilder_; + } + + private caffe.Caffe.ArgMaxParameter argmaxParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> argmaxParamBuilder_; + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public boolean hasArgmaxParam() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public caffe.Caffe.ArgMaxParameter getArgmaxParam() { + if (argmaxParamBuilder_ == null) { + return argmaxParam_ == null ? caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } else { + return argmaxParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public Builder setArgmaxParam(caffe.Caffe.ArgMaxParameter value) { + if (argmaxParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argmaxParam_ = value; + onChanged(); + } else { + argmaxParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public Builder setArgmaxParam( + caffe.Caffe.ArgMaxParameter.Builder builderForValue) { + if (argmaxParamBuilder_ == null) { + argmaxParam_ = builderForValue.build(); + onChanged(); + } else { + argmaxParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public Builder mergeArgmaxParam(caffe.Caffe.ArgMaxParameter value) { + if (argmaxParamBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000) && + argmaxParam_ != null && + argmaxParam_ != caffe.Caffe.ArgMaxParameter.getDefaultInstance()) { + argmaxParam_ = + caffe.Caffe.ArgMaxParameter.newBuilder(argmaxParam_).mergeFrom(value).buildPartial(); + } else { + argmaxParam_ = value; + } + onChanged(); + } else { + argmaxParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public Builder clearArgmaxParam() { + if (argmaxParamBuilder_ == null) { + argmaxParam_ = null; + onChanged(); + } else { + argmaxParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + return this; + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public caffe.Caffe.ArgMaxParameter.Builder getArgmaxParamBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getArgmaxParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + public caffe.Caffe.ArgMaxParameterOrBuilder getArgmaxParamOrBuilder() { + if (argmaxParamBuilder_ != null) { + return argmaxParamBuilder_.getMessageOrBuilder(); + } else { + return argmaxParam_ == null ? + caffe.Caffe.ArgMaxParameter.getDefaultInstance() : argmaxParam_; + } + } + /** + * optional .caffe.ArgMaxParameter argmax_param = 23; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder> + getArgmaxParamFieldBuilder() { + if (argmaxParamBuilder_ == null) { + argmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ArgMaxParameter, caffe.Caffe.ArgMaxParameter.Builder, caffe.Caffe.ArgMaxParameterOrBuilder>( + getArgmaxParam(), + getParentForChildren(), + isClean()); + argmaxParam_ = null; + } + return argmaxParamBuilder_; + } + + private caffe.Caffe.ConcatParameter concatParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> concatParamBuilder_; + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public boolean hasConcatParam() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public caffe.Caffe.ConcatParameter getConcatParam() { + if (concatParamBuilder_ == null) { + return concatParam_ == null ? caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } else { + return concatParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public Builder setConcatParam(caffe.Caffe.ConcatParameter value) { + if (concatParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + concatParam_ = value; + onChanged(); + } else { + concatParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public Builder setConcatParam( + caffe.Caffe.ConcatParameter.Builder builderForValue) { + if (concatParamBuilder_ == null) { + concatParam_ = builderForValue.build(); + onChanged(); + } else { + concatParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public Builder mergeConcatParam(caffe.Caffe.ConcatParameter value) { + if (concatParamBuilder_ == null) { + if (((bitField0_ & 0x00004000) == 0x00004000) && + concatParam_ != null && + concatParam_ != caffe.Caffe.ConcatParameter.getDefaultInstance()) { + concatParam_ = + caffe.Caffe.ConcatParameter.newBuilder(concatParam_).mergeFrom(value).buildPartial(); + } else { + concatParam_ = value; + } + onChanged(); + } else { + concatParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public Builder clearConcatParam() { + if (concatParamBuilder_ == null) { + concatParam_ = null; + onChanged(); + } else { + concatParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public caffe.Caffe.ConcatParameter.Builder getConcatParamBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getConcatParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + public caffe.Caffe.ConcatParameterOrBuilder getConcatParamOrBuilder() { + if (concatParamBuilder_ != null) { + return concatParamBuilder_.getMessageOrBuilder(); + } else { + return concatParam_ == null ? + caffe.Caffe.ConcatParameter.getDefaultInstance() : concatParam_; + } + } + /** + * optional .caffe.ConcatParameter concat_param = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder> + getConcatParamFieldBuilder() { + if (concatParamBuilder_ == null) { + concatParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConcatParameter, caffe.Caffe.ConcatParameter.Builder, caffe.Caffe.ConcatParameterOrBuilder>( + getConcatParam(), + getParentForChildren(), + isClean()); + concatParam_ = null; + } + return concatParamBuilder_; + } + + private caffe.Caffe.ContrastiveLossParameter contrastiveLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> contrastiveLossParamBuilder_; + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public boolean hasContrastiveLossParam() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public caffe.Caffe.ContrastiveLossParameter getContrastiveLossParam() { + if (contrastiveLossParamBuilder_ == null) { + return contrastiveLossParam_ == null ? caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } else { + return contrastiveLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public Builder setContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { + if (contrastiveLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contrastiveLossParam_ = value; + onChanged(); + } else { + contrastiveLossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public Builder setContrastiveLossParam( + caffe.Caffe.ContrastiveLossParameter.Builder builderForValue) { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = builderForValue.build(); + onChanged(); + } else { + contrastiveLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public Builder mergeContrastiveLossParam(caffe.Caffe.ContrastiveLossParameter value) { + if (contrastiveLossParamBuilder_ == null) { + if (((bitField0_ & 0x00008000) == 0x00008000) && + contrastiveLossParam_ != null && + contrastiveLossParam_ != caffe.Caffe.ContrastiveLossParameter.getDefaultInstance()) { + contrastiveLossParam_ = + caffe.Caffe.ContrastiveLossParameter.newBuilder(contrastiveLossParam_).mergeFrom(value).buildPartial(); + } else { + contrastiveLossParam_ = value; + } + onChanged(); + } else { + contrastiveLossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public Builder clearContrastiveLossParam() { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParam_ = null; + onChanged(); + } else { + contrastiveLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + return this; + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public caffe.Caffe.ContrastiveLossParameter.Builder getContrastiveLossParamBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getContrastiveLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + public caffe.Caffe.ContrastiveLossParameterOrBuilder getContrastiveLossParamOrBuilder() { + if (contrastiveLossParamBuilder_ != null) { + return contrastiveLossParamBuilder_.getMessageOrBuilder(); + } else { + return contrastiveLossParam_ == null ? + caffe.Caffe.ContrastiveLossParameter.getDefaultInstance() : contrastiveLossParam_; + } + } + /** + * optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder> + getContrastiveLossParamFieldBuilder() { + if (contrastiveLossParamBuilder_ == null) { + contrastiveLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ContrastiveLossParameter, caffe.Caffe.ContrastiveLossParameter.Builder, caffe.Caffe.ContrastiveLossParameterOrBuilder>( + getContrastiveLossParam(), + getParentForChildren(), + isClean()); + contrastiveLossParam_ = null; + } + return contrastiveLossParamBuilder_; + } + + private caffe.Caffe.ConvolutionParameter convolutionParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> convolutionParamBuilder_; + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public boolean hasConvolutionParam() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public caffe.Caffe.ConvolutionParameter getConvolutionParam() { + if (convolutionParamBuilder_ == null) { + return convolutionParam_ == null ? caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } else { + return convolutionParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public Builder setConvolutionParam(caffe.Caffe.ConvolutionParameter value) { + if (convolutionParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + convolutionParam_ = value; + onChanged(); + } else { + convolutionParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public Builder setConvolutionParam( + caffe.Caffe.ConvolutionParameter.Builder builderForValue) { + if (convolutionParamBuilder_ == null) { + convolutionParam_ = builderForValue.build(); + onChanged(); + } else { + convolutionParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public Builder mergeConvolutionParam(caffe.Caffe.ConvolutionParameter value) { + if (convolutionParamBuilder_ == null) { + if (((bitField0_ & 0x00010000) == 0x00010000) && + convolutionParam_ != null && + convolutionParam_ != caffe.Caffe.ConvolutionParameter.getDefaultInstance()) { + convolutionParam_ = + caffe.Caffe.ConvolutionParameter.newBuilder(convolutionParam_).mergeFrom(value).buildPartial(); + } else { + convolutionParam_ = value; + } + onChanged(); + } else { + convolutionParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public Builder clearConvolutionParam() { + if (convolutionParamBuilder_ == null) { + convolutionParam_ = null; + onChanged(); + } else { + convolutionParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + return this; + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public caffe.Caffe.ConvolutionParameter.Builder getConvolutionParamBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getConvolutionParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + public caffe.Caffe.ConvolutionParameterOrBuilder getConvolutionParamOrBuilder() { + if (convolutionParamBuilder_ != null) { + return convolutionParamBuilder_.getMessageOrBuilder(); + } else { + return convolutionParam_ == null ? + caffe.Caffe.ConvolutionParameter.getDefaultInstance() : convolutionParam_; + } + } + /** + * optional .caffe.ConvolutionParameter convolution_param = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder> + getConvolutionParamFieldBuilder() { + if (convolutionParamBuilder_ == null) { + convolutionParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ConvolutionParameter, caffe.Caffe.ConvolutionParameter.Builder, caffe.Caffe.ConvolutionParameterOrBuilder>( + getConvolutionParam(), + getParentForChildren(), + isClean()); + convolutionParam_ = null; + } + return convolutionParamBuilder_; + } + + private caffe.Caffe.DataParameter dataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> dataParamBuilder_; + /** + * optional .caffe.DataParameter data_param = 11; + */ + public boolean hasDataParam() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public caffe.Caffe.DataParameter getDataParam() { + if (dataParamBuilder_ == null) { + return dataParam_ == null ? caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } else { + return dataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public Builder setDataParam(caffe.Caffe.DataParameter value) { + if (dataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataParam_ = value; + onChanged(); + } else { + dataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public Builder setDataParam( + caffe.Caffe.DataParameter.Builder builderForValue) { + if (dataParamBuilder_ == null) { + dataParam_ = builderForValue.build(); + onChanged(); + } else { + dataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public Builder mergeDataParam(caffe.Caffe.DataParameter value) { + if (dataParamBuilder_ == null) { + if (((bitField0_ & 0x00020000) == 0x00020000) && + dataParam_ != null && + dataParam_ != caffe.Caffe.DataParameter.getDefaultInstance()) { + dataParam_ = + caffe.Caffe.DataParameter.newBuilder(dataParam_).mergeFrom(value).buildPartial(); + } else { + dataParam_ = value; + } + onChanged(); + } else { + dataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + return this; + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public Builder clearDataParam() { + if (dataParamBuilder_ == null) { + dataParam_ = null; + onChanged(); + } else { + dataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + return this; + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public caffe.Caffe.DataParameter.Builder getDataParamBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + public caffe.Caffe.DataParameterOrBuilder getDataParamOrBuilder() { + if (dataParamBuilder_ != null) { + return dataParamBuilder_.getMessageOrBuilder(); + } else { + return dataParam_ == null ? + caffe.Caffe.DataParameter.getDefaultInstance() : dataParam_; + } + } + /** + * optional .caffe.DataParameter data_param = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder> + getDataParamFieldBuilder() { + if (dataParamBuilder_ == null) { + dataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DataParameter, caffe.Caffe.DataParameter.Builder, caffe.Caffe.DataParameterOrBuilder>( + getDataParam(), + getParentForChildren(), + isClean()); + dataParam_ = null; + } + return dataParamBuilder_; + } + + private caffe.Caffe.DropoutParameter dropoutParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> dropoutParamBuilder_; + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public boolean hasDropoutParam() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public caffe.Caffe.DropoutParameter getDropoutParam() { + if (dropoutParamBuilder_ == null) { + return dropoutParam_ == null ? caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } else { + return dropoutParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public Builder setDropoutParam(caffe.Caffe.DropoutParameter value) { + if (dropoutParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dropoutParam_ = value; + onChanged(); + } else { + dropoutParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public Builder setDropoutParam( + caffe.Caffe.DropoutParameter.Builder builderForValue) { + if (dropoutParamBuilder_ == null) { + dropoutParam_ = builderForValue.build(); + onChanged(); + } else { + dropoutParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public Builder mergeDropoutParam(caffe.Caffe.DropoutParameter value) { + if (dropoutParamBuilder_ == null) { + if (((bitField0_ & 0x00040000) == 0x00040000) && + dropoutParam_ != null && + dropoutParam_ != caffe.Caffe.DropoutParameter.getDefaultInstance()) { + dropoutParam_ = + caffe.Caffe.DropoutParameter.newBuilder(dropoutParam_).mergeFrom(value).buildPartial(); + } else { + dropoutParam_ = value; + } + onChanged(); + } else { + dropoutParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public Builder clearDropoutParam() { + if (dropoutParamBuilder_ == null) { + dropoutParam_ = null; + onChanged(); + } else { + dropoutParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + return this; + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public caffe.Caffe.DropoutParameter.Builder getDropoutParamBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getDropoutParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + public caffe.Caffe.DropoutParameterOrBuilder getDropoutParamOrBuilder() { + if (dropoutParamBuilder_ != null) { + return dropoutParamBuilder_.getMessageOrBuilder(); + } else { + return dropoutParam_ == null ? + caffe.Caffe.DropoutParameter.getDefaultInstance() : dropoutParam_; + } + } + /** + * optional .caffe.DropoutParameter dropout_param = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder> + getDropoutParamFieldBuilder() { + if (dropoutParamBuilder_ == null) { + dropoutParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DropoutParameter, caffe.Caffe.DropoutParameter.Builder, caffe.Caffe.DropoutParameterOrBuilder>( + getDropoutParam(), + getParentForChildren(), + isClean()); + dropoutParam_ = null; + } + return dropoutParamBuilder_; + } + + private caffe.Caffe.DummyDataParameter dummyDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> dummyDataParamBuilder_; + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public boolean hasDummyDataParam() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public caffe.Caffe.DummyDataParameter getDummyDataParam() { + if (dummyDataParamBuilder_ == null) { + return dummyDataParam_ == null ? caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } else { + return dummyDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public Builder setDummyDataParam(caffe.Caffe.DummyDataParameter value) { + if (dummyDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dummyDataParam_ = value; + onChanged(); + } else { + dummyDataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public Builder setDummyDataParam( + caffe.Caffe.DummyDataParameter.Builder builderForValue) { + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = builderForValue.build(); + onChanged(); + } else { + dummyDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public Builder mergeDummyDataParam(caffe.Caffe.DummyDataParameter value) { + if (dummyDataParamBuilder_ == null) { + if (((bitField0_ & 0x00080000) == 0x00080000) && + dummyDataParam_ != null && + dummyDataParam_ != caffe.Caffe.DummyDataParameter.getDefaultInstance()) { + dummyDataParam_ = + caffe.Caffe.DummyDataParameter.newBuilder(dummyDataParam_).mergeFrom(value).buildPartial(); + } else { + dummyDataParam_ = value; + } + onChanged(); + } else { + dummyDataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public Builder clearDummyDataParam() { + if (dummyDataParamBuilder_ == null) { + dummyDataParam_ = null; + onChanged(); + } else { + dummyDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + return this; + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public caffe.Caffe.DummyDataParameter.Builder getDummyDataParamBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getDummyDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + public caffe.Caffe.DummyDataParameterOrBuilder getDummyDataParamOrBuilder() { + if (dummyDataParamBuilder_ != null) { + return dummyDataParamBuilder_.getMessageOrBuilder(); + } else { + return dummyDataParam_ == null ? + caffe.Caffe.DummyDataParameter.getDefaultInstance() : dummyDataParam_; + } + } + /** + * optional .caffe.DummyDataParameter dummy_data_param = 26; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder> + getDummyDataParamFieldBuilder() { + if (dummyDataParamBuilder_ == null) { + dummyDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.DummyDataParameter, caffe.Caffe.DummyDataParameter.Builder, caffe.Caffe.DummyDataParameterOrBuilder>( + getDummyDataParam(), + getParentForChildren(), + isClean()); + dummyDataParam_ = null; + } + return dummyDataParamBuilder_; + } + + private caffe.Caffe.EltwiseParameter eltwiseParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> eltwiseParamBuilder_; + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public boolean hasEltwiseParam() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public caffe.Caffe.EltwiseParameter getEltwiseParam() { + if (eltwiseParamBuilder_ == null) { + return eltwiseParam_ == null ? caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } else { + return eltwiseParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public Builder setEltwiseParam(caffe.Caffe.EltwiseParameter value) { + if (eltwiseParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eltwiseParam_ = value; + onChanged(); + } else { + eltwiseParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public Builder setEltwiseParam( + caffe.Caffe.EltwiseParameter.Builder builderForValue) { + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = builderForValue.build(); + onChanged(); + } else { + eltwiseParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public Builder mergeEltwiseParam(caffe.Caffe.EltwiseParameter value) { + if (eltwiseParamBuilder_ == null) { + if (((bitField0_ & 0x00100000) == 0x00100000) && + eltwiseParam_ != null && + eltwiseParam_ != caffe.Caffe.EltwiseParameter.getDefaultInstance()) { + eltwiseParam_ = + caffe.Caffe.EltwiseParameter.newBuilder(eltwiseParam_).mergeFrom(value).buildPartial(); + } else { + eltwiseParam_ = value; + } + onChanged(); + } else { + eltwiseParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public Builder clearEltwiseParam() { + if (eltwiseParamBuilder_ == null) { + eltwiseParam_ = null; + onChanged(); + } else { + eltwiseParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + return this; + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public caffe.Caffe.EltwiseParameter.Builder getEltwiseParamBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getEltwiseParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + public caffe.Caffe.EltwiseParameterOrBuilder getEltwiseParamOrBuilder() { + if (eltwiseParamBuilder_ != null) { + return eltwiseParamBuilder_.getMessageOrBuilder(); + } else { + return eltwiseParam_ == null ? + caffe.Caffe.EltwiseParameter.getDefaultInstance() : eltwiseParam_; + } + } + /** + * optional .caffe.EltwiseParameter eltwise_param = 24; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder> + getEltwiseParamFieldBuilder() { + if (eltwiseParamBuilder_ == null) { + eltwiseParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.EltwiseParameter, caffe.Caffe.EltwiseParameter.Builder, caffe.Caffe.EltwiseParameterOrBuilder>( + getEltwiseParam(), + getParentForChildren(), + isClean()); + eltwiseParam_ = null; + } + return eltwiseParamBuilder_; + } + + private caffe.Caffe.ExpParameter expParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> expParamBuilder_; + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public boolean hasExpParam() { + return ((bitField0_ & 0x00200000) == 0x00200000); + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public caffe.Caffe.ExpParameter getExpParam() { + if (expParamBuilder_ == null) { + return expParam_ == null ? caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } else { + return expParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public Builder setExpParam(caffe.Caffe.ExpParameter value) { + if (expParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expParam_ = value; + onChanged(); + } else { + expParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public Builder setExpParam( + caffe.Caffe.ExpParameter.Builder builderForValue) { + if (expParamBuilder_ == null) { + expParam_ = builderForValue.build(); + onChanged(); + } else { + expParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public Builder mergeExpParam(caffe.Caffe.ExpParameter value) { + if (expParamBuilder_ == null) { + if (((bitField0_ & 0x00200000) == 0x00200000) && + expParam_ != null && + expParam_ != caffe.Caffe.ExpParameter.getDefaultInstance()) { + expParam_ = + caffe.Caffe.ExpParameter.newBuilder(expParam_).mergeFrom(value).buildPartial(); + } else { + expParam_ = value; + } + onChanged(); + } else { + expParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00200000; + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public Builder clearExpParam() { + if (expParamBuilder_ == null) { + expParam_ = null; + onChanged(); + } else { + expParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00200000); + return this; + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public caffe.Caffe.ExpParameter.Builder getExpParamBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getExpParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + public caffe.Caffe.ExpParameterOrBuilder getExpParamOrBuilder() { + if (expParamBuilder_ != null) { + return expParamBuilder_.getMessageOrBuilder(); + } else { + return expParam_ == null ? + caffe.Caffe.ExpParameter.getDefaultInstance() : expParam_; + } + } + /** + * optional .caffe.ExpParameter exp_param = 41; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder> + getExpParamFieldBuilder() { + if (expParamBuilder_ == null) { + expParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ExpParameter, caffe.Caffe.ExpParameter.Builder, caffe.Caffe.ExpParameterOrBuilder>( + getExpParam(), + getParentForChildren(), + isClean()); + expParam_ = null; + } + return expParamBuilder_; + } + + private caffe.Caffe.HDF5DataParameter hdf5DataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> hdf5DataParamBuilder_; + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public boolean hasHdf5DataParam() { + return ((bitField0_ & 0x00400000) == 0x00400000); + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public caffe.Caffe.HDF5DataParameter getHdf5DataParam() { + if (hdf5DataParamBuilder_ == null) { + return hdf5DataParam_ == null ? caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } else { + return hdf5DataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public Builder setHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { + if (hdf5DataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hdf5DataParam_ = value; + onChanged(); + } else { + hdf5DataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public Builder setHdf5DataParam( + caffe.Caffe.HDF5DataParameter.Builder builderForValue) { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = builderForValue.build(); + onChanged(); + } else { + hdf5DataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public Builder mergeHdf5DataParam(caffe.Caffe.HDF5DataParameter value) { + if (hdf5DataParamBuilder_ == null) { + if (((bitField0_ & 0x00400000) == 0x00400000) && + hdf5DataParam_ != null && + hdf5DataParam_ != caffe.Caffe.HDF5DataParameter.getDefaultInstance()) { + hdf5DataParam_ = + caffe.Caffe.HDF5DataParameter.newBuilder(hdf5DataParam_).mergeFrom(value).buildPartial(); + } else { + hdf5DataParam_ = value; + } + onChanged(); + } else { + hdf5DataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00400000; + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public Builder clearHdf5DataParam() { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParam_ = null; + onChanged(); + } else { + hdf5DataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + return this; + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public caffe.Caffe.HDF5DataParameter.Builder getHdf5DataParamBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getHdf5DataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + public caffe.Caffe.HDF5DataParameterOrBuilder getHdf5DataParamOrBuilder() { + if (hdf5DataParamBuilder_ != null) { + return hdf5DataParamBuilder_.getMessageOrBuilder(); + } else { + return hdf5DataParam_ == null ? + caffe.Caffe.HDF5DataParameter.getDefaultInstance() : hdf5DataParam_; + } + } + /** + * optional .caffe.HDF5DataParameter hdf5_data_param = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder> + getHdf5DataParamFieldBuilder() { + if (hdf5DataParamBuilder_ == null) { + hdf5DataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5DataParameter, caffe.Caffe.HDF5DataParameter.Builder, caffe.Caffe.HDF5DataParameterOrBuilder>( + getHdf5DataParam(), + getParentForChildren(), + isClean()); + hdf5DataParam_ = null; + } + return hdf5DataParamBuilder_; + } + + private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public boolean hasHdf5OutputParam() { + return ((bitField0_ & 0x00800000) == 0x00800000); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } else { + return hdf5OutputParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hdf5OutputParam_ = value; + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public Builder setHdf5OutputParam( + caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = builderForValue.build(); + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (((bitField0_ & 0x00800000) == 0x00800000) && + hdf5OutputParam_ != null && + hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { + hdf5OutputParam_ = + caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); + } else { + hdf5OutputParam_ = value; + } + onChanged(); + } else { + hdf5OutputParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public Builder clearHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + onChanged(); + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00800000); + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getHdf5OutputParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + if (hdf5OutputParamBuilder_ != null) { + return hdf5OutputParamBuilder_.getMessageOrBuilder(); + } else { + return hdf5OutputParam_ == null ? + caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> + getHdf5OutputParamFieldBuilder() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( + getHdf5OutputParam(), + getParentForChildren(), + isClean()); + hdf5OutputParam_ = null; + } + return hdf5OutputParamBuilder_; + } + + private caffe.Caffe.HingeLossParameter hingeLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> hingeLossParamBuilder_; + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public boolean hasHingeLossParam() { + return ((bitField0_ & 0x01000000) == 0x01000000); + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public caffe.Caffe.HingeLossParameter getHingeLossParam() { + if (hingeLossParamBuilder_ == null) { + return hingeLossParam_ == null ? caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } else { + return hingeLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public Builder setHingeLossParam(caffe.Caffe.HingeLossParameter value) { + if (hingeLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hingeLossParam_ = value; + onChanged(); + } else { + hingeLossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public Builder setHingeLossParam( + caffe.Caffe.HingeLossParameter.Builder builderForValue) { + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = builderForValue.build(); + onChanged(); + } else { + hingeLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public Builder mergeHingeLossParam(caffe.Caffe.HingeLossParameter value) { + if (hingeLossParamBuilder_ == null) { + if (((bitField0_ & 0x01000000) == 0x01000000) && + hingeLossParam_ != null && + hingeLossParam_ != caffe.Caffe.HingeLossParameter.getDefaultInstance()) { + hingeLossParam_ = + caffe.Caffe.HingeLossParameter.newBuilder(hingeLossParam_).mergeFrom(value).buildPartial(); + } else { + hingeLossParam_ = value; + } + onChanged(); + } else { + hingeLossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x01000000; + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public Builder clearHingeLossParam() { + if (hingeLossParamBuilder_ == null) { + hingeLossParam_ = null; + onChanged(); + } else { + hingeLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); + return this; + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public caffe.Caffe.HingeLossParameter.Builder getHingeLossParamBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getHingeLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + public caffe.Caffe.HingeLossParameterOrBuilder getHingeLossParamOrBuilder() { + if (hingeLossParamBuilder_ != null) { + return hingeLossParamBuilder_.getMessageOrBuilder(); + } else { + return hingeLossParam_ == null ? + caffe.Caffe.HingeLossParameter.getDefaultInstance() : hingeLossParam_; + } + } + /** + * optional .caffe.HingeLossParameter hinge_loss_param = 29; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder> + getHingeLossParamFieldBuilder() { + if (hingeLossParamBuilder_ == null) { + hingeLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HingeLossParameter, caffe.Caffe.HingeLossParameter.Builder, caffe.Caffe.HingeLossParameterOrBuilder>( + getHingeLossParam(), + getParentForChildren(), + isClean()); + hingeLossParam_ = null; + } + return hingeLossParamBuilder_; + } + + private caffe.Caffe.ImageDataParameter imageDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> imageDataParamBuilder_; + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public boolean hasImageDataParam() { + return ((bitField0_ & 0x02000000) == 0x02000000); + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public caffe.Caffe.ImageDataParameter getImageDataParam() { + if (imageDataParamBuilder_ == null) { + return imageDataParam_ == null ? caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } else { + return imageDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public Builder setImageDataParam(caffe.Caffe.ImageDataParameter value) { + if (imageDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageDataParam_ = value; + onChanged(); + } else { + imageDataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public Builder setImageDataParam( + caffe.Caffe.ImageDataParameter.Builder builderForValue) { + if (imageDataParamBuilder_ == null) { + imageDataParam_ = builderForValue.build(); + onChanged(); + } else { + imageDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public Builder mergeImageDataParam(caffe.Caffe.ImageDataParameter value) { + if (imageDataParamBuilder_ == null) { + if (((bitField0_ & 0x02000000) == 0x02000000) && + imageDataParam_ != null && + imageDataParam_ != caffe.Caffe.ImageDataParameter.getDefaultInstance()) { + imageDataParam_ = + caffe.Caffe.ImageDataParameter.newBuilder(imageDataParam_).mergeFrom(value).buildPartial(); + } else { + imageDataParam_ = value; + } + onChanged(); + } else { + imageDataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x02000000; + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public Builder clearImageDataParam() { + if (imageDataParamBuilder_ == null) { + imageDataParam_ = null; + onChanged(); + } else { + imageDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); + return this; + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public caffe.Caffe.ImageDataParameter.Builder getImageDataParamBuilder() { + bitField0_ |= 0x02000000; + onChanged(); + return getImageDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + public caffe.Caffe.ImageDataParameterOrBuilder getImageDataParamOrBuilder() { + if (imageDataParamBuilder_ != null) { + return imageDataParamBuilder_.getMessageOrBuilder(); + } else { + return imageDataParam_ == null ? + caffe.Caffe.ImageDataParameter.getDefaultInstance() : imageDataParam_; + } + } + /** + * optional .caffe.ImageDataParameter image_data_param = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder> + getImageDataParamFieldBuilder() { + if (imageDataParamBuilder_ == null) { + imageDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ImageDataParameter, caffe.Caffe.ImageDataParameter.Builder, caffe.Caffe.ImageDataParameterOrBuilder>( + getImageDataParam(), + getParentForChildren(), + isClean()); + imageDataParam_ = null; + } + return imageDataParamBuilder_; + } + + private caffe.Caffe.InfogainLossParameter infogainLossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> infogainLossParamBuilder_; + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public boolean hasInfogainLossParam() { + return ((bitField0_ & 0x04000000) == 0x04000000); + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public caffe.Caffe.InfogainLossParameter getInfogainLossParam() { + if (infogainLossParamBuilder_ == null) { + return infogainLossParam_ == null ? caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } else { + return infogainLossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public Builder setInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { + if (infogainLossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infogainLossParam_ = value; + onChanged(); + } else { + infogainLossParamBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public Builder setInfogainLossParam( + caffe.Caffe.InfogainLossParameter.Builder builderForValue) { + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = builderForValue.build(); + onChanged(); + } else { + infogainLossParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public Builder mergeInfogainLossParam(caffe.Caffe.InfogainLossParameter value) { + if (infogainLossParamBuilder_ == null) { + if (((bitField0_ & 0x04000000) == 0x04000000) && + infogainLossParam_ != null && + infogainLossParam_ != caffe.Caffe.InfogainLossParameter.getDefaultInstance()) { + infogainLossParam_ = + caffe.Caffe.InfogainLossParameter.newBuilder(infogainLossParam_).mergeFrom(value).buildPartial(); + } else { + infogainLossParam_ = value; + } + onChanged(); + } else { + infogainLossParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public Builder clearInfogainLossParam() { + if (infogainLossParamBuilder_ == null) { + infogainLossParam_ = null; + onChanged(); + } else { + infogainLossParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x04000000); + return this; + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public caffe.Caffe.InfogainLossParameter.Builder getInfogainLossParamBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getInfogainLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + public caffe.Caffe.InfogainLossParameterOrBuilder getInfogainLossParamOrBuilder() { + if (infogainLossParamBuilder_ != null) { + return infogainLossParamBuilder_.getMessageOrBuilder(); + } else { + return infogainLossParam_ == null ? + caffe.Caffe.InfogainLossParameter.getDefaultInstance() : infogainLossParam_; + } + } + /** + * optional .caffe.InfogainLossParameter infogain_loss_param = 16; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder> + getInfogainLossParamFieldBuilder() { + if (infogainLossParamBuilder_ == null) { + infogainLossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InfogainLossParameter, caffe.Caffe.InfogainLossParameter.Builder, caffe.Caffe.InfogainLossParameterOrBuilder>( + getInfogainLossParam(), + getParentForChildren(), + isClean()); + infogainLossParam_ = null; + } + return infogainLossParamBuilder_; + } + + private caffe.Caffe.InnerProductParameter innerProductParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> innerProductParamBuilder_; + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public boolean hasInnerProductParam() { + return ((bitField0_ & 0x08000000) == 0x08000000); + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public caffe.Caffe.InnerProductParameter getInnerProductParam() { + if (innerProductParamBuilder_ == null) { + return innerProductParam_ == null ? caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } else { + return innerProductParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public Builder setInnerProductParam(caffe.Caffe.InnerProductParameter value) { + if (innerProductParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + innerProductParam_ = value; + onChanged(); + } else { + innerProductParamBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public Builder setInnerProductParam( + caffe.Caffe.InnerProductParameter.Builder builderForValue) { + if (innerProductParamBuilder_ == null) { + innerProductParam_ = builderForValue.build(); + onChanged(); + } else { + innerProductParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public Builder mergeInnerProductParam(caffe.Caffe.InnerProductParameter value) { + if (innerProductParamBuilder_ == null) { + if (((bitField0_ & 0x08000000) == 0x08000000) && + innerProductParam_ != null && + innerProductParam_ != caffe.Caffe.InnerProductParameter.getDefaultInstance()) { + innerProductParam_ = + caffe.Caffe.InnerProductParameter.newBuilder(innerProductParam_).mergeFrom(value).buildPartial(); + } else { + innerProductParam_ = value; + } + onChanged(); + } else { + innerProductParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x08000000; + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public Builder clearInnerProductParam() { + if (innerProductParamBuilder_ == null) { + innerProductParam_ = null; + onChanged(); + } else { + innerProductParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x08000000); + return this; + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public caffe.Caffe.InnerProductParameter.Builder getInnerProductParamBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getInnerProductParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + public caffe.Caffe.InnerProductParameterOrBuilder getInnerProductParamOrBuilder() { + if (innerProductParamBuilder_ != null) { + return innerProductParamBuilder_.getMessageOrBuilder(); + } else { + return innerProductParam_ == null ? + caffe.Caffe.InnerProductParameter.getDefaultInstance() : innerProductParam_; + } + } + /** + * optional .caffe.InnerProductParameter inner_product_param = 17; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder> + getInnerProductParamFieldBuilder() { + if (innerProductParamBuilder_ == null) { + innerProductParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.InnerProductParameter, caffe.Caffe.InnerProductParameter.Builder, caffe.Caffe.InnerProductParameterOrBuilder>( + getInnerProductParam(), + getParentForChildren(), + isClean()); + innerProductParam_ = null; + } + return innerProductParamBuilder_; + } + + private caffe.Caffe.LRNParameter lrnParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> lrnParamBuilder_; + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public boolean hasLrnParam() { + return ((bitField0_ & 0x10000000) == 0x10000000); + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public caffe.Caffe.LRNParameter getLrnParam() { + if (lrnParamBuilder_ == null) { + return lrnParam_ == null ? caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } else { + return lrnParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public Builder setLrnParam(caffe.Caffe.LRNParameter value) { + if (lrnParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lrnParam_ = value; + onChanged(); + } else { + lrnParamBuilder_.setMessage(value); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public Builder setLrnParam( + caffe.Caffe.LRNParameter.Builder builderForValue) { + if (lrnParamBuilder_ == null) { + lrnParam_ = builderForValue.build(); + onChanged(); + } else { + lrnParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public Builder mergeLrnParam(caffe.Caffe.LRNParameter value) { + if (lrnParamBuilder_ == null) { + if (((bitField0_ & 0x10000000) == 0x10000000) && + lrnParam_ != null && + lrnParam_ != caffe.Caffe.LRNParameter.getDefaultInstance()) { + lrnParam_ = + caffe.Caffe.LRNParameter.newBuilder(lrnParam_).mergeFrom(value).buildPartial(); + } else { + lrnParam_ = value; + } + onChanged(); + } else { + lrnParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x10000000; + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public Builder clearLrnParam() { + if (lrnParamBuilder_ == null) { + lrnParam_ = null; + onChanged(); + } else { + lrnParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + return this; + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public caffe.Caffe.LRNParameter.Builder getLrnParamBuilder() { + bitField0_ |= 0x10000000; + onChanged(); + return getLrnParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + public caffe.Caffe.LRNParameterOrBuilder getLrnParamOrBuilder() { + if (lrnParamBuilder_ != null) { + return lrnParamBuilder_.getMessageOrBuilder(); + } else { + return lrnParam_ == null ? + caffe.Caffe.LRNParameter.getDefaultInstance() : lrnParam_; + } + } + /** + * optional .caffe.LRNParameter lrn_param = 18; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder> + getLrnParamFieldBuilder() { + if (lrnParamBuilder_ == null) { + lrnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LRNParameter, caffe.Caffe.LRNParameter.Builder, caffe.Caffe.LRNParameterOrBuilder>( + getLrnParam(), + getParentForChildren(), + isClean()); + lrnParam_ = null; + } + return lrnParamBuilder_; + } + + private caffe.Caffe.MemoryDataParameter memoryDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> memoryDataParamBuilder_; + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public boolean hasMemoryDataParam() { + return ((bitField0_ & 0x20000000) == 0x20000000); + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public caffe.Caffe.MemoryDataParameter getMemoryDataParam() { + if (memoryDataParamBuilder_ == null) { + return memoryDataParam_ == null ? caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } else { + return memoryDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public Builder setMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { + if (memoryDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memoryDataParam_ = value; + onChanged(); + } else { + memoryDataParamBuilder_.setMessage(value); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public Builder setMemoryDataParam( + caffe.Caffe.MemoryDataParameter.Builder builderForValue) { + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = builderForValue.build(); + onChanged(); + } else { + memoryDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public Builder mergeMemoryDataParam(caffe.Caffe.MemoryDataParameter value) { + if (memoryDataParamBuilder_ == null) { + if (((bitField0_ & 0x20000000) == 0x20000000) && + memoryDataParam_ != null && + memoryDataParam_ != caffe.Caffe.MemoryDataParameter.getDefaultInstance()) { + memoryDataParam_ = + caffe.Caffe.MemoryDataParameter.newBuilder(memoryDataParam_).mergeFrom(value).buildPartial(); + } else { + memoryDataParam_ = value; + } + onChanged(); + } else { + memoryDataParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x20000000; + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public Builder clearMemoryDataParam() { + if (memoryDataParamBuilder_ == null) { + memoryDataParam_ = null; + onChanged(); + } else { + memoryDataParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + return this; + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public caffe.Caffe.MemoryDataParameter.Builder getMemoryDataParamBuilder() { + bitField0_ |= 0x20000000; + onChanged(); + return getMemoryDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + public caffe.Caffe.MemoryDataParameterOrBuilder getMemoryDataParamOrBuilder() { + if (memoryDataParamBuilder_ != null) { + return memoryDataParamBuilder_.getMessageOrBuilder(); + } else { + return memoryDataParam_ == null ? + caffe.Caffe.MemoryDataParameter.getDefaultInstance() : memoryDataParam_; + } + } + /** + * optional .caffe.MemoryDataParameter memory_data_param = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder> + getMemoryDataParamFieldBuilder() { + if (memoryDataParamBuilder_ == null) { + memoryDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MemoryDataParameter, caffe.Caffe.MemoryDataParameter.Builder, caffe.Caffe.MemoryDataParameterOrBuilder>( + getMemoryDataParam(), + getParentForChildren(), + isClean()); + memoryDataParam_ = null; + } + return memoryDataParamBuilder_; + } + + private caffe.Caffe.MVNParameter mvnParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> mvnParamBuilder_; + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public boolean hasMvnParam() { + return ((bitField0_ & 0x40000000) == 0x40000000); + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public caffe.Caffe.MVNParameter getMvnParam() { + if (mvnParamBuilder_ == null) { + return mvnParam_ == null ? caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } else { + return mvnParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public Builder setMvnParam(caffe.Caffe.MVNParameter value) { + if (mvnParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mvnParam_ = value; + onChanged(); + } else { + mvnParamBuilder_.setMessage(value); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public Builder setMvnParam( + caffe.Caffe.MVNParameter.Builder builderForValue) { + if (mvnParamBuilder_ == null) { + mvnParam_ = builderForValue.build(); + onChanged(); + } else { + mvnParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public Builder mergeMvnParam(caffe.Caffe.MVNParameter value) { + if (mvnParamBuilder_ == null) { + if (((bitField0_ & 0x40000000) == 0x40000000) && + mvnParam_ != null && + mvnParam_ != caffe.Caffe.MVNParameter.getDefaultInstance()) { + mvnParam_ = + caffe.Caffe.MVNParameter.newBuilder(mvnParam_).mergeFrom(value).buildPartial(); + } else { + mvnParam_ = value; + } + onChanged(); + } else { + mvnParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x40000000; + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public Builder clearMvnParam() { + if (mvnParamBuilder_ == null) { + mvnParam_ = null; + onChanged(); + } else { + mvnParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x40000000); + return this; + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public caffe.Caffe.MVNParameter.Builder getMvnParamBuilder() { + bitField0_ |= 0x40000000; + onChanged(); + return getMvnParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + public caffe.Caffe.MVNParameterOrBuilder getMvnParamOrBuilder() { + if (mvnParamBuilder_ != null) { + return mvnParamBuilder_.getMessageOrBuilder(); + } else { + return mvnParam_ == null ? + caffe.Caffe.MVNParameter.getDefaultInstance() : mvnParam_; + } + } + /** + * optional .caffe.MVNParameter mvn_param = 34; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder> + getMvnParamFieldBuilder() { + if (mvnParamBuilder_ == null) { + mvnParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.MVNParameter, caffe.Caffe.MVNParameter.Builder, caffe.Caffe.MVNParameterOrBuilder>( + getMvnParam(), + getParentForChildren(), + isClean()); + mvnParam_ = null; + } + return mvnParamBuilder_; + } + + private caffe.Caffe.PoolingParameter poolingParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> poolingParamBuilder_; + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public boolean hasPoolingParam() { + return ((bitField0_ & 0x80000000) == 0x80000000); + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public caffe.Caffe.PoolingParameter getPoolingParam() { + if (poolingParamBuilder_ == null) { + return poolingParam_ == null ? caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } else { + return poolingParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public Builder setPoolingParam(caffe.Caffe.PoolingParameter value) { + if (poolingParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poolingParam_ = value; + onChanged(); + } else { + poolingParamBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public Builder setPoolingParam( + caffe.Caffe.PoolingParameter.Builder builderForValue) { + if (poolingParamBuilder_ == null) { + poolingParam_ = builderForValue.build(); + onChanged(); + } else { + poolingParamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public Builder mergePoolingParam(caffe.Caffe.PoolingParameter value) { + if (poolingParamBuilder_ == null) { + if (((bitField0_ & 0x80000000) == 0x80000000) && + poolingParam_ != null && + poolingParam_ != caffe.Caffe.PoolingParameter.getDefaultInstance()) { + poolingParam_ = + caffe.Caffe.PoolingParameter.newBuilder(poolingParam_).mergeFrom(value).buildPartial(); + } else { + poolingParam_ = value; + } + onChanged(); + } else { + poolingParamBuilder_.mergeFrom(value); + } + bitField0_ |= 0x80000000; + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public Builder clearPoolingParam() { + if (poolingParamBuilder_ == null) { + poolingParam_ = null; + onChanged(); + } else { + poolingParamBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + return this; + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public caffe.Caffe.PoolingParameter.Builder getPoolingParamBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getPoolingParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + public caffe.Caffe.PoolingParameterOrBuilder getPoolingParamOrBuilder() { + if (poolingParamBuilder_ != null) { + return poolingParamBuilder_.getMessageOrBuilder(); + } else { + return poolingParam_ == null ? + caffe.Caffe.PoolingParameter.getDefaultInstance() : poolingParam_; + } + } + /** + * optional .caffe.PoolingParameter pooling_param = 19; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder> + getPoolingParamFieldBuilder() { + if (poolingParamBuilder_ == null) { + poolingParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PoolingParameter, caffe.Caffe.PoolingParameter.Builder, caffe.Caffe.PoolingParameterOrBuilder>( + getPoolingParam(), + getParentForChildren(), + isClean()); + poolingParam_ = null; + } + return poolingParamBuilder_; + } + + private caffe.Caffe.PowerParameter powerParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> powerParamBuilder_; + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public boolean hasPowerParam() { + return ((bitField1_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public caffe.Caffe.PowerParameter getPowerParam() { + if (powerParamBuilder_ == null) { + return powerParam_ == null ? caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } else { + return powerParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public Builder setPowerParam(caffe.Caffe.PowerParameter value) { + if (powerParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + powerParam_ = value; + onChanged(); + } else { + powerParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public Builder setPowerParam( + caffe.Caffe.PowerParameter.Builder builderForValue) { + if (powerParamBuilder_ == null) { + powerParam_ = builderForValue.build(); + onChanged(); + } else { + powerParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public Builder mergePowerParam(caffe.Caffe.PowerParameter value) { + if (powerParamBuilder_ == null) { + if (((bitField1_ & 0x00000001) == 0x00000001) && + powerParam_ != null && + powerParam_ != caffe.Caffe.PowerParameter.getDefaultInstance()) { + powerParam_ = + caffe.Caffe.PowerParameter.newBuilder(powerParam_).mergeFrom(value).buildPartial(); + } else { + powerParam_ = value; + } + onChanged(); + } else { + powerParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000001; + return this; + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public Builder clearPowerParam() { + if (powerParamBuilder_ == null) { + powerParam_ = null; + onChanged(); + } else { + powerParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + return this; + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public caffe.Caffe.PowerParameter.Builder getPowerParamBuilder() { + bitField1_ |= 0x00000001; + onChanged(); + return getPowerParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + public caffe.Caffe.PowerParameterOrBuilder getPowerParamOrBuilder() { + if (powerParamBuilder_ != null) { + return powerParamBuilder_.getMessageOrBuilder(); + } else { + return powerParam_ == null ? + caffe.Caffe.PowerParameter.getDefaultInstance() : powerParam_; + } + } + /** + * optional .caffe.PowerParameter power_param = 21; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder> + getPowerParamFieldBuilder() { + if (powerParamBuilder_ == null) { + powerParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.PowerParameter, caffe.Caffe.PowerParameter.Builder, caffe.Caffe.PowerParameterOrBuilder>( + getPowerParam(), + getParentForChildren(), + isClean()); + powerParam_ = null; + } + return powerParamBuilder_; + } + + private caffe.Caffe.ReLUParameter reluParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> reluParamBuilder_; + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public boolean hasReluParam() { + return ((bitField1_ & 0x00000002) == 0x00000002); + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public caffe.Caffe.ReLUParameter getReluParam() { + if (reluParamBuilder_ == null) { + return reluParam_ == null ? caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } else { + return reluParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public Builder setReluParam(caffe.Caffe.ReLUParameter value) { + if (reluParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reluParam_ = value; + onChanged(); + } else { + reluParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public Builder setReluParam( + caffe.Caffe.ReLUParameter.Builder builderForValue) { + if (reluParamBuilder_ == null) { + reluParam_ = builderForValue.build(); + onChanged(); + } else { + reluParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public Builder mergeReluParam(caffe.Caffe.ReLUParameter value) { + if (reluParamBuilder_ == null) { + if (((bitField1_ & 0x00000002) == 0x00000002) && + reluParam_ != null && + reluParam_ != caffe.Caffe.ReLUParameter.getDefaultInstance()) { + reluParam_ = + caffe.Caffe.ReLUParameter.newBuilder(reluParam_).mergeFrom(value).buildPartial(); + } else { + reluParam_ = value; + } + onChanged(); + } else { + reluParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000002; + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public Builder clearReluParam() { + if (reluParamBuilder_ == null) { + reluParam_ = null; + onChanged(); + } else { + reluParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000002); + return this; + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public caffe.Caffe.ReLUParameter.Builder getReluParamBuilder() { + bitField1_ |= 0x00000002; + onChanged(); + return getReluParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + public caffe.Caffe.ReLUParameterOrBuilder getReluParamOrBuilder() { + if (reluParamBuilder_ != null) { + return reluParamBuilder_.getMessageOrBuilder(); + } else { + return reluParam_ == null ? + caffe.Caffe.ReLUParameter.getDefaultInstance() : reluParam_; + } + } + /** + * optional .caffe.ReLUParameter relu_param = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder> + getReluParamFieldBuilder() { + if (reluParamBuilder_ == null) { + reluParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ReLUParameter, caffe.Caffe.ReLUParameter.Builder, caffe.Caffe.ReLUParameterOrBuilder>( + getReluParam(), + getParentForChildren(), + isClean()); + reluParam_ = null; + } + return reluParamBuilder_; + } + + private caffe.Caffe.SigmoidParameter sigmoidParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> sigmoidParamBuilder_; + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public boolean hasSigmoidParam() { + return ((bitField1_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public caffe.Caffe.SigmoidParameter getSigmoidParam() { + if (sigmoidParamBuilder_ == null) { + return sigmoidParam_ == null ? caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } else { + return sigmoidParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public Builder setSigmoidParam(caffe.Caffe.SigmoidParameter value) { + if (sigmoidParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sigmoidParam_ = value; + onChanged(); + } else { + sigmoidParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public Builder setSigmoidParam( + caffe.Caffe.SigmoidParameter.Builder builderForValue) { + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = builderForValue.build(); + onChanged(); + } else { + sigmoidParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public Builder mergeSigmoidParam(caffe.Caffe.SigmoidParameter value) { + if (sigmoidParamBuilder_ == null) { + if (((bitField1_ & 0x00000004) == 0x00000004) && + sigmoidParam_ != null && + sigmoidParam_ != caffe.Caffe.SigmoidParameter.getDefaultInstance()) { + sigmoidParam_ = + caffe.Caffe.SigmoidParameter.newBuilder(sigmoidParam_).mergeFrom(value).buildPartial(); + } else { + sigmoidParam_ = value; + } + onChanged(); + } else { + sigmoidParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000004; + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public Builder clearSigmoidParam() { + if (sigmoidParamBuilder_ == null) { + sigmoidParam_ = null; + onChanged(); + } else { + sigmoidParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000004); + return this; + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public caffe.Caffe.SigmoidParameter.Builder getSigmoidParamBuilder() { + bitField1_ |= 0x00000004; + onChanged(); + return getSigmoidParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + public caffe.Caffe.SigmoidParameterOrBuilder getSigmoidParamOrBuilder() { + if (sigmoidParamBuilder_ != null) { + return sigmoidParamBuilder_.getMessageOrBuilder(); + } else { + return sigmoidParam_ == null ? + caffe.Caffe.SigmoidParameter.getDefaultInstance() : sigmoidParam_; + } + } + /** + * optional .caffe.SigmoidParameter sigmoid_param = 38; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder> + getSigmoidParamFieldBuilder() { + if (sigmoidParamBuilder_ == null) { + sigmoidParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SigmoidParameter, caffe.Caffe.SigmoidParameter.Builder, caffe.Caffe.SigmoidParameterOrBuilder>( + getSigmoidParam(), + getParentForChildren(), + isClean()); + sigmoidParam_ = null; + } + return sigmoidParamBuilder_; + } + + private caffe.Caffe.SoftmaxParameter softmaxParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> softmaxParamBuilder_; + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public boolean hasSoftmaxParam() { + return ((bitField1_ & 0x00000008) == 0x00000008); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public caffe.Caffe.SoftmaxParameter getSoftmaxParam() { + if (softmaxParamBuilder_ == null) { + return softmaxParam_ == null ? caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } else { + return softmaxParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public Builder setSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { + if (softmaxParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softmaxParam_ = value; + onChanged(); + } else { + softmaxParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public Builder setSoftmaxParam( + caffe.Caffe.SoftmaxParameter.Builder builderForValue) { + if (softmaxParamBuilder_ == null) { + softmaxParam_ = builderForValue.build(); + onChanged(); + } else { + softmaxParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public Builder mergeSoftmaxParam(caffe.Caffe.SoftmaxParameter value) { + if (softmaxParamBuilder_ == null) { + if (((bitField1_ & 0x00000008) == 0x00000008) && + softmaxParam_ != null && + softmaxParam_ != caffe.Caffe.SoftmaxParameter.getDefaultInstance()) { + softmaxParam_ = + caffe.Caffe.SoftmaxParameter.newBuilder(softmaxParam_).mergeFrom(value).buildPartial(); + } else { + softmaxParam_ = value; + } + onChanged(); + } else { + softmaxParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000008; + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public Builder clearSoftmaxParam() { + if (softmaxParamBuilder_ == null) { + softmaxParam_ = null; + onChanged(); + } else { + softmaxParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000008); + return this; + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public caffe.Caffe.SoftmaxParameter.Builder getSoftmaxParamBuilder() { + bitField1_ |= 0x00000008; + onChanged(); + return getSoftmaxParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + public caffe.Caffe.SoftmaxParameterOrBuilder getSoftmaxParamOrBuilder() { + if (softmaxParamBuilder_ != null) { + return softmaxParamBuilder_.getMessageOrBuilder(); + } else { + return softmaxParam_ == null ? + caffe.Caffe.SoftmaxParameter.getDefaultInstance() : softmaxParam_; + } + } + /** + * optional .caffe.SoftmaxParameter softmax_param = 39; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder> + getSoftmaxParamFieldBuilder() { + if (softmaxParamBuilder_ == null) { + softmaxParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SoftmaxParameter, caffe.Caffe.SoftmaxParameter.Builder, caffe.Caffe.SoftmaxParameterOrBuilder>( + getSoftmaxParam(), + getParentForChildren(), + isClean()); + softmaxParam_ = null; + } + return softmaxParamBuilder_; + } + + private caffe.Caffe.SliceParameter sliceParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> sliceParamBuilder_; + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public boolean hasSliceParam() { + return ((bitField1_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public caffe.Caffe.SliceParameter getSliceParam() { + if (sliceParamBuilder_ == null) { + return sliceParam_ == null ? caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } else { + return sliceParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public Builder setSliceParam(caffe.Caffe.SliceParameter value) { + if (sliceParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceParam_ = value; + onChanged(); + } else { + sliceParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public Builder setSliceParam( + caffe.Caffe.SliceParameter.Builder builderForValue) { + if (sliceParamBuilder_ == null) { + sliceParam_ = builderForValue.build(); + onChanged(); + } else { + sliceParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public Builder mergeSliceParam(caffe.Caffe.SliceParameter value) { + if (sliceParamBuilder_ == null) { + if (((bitField1_ & 0x00000010) == 0x00000010) && + sliceParam_ != null && + sliceParam_ != caffe.Caffe.SliceParameter.getDefaultInstance()) { + sliceParam_ = + caffe.Caffe.SliceParameter.newBuilder(sliceParam_).mergeFrom(value).buildPartial(); + } else { + sliceParam_ = value; + } + onChanged(); + } else { + sliceParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000010; + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public Builder clearSliceParam() { + if (sliceParamBuilder_ == null) { + sliceParam_ = null; + onChanged(); + } else { + sliceParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000010); + return this; + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public caffe.Caffe.SliceParameter.Builder getSliceParamBuilder() { + bitField1_ |= 0x00000010; + onChanged(); + return getSliceParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + public caffe.Caffe.SliceParameterOrBuilder getSliceParamOrBuilder() { + if (sliceParamBuilder_ != null) { + return sliceParamBuilder_.getMessageOrBuilder(); + } else { + return sliceParam_ == null ? + caffe.Caffe.SliceParameter.getDefaultInstance() : sliceParam_; + } + } + /** + * optional .caffe.SliceParameter slice_param = 31; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder> + getSliceParamFieldBuilder() { + if (sliceParamBuilder_ == null) { + sliceParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.SliceParameter, caffe.Caffe.SliceParameter.Builder, caffe.Caffe.SliceParameterOrBuilder>( + getSliceParam(), + getParentForChildren(), + isClean()); + sliceParam_ = null; + } + return sliceParamBuilder_; + } + + private caffe.Caffe.TanHParameter tanhParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> tanhParamBuilder_; + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public boolean hasTanhParam() { + return ((bitField1_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public caffe.Caffe.TanHParameter getTanhParam() { + if (tanhParamBuilder_ == null) { + return tanhParam_ == null ? caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } else { + return tanhParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public Builder setTanhParam(caffe.Caffe.TanHParameter value) { + if (tanhParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tanhParam_ = value; + onChanged(); + } else { + tanhParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public Builder setTanhParam( + caffe.Caffe.TanHParameter.Builder builderForValue) { + if (tanhParamBuilder_ == null) { + tanhParam_ = builderForValue.build(); + onChanged(); + } else { + tanhParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public Builder mergeTanhParam(caffe.Caffe.TanHParameter value) { + if (tanhParamBuilder_ == null) { + if (((bitField1_ & 0x00000020) == 0x00000020) && + tanhParam_ != null && + tanhParam_ != caffe.Caffe.TanHParameter.getDefaultInstance()) { + tanhParam_ = + caffe.Caffe.TanHParameter.newBuilder(tanhParam_).mergeFrom(value).buildPartial(); + } else { + tanhParam_ = value; + } + onChanged(); + } else { + tanhParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public Builder clearTanhParam() { + if (tanhParamBuilder_ == null) { + tanhParam_ = null; + onChanged(); + } else { + tanhParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + return this; + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public caffe.Caffe.TanHParameter.Builder getTanhParamBuilder() { + bitField1_ |= 0x00000020; + onChanged(); + return getTanhParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + public caffe.Caffe.TanHParameterOrBuilder getTanhParamOrBuilder() { + if (tanhParamBuilder_ != null) { + return tanhParamBuilder_.getMessageOrBuilder(); + } else { + return tanhParam_ == null ? + caffe.Caffe.TanHParameter.getDefaultInstance() : tanhParam_; + } + } + /** + * optional .caffe.TanHParameter tanh_param = 37; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder> + getTanhParamFieldBuilder() { + if (tanhParamBuilder_ == null) { + tanhParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TanHParameter, caffe.Caffe.TanHParameter.Builder, caffe.Caffe.TanHParameterOrBuilder>( + getTanhParam(), + getParentForChildren(), + isClean()); + tanhParam_ = null; + } + return tanhParamBuilder_; + } + + private caffe.Caffe.ThresholdParameter thresholdParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> thresholdParamBuilder_; + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public boolean hasThresholdParam() { + return ((bitField1_ & 0x00000040) == 0x00000040); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public caffe.Caffe.ThresholdParameter getThresholdParam() { + if (thresholdParamBuilder_ == null) { + return thresholdParam_ == null ? caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } else { + return thresholdParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public Builder setThresholdParam(caffe.Caffe.ThresholdParameter value) { + if (thresholdParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + thresholdParam_ = value; + onChanged(); + } else { + thresholdParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public Builder setThresholdParam( + caffe.Caffe.ThresholdParameter.Builder builderForValue) { + if (thresholdParamBuilder_ == null) { + thresholdParam_ = builderForValue.build(); + onChanged(); + } else { + thresholdParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public Builder mergeThresholdParam(caffe.Caffe.ThresholdParameter value) { + if (thresholdParamBuilder_ == null) { + if (((bitField1_ & 0x00000040) == 0x00000040) && + thresholdParam_ != null && + thresholdParam_ != caffe.Caffe.ThresholdParameter.getDefaultInstance()) { + thresholdParam_ = + caffe.Caffe.ThresholdParameter.newBuilder(thresholdParam_).mergeFrom(value).buildPartial(); + } else { + thresholdParam_ = value; + } + onChanged(); + } else { + thresholdParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000040; + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public Builder clearThresholdParam() { + if (thresholdParamBuilder_ == null) { + thresholdParam_ = null; + onChanged(); + } else { + thresholdParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000040); + return this; + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public caffe.Caffe.ThresholdParameter.Builder getThresholdParamBuilder() { + bitField1_ |= 0x00000040; + onChanged(); + return getThresholdParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + public caffe.Caffe.ThresholdParameterOrBuilder getThresholdParamOrBuilder() { + if (thresholdParamBuilder_ != null) { + return thresholdParamBuilder_.getMessageOrBuilder(); + } else { + return thresholdParam_ == null ? + caffe.Caffe.ThresholdParameter.getDefaultInstance() : thresholdParam_; + } + } + /** + * optional .caffe.ThresholdParameter threshold_param = 25; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder> + getThresholdParamFieldBuilder() { + if (thresholdParamBuilder_ == null) { + thresholdParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.ThresholdParameter, caffe.Caffe.ThresholdParameter.Builder, caffe.Caffe.ThresholdParameterOrBuilder>( + getThresholdParam(), + getParentForChildren(), + isClean()); + thresholdParam_ = null; + } + return thresholdParamBuilder_; + } + + private caffe.Caffe.WindowDataParameter windowDataParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> windowDataParamBuilder_; + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public boolean hasWindowDataParam() { + return ((bitField1_ & 0x00000080) == 0x00000080); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public caffe.Caffe.WindowDataParameter getWindowDataParam() { + if (windowDataParamBuilder_ == null) { + return windowDataParam_ == null ? caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } else { + return windowDataParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public Builder setWindowDataParam(caffe.Caffe.WindowDataParameter value) { + if (windowDataParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowDataParam_ = value; + onChanged(); + } else { + windowDataParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public Builder setWindowDataParam( + caffe.Caffe.WindowDataParameter.Builder builderForValue) { + if (windowDataParamBuilder_ == null) { + windowDataParam_ = builderForValue.build(); + onChanged(); + } else { + windowDataParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public Builder mergeWindowDataParam(caffe.Caffe.WindowDataParameter value) { + if (windowDataParamBuilder_ == null) { + if (((bitField1_ & 0x00000080) == 0x00000080) && + windowDataParam_ != null && + windowDataParam_ != caffe.Caffe.WindowDataParameter.getDefaultInstance()) { + windowDataParam_ = + caffe.Caffe.WindowDataParameter.newBuilder(windowDataParam_).mergeFrom(value).buildPartial(); + } else { + windowDataParam_ = value; + } + onChanged(); + } else { + windowDataParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000080; + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public Builder clearWindowDataParam() { + if (windowDataParamBuilder_ == null) { + windowDataParam_ = null; + onChanged(); + } else { + windowDataParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000080); + return this; + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public caffe.Caffe.WindowDataParameter.Builder getWindowDataParamBuilder() { + bitField1_ |= 0x00000080; + onChanged(); + return getWindowDataParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + public caffe.Caffe.WindowDataParameterOrBuilder getWindowDataParamOrBuilder() { + if (windowDataParamBuilder_ != null) { + return windowDataParamBuilder_.getMessageOrBuilder(); + } else { + return windowDataParam_ == null ? + caffe.Caffe.WindowDataParameter.getDefaultInstance() : windowDataParam_; + } + } + /** + * optional .caffe.WindowDataParameter window_data_param = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder> + getWindowDataParamFieldBuilder() { + if (windowDataParamBuilder_ == null) { + windowDataParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.WindowDataParameter, caffe.Caffe.WindowDataParameter.Builder, caffe.Caffe.WindowDataParameterOrBuilder>( + getWindowDataParam(), + getParentForChildren(), + isClean()); + windowDataParam_ = null; + } + return windowDataParamBuilder_; + } + + private caffe.Caffe.TransformationParameter transformParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> transformParamBuilder_; + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public boolean hasTransformParam() { + return ((bitField1_ & 0x00000100) == 0x00000100); + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public caffe.Caffe.TransformationParameter getTransformParam() { + if (transformParamBuilder_ == null) { + return transformParam_ == null ? caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } else { + return transformParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public Builder setTransformParam(caffe.Caffe.TransformationParameter value) { + if (transformParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformParam_ = value; + onChanged(); + } else { + transformParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public Builder setTransformParam( + caffe.Caffe.TransformationParameter.Builder builderForValue) { + if (transformParamBuilder_ == null) { + transformParam_ = builderForValue.build(); + onChanged(); + } else { + transformParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public Builder mergeTransformParam(caffe.Caffe.TransformationParameter value) { + if (transformParamBuilder_ == null) { + if (((bitField1_ & 0x00000100) == 0x00000100) && + transformParam_ != null && + transformParam_ != caffe.Caffe.TransformationParameter.getDefaultInstance()) { + transformParam_ = + caffe.Caffe.TransformationParameter.newBuilder(transformParam_).mergeFrom(value).buildPartial(); + } else { + transformParam_ = value; + } + onChanged(); + } else { + transformParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000100; + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public Builder clearTransformParam() { + if (transformParamBuilder_ == null) { + transformParam_ = null; + onChanged(); + } else { + transformParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000100); + return this; + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public caffe.Caffe.TransformationParameter.Builder getTransformParamBuilder() { + bitField1_ |= 0x00000100; + onChanged(); + return getTransformParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + public caffe.Caffe.TransformationParameterOrBuilder getTransformParamOrBuilder() { + if (transformParamBuilder_ != null) { + return transformParamBuilder_.getMessageOrBuilder(); + } else { + return transformParam_ == null ? + caffe.Caffe.TransformationParameter.getDefaultInstance() : transformParam_; + } + } + /** + * optional .caffe.TransformationParameter transform_param = 36; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder> + getTransformParamFieldBuilder() { + if (transformParamBuilder_ == null) { + transformParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.TransformationParameter, caffe.Caffe.TransformationParameter.Builder, caffe.Caffe.TransformationParameterOrBuilder>( + getTransformParam(), + getParentForChildren(), + isClean()); + transformParam_ = null; + } + return transformParamBuilder_; + } + + private caffe.Caffe.LossParameter lossParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> lossParamBuilder_; + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public boolean hasLossParam() { + return ((bitField1_ & 0x00000200) == 0x00000200); + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public caffe.Caffe.LossParameter getLossParam() { + if (lossParamBuilder_ == null) { + return lossParam_ == null ? caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } else { + return lossParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public Builder setLossParam(caffe.Caffe.LossParameter value) { + if (lossParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lossParam_ = value; + onChanged(); + } else { + lossParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public Builder setLossParam( + caffe.Caffe.LossParameter.Builder builderForValue) { + if (lossParamBuilder_ == null) { + lossParam_ = builderForValue.build(); + onChanged(); + } else { + lossParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public Builder mergeLossParam(caffe.Caffe.LossParameter value) { + if (lossParamBuilder_ == null) { + if (((bitField1_ & 0x00000200) == 0x00000200) && + lossParam_ != null && + lossParam_ != caffe.Caffe.LossParameter.getDefaultInstance()) { + lossParam_ = + caffe.Caffe.LossParameter.newBuilder(lossParam_).mergeFrom(value).buildPartial(); + } else { + lossParam_ = value; + } + onChanged(); + } else { + lossParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000200; + return this; + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public Builder clearLossParam() { + if (lossParamBuilder_ == null) { + lossParam_ = null; + onChanged(); + } else { + lossParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000200); + return this; + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public caffe.Caffe.LossParameter.Builder getLossParamBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getLossParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + public caffe.Caffe.LossParameterOrBuilder getLossParamOrBuilder() { + if (lossParamBuilder_ != null) { + return lossParamBuilder_.getMessageOrBuilder(); + } else { + return lossParam_ == null ? + caffe.Caffe.LossParameter.getDefaultInstance() : lossParam_; + } + } + /** + * optional .caffe.LossParameter loss_param = 42; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder> + getLossParamFieldBuilder() { + if (lossParamBuilder_ == null) { + lossParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.LossParameter, caffe.Caffe.LossParameter.Builder, caffe.Caffe.LossParameterOrBuilder>( + getLossParam(), + getParentForChildren(), + isClean()); + lossParam_ = null; + } + return lossParamBuilder_; + } + + private caffe.Caffe.V0LayerParameter layer_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder> layerBuilder_; + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public boolean hasLayer() { + return ((bitField1_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public caffe.Caffe.V0LayerParameter getLayer() { + if (layerBuilder_ == null) { + return layer_ == null ? caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; + } else { + return layerBuilder_.getMessage(); + } + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public Builder setLayer(caffe.Caffe.V0LayerParameter value) { + if (layerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layer_ = value; + onChanged(); + } else { + layerBuilder_.setMessage(value); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public Builder setLayer( + caffe.Caffe.V0LayerParameter.Builder builderForValue) { + if (layerBuilder_ == null) { + layer_ = builderForValue.build(); + onChanged(); + } else { + layerBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public Builder mergeLayer(caffe.Caffe.V0LayerParameter value) { + if (layerBuilder_ == null) { + if (((bitField1_ & 0x00000400) == 0x00000400) && + layer_ != null && + layer_ != caffe.Caffe.V0LayerParameter.getDefaultInstance()) { + layer_ = + caffe.Caffe.V0LayerParameter.newBuilder(layer_).mergeFrom(value).buildPartial(); + } else { + layer_ = value; + } + onChanged(); + } else { + layerBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000400; + return this; + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public Builder clearLayer() { + if (layerBuilder_ == null) { + layer_ = null; + onChanged(); + } else { + layerBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000400); + return this; + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public caffe.Caffe.V0LayerParameter.Builder getLayerBuilder() { + bitField1_ |= 0x00000400; + onChanged(); + return getLayerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + public caffe.Caffe.V0LayerParameterOrBuilder getLayerOrBuilder() { + if (layerBuilder_ != null) { + return layerBuilder_.getMessageOrBuilder(); + } else { + return layer_ == null ? + caffe.Caffe.V0LayerParameter.getDefaultInstance() : layer_; + } + } + /** + * optional .caffe.V0LayerParameter layer = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder> + getLayerFieldBuilder() { + if (layerBuilder_ == null) { + layerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.V0LayerParameter, caffe.Caffe.V0LayerParameter.Builder, caffe.Caffe.V0LayerParameterOrBuilder>( + getLayer(), + getParentForChildren(), + isClean()); + layer_ = null; + } + return layerBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.V1LayerParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.V1LayerParameter) + private static final caffe.Caffe.V1LayerParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.V1LayerParameter(); + } + + public static caffe.Caffe.V1LayerParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public V1LayerParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new V1LayerParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.V1LayerParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface V0LayerParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.V0LayerParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * 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; + * + *
+     * the string to specify the layer type
+     * 
+ */ + boolean hasType(); + /** + * optional string type = 2; + * + *
+     * the string to specify the layer type
+     * 
+ */ + java.lang.String getType(); + /** + * optional string type = 2; + * + *
+     * the string to specify the layer type
+     * 
+ */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * optional uint32 num_output = 3; + * + *
+     * Parameters to specify layers with inner products.
+     * 
+ */ + boolean hasNumOutput(); + /** + * optional uint32 num_output = 3; + * + *
+     * Parameters to specify layers with inner products.
+     * 
+ */ + int getNumOutput(); + + /** + * optional bool biasterm = 4 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean hasBiasterm(); + /** + * optional bool biasterm = 4 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + boolean getBiasterm(); + + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + boolean hasWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameter getWeightFiller(); + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder(); + + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + boolean hasBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameter getBiasFiller(); + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder(); + + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+     * The padding size
+     * 
+ */ + boolean hasPad(); + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+     * The padding size
+     * 
+ */ + int getPad(); + + /** + * optional uint32 kernelsize = 8; + * + *
+     * The kernel size
+     * 
+ */ + boolean hasKernelsize(); + /** + * optional uint32 kernelsize = 8; + * + *
+     * The kernel size
+     * 
+ */ + int getKernelsize(); + + /** + * optional uint32 group = 9 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + boolean hasGroup(); + /** + * optional uint32 group = 9 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + int getGroup(); + + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+     * The stride
+     * 
+ */ + boolean hasStride(); + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+     * The stride
+     * 
+ */ + int getStride(); + + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + boolean hasPool(); + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + caffe.Caffe.V0LayerParameter.PoolMethod getPool(); + + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + boolean hasDropoutRatio(); + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + float getDropoutRatio(); + + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+     * for local response norm
+     * 
+ */ + boolean hasLocalSize(); + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+     * for local response norm
+     * 
+ */ + int getLocalSize(); + + /** + * optional float alpha = 14 [default = 1]; + * + *
+     * for local response norm
+     * 
+ */ + boolean hasAlpha(); + /** + * optional float alpha = 14 [default = 1]; + * + *
+     * for local response norm
+     * 
+ */ + float getAlpha(); + + /** + * optional float beta = 15 [default = 0.75]; + * + *
+     * for local response norm
+     * 
+ */ + boolean hasBeta(); + /** + * optional float beta = 15 [default = 0.75]; + * + *
+     * for local response norm
+     * 
+ */ + float getBeta(); + + /** + * optional float k = 22 [default = 1]; + */ + boolean hasK(); + /** + * optional float k = 22 [default = 1]; + */ + float getK(); + + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + boolean hasSource(); + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + java.lang.String getSource(); + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + * optional float scale = 17 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + boolean hasScale(); + /** + * optional float scale = 17 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + float getScale(); + + /** + * optional string meanfile = 18; + */ + boolean hasMeanfile(); + /** + * optional string meanfile = 18; + */ + java.lang.String getMeanfile(); + /** + * optional string meanfile = 18; + */ + com.google.protobuf.ByteString + getMeanfileBytes(); + + /** + * optional uint32 batchsize = 19; + * + *
+     * For data layers, specify the batch size.
+     * 
+ */ + boolean hasBatchsize(); + /** + * optional uint32 batchsize = 19; + * + *
+     * For data layers, specify the batch size.
+     * 
+ */ + int getBatchsize(); + + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+     * For data layers, specify if we would like to randomly crop an image.
+     * 
+ */ + boolean hasCropsize(); + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+     * For data layers, specify if we would like to randomly crop an image.
+     * 
+ */ + int getCropsize(); + + /** + * optional bool mirror = 21 [default = false]; + * + *
+     * For data layers, specify if we want to randomly mirror data.
+     * 
+ */ + boolean hasMirror(); + /** + * optional bool mirror = 21 [default = false]; + * + *
+     * For data layers, specify if we want to randomly mirror data.
+     * 
+ */ + boolean getMirror(); + + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + java.util.List + getBlobsList(); + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + caffe.Caffe.BlobProto getBlobs(int index); + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + int getBlobsCount(); + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + java.util.List + getBlobsOrBuilderList(); + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index); + + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + java.util.List getBlobsLrList(); + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + int getBlobsLrCount(); + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + float getBlobsLr(int index); + + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + java.util.List getWeightDecayList(); + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + int getWeightDecayCount(); + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + float getWeightDecay(int index); + + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + boolean hasRandSkip(); + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + int getRandSkip(); + + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+     * Fields related to detection (det_*)
+     * foreground (object) overlap threshold
+     * 
+ */ + boolean hasDetFgThreshold(); + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+     * Fields related to detection (det_*)
+     * foreground (object) overlap threshold
+     * 
+ */ + float getDetFgThreshold(); + + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+     * background (non-object) overlap threshold
+     * 
+ */ + boolean hasDetBgThreshold(); + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+     * background (non-object) overlap threshold
+     * 
+ */ + float getDetBgThreshold(); + + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + boolean hasDetFgFraction(); + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + float getDetFgFraction(); + + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + boolean hasDetContextPad(); + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + int getDetContextPad(); + + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + boolean hasDetCropMode(); + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + java.lang.String getDetCropMode(); + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + com.google.protobuf.ByteString + getDetCropModeBytes(); + + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+     * For ReshapeLayer, one needs to specify the new dimensions.
+     * 
+ */ + boolean hasNewNum(); + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+     * For ReshapeLayer, one needs to specify the new dimensions.
+     * 
+ */ + int getNewNum(); + + /** + * optional int32 new_channels = 61 [default = 0]; + */ + boolean hasNewChannels(); + /** + * optional int32 new_channels = 61 [default = 0]; + */ + int getNewChannels(); + + /** + * optional int32 new_height = 62 [default = 0]; + */ + boolean hasNewHeight(); + /** + * optional int32 new_height = 62 [default = 0]; + */ + int getNewHeight(); + + /** + * optional int32 new_width = 63 [default = 0]; + */ + boolean hasNewWidth(); + /** + * optional int32 new_width = 63 [default = 0]; + */ + int getNewWidth(); + + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + boolean hasShuffleImages(); + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + boolean getShuffleImages(); + + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+     * For ConcatLayer, one needs to specify the dimension for concatenation, and
+     * the other dimensions must be the same for all the bottom blobs.
+     * By default it will concatenate blobs along the channels dimension.
+     * 
+ */ + boolean hasConcatDim(); + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+     * For ConcatLayer, one needs to specify the dimension for concatenation, and
+     * the other dimensions must be the same for all the bottom blobs.
+     * By default it will concatenate blobs along the channels dimension.
+     * 
+ */ + int getConcatDim(); + + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + boolean hasHdf5OutputParam(); + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + caffe.Caffe.HDF5OutputParameter getHdf5OutputParam(); + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder(); + } + /** + * Protobuf type {@code caffe.V0LayerParameter} + * + *
+   * DEPRECATED: V0LayerParameter is the old way of specifying layer parameters
+   * in Caffe.  We keep this message type around for legacy support.
+   * 
+ */ + public static final class V0LayerParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.V0LayerParameter) + V0LayerParameterOrBuilder { + // Use V0LayerParameter.newBuilder() to construct. + private V0LayerParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private V0LayerParameter() { + name_ = ""; + type_ = ""; + numOutput_ = 0; + biasterm_ = true; + pad_ = 0; + kernelsize_ = 0; + group_ = 1; + stride_ = 1; + pool_ = 0; + dropoutRatio_ = 0.5F; + localSize_ = 5; + alpha_ = 1F; + beta_ = 0.75F; + k_ = 1F; + source_ = ""; + scale_ = 1F; + meanfile_ = ""; + batchsize_ = 0; + cropsize_ = 0; + mirror_ = false; + blobs_ = java.util.Collections.emptyList(); + blobsLr_ = java.util.Collections.emptyList(); + weightDecay_ = java.util.Collections.emptyList(); + randSkip_ = 0; + detFgThreshold_ = 0.5F; + detBgThreshold_ = 0.5F; + detFgFraction_ = 0.25F; + detContextPad_ = 0; + detCropMode_ = "warp"; + newNum_ = 0; + newChannels_ = 0; + newHeight_ = 0; + newWidth_ = 0; + shuffleImages_ = false; + concatDim_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private V0LayerParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + name_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + type_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + numOutput_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + biasterm_ = input.readBool(); + break; + } + case 42: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = weightFiller_.toBuilder(); + } + weightFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(weightFiller_); + weightFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + case 50: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = biasFiller_.toBuilder(); + } + biasFiller_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(biasFiller_); + biasFiller_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } + case 56: { + bitField0_ |= 0x00000040; + pad_ = input.readUInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + kernelsize_ = input.readUInt32(); + break; + } + case 72: { + bitField0_ |= 0x00000100; + group_ = input.readUInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + stride_ = input.readUInt32(); + break; + } + case 88: { + int rawValue = input.readEnum(); + caffe.Caffe.V0LayerParameter.PoolMethod value = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(11, rawValue); + } else { + bitField0_ |= 0x00000400; + pool_ = rawValue; + } + break; + } + case 101: { + bitField0_ |= 0x00000800; + dropoutRatio_ = input.readFloat(); + break; + } + case 104: { + bitField0_ |= 0x00001000; + localSize_ = input.readUInt32(); + break; + } + case 117: { + bitField0_ |= 0x00002000; + alpha_ = input.readFloat(); + break; + } + case 125: { + bitField0_ |= 0x00004000; + beta_ = input.readFloat(); + break; + } + case 130: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00010000; + source_ = bs; + break; + } + case 141: { + bitField0_ |= 0x00020000; + scale_ = input.readFloat(); + break; + } + case 146: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00040000; + meanfile_ = bs; + break; + } + case 152: { + bitField0_ |= 0x00080000; + batchsize_ = input.readUInt32(); + break; + } + case 160: { + bitField0_ |= 0x00100000; + cropsize_ = input.readUInt32(); + break; + } + case 168: { + bitField0_ |= 0x00200000; + mirror_ = input.readBool(); + break; + } + case 181: { + bitField0_ |= 0x00008000; + k_ = input.readFloat(); + break; + } + case 402: { + if (!((mutable_bitField0_ & 0x00400000) == 0x00400000)) { + blobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00400000; + } + blobs_.add(input.readMessage(caffe.Caffe.BlobProto.parser(), extensionRegistry)); + break; + } + case 413: { + if (!((mutable_bitField0_ & 0x00800000) == 0x00800000)) { + blobsLr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00800000; + } + blobsLr_.add(input.readFloat()); + break; + } + case 410: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00800000) == 0x00800000) && input.getBytesUntilLimit() > 0) { + blobsLr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00800000; + } + while (input.getBytesUntilLimit() > 0) { + blobsLr_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 421: { + if (!((mutable_bitField0_ & 0x01000000) == 0x01000000)) { + weightDecay_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x01000000; + } + weightDecay_.add(input.readFloat()); + break; + } + case 418: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x01000000) == 0x01000000) && input.getBytesUntilLimit() > 0) { + weightDecay_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x01000000; + } + while (input.getBytesUntilLimit() > 0) { + weightDecay_.add(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 424: { + bitField0_ |= 0x00400000; + randSkip_ = input.readUInt32(); + break; + } + case 437: { + bitField0_ |= 0x00800000; + detFgThreshold_ = input.readFloat(); + break; + } + case 445: { + bitField0_ |= 0x01000000; + detBgThreshold_ = input.readFloat(); + break; + } + case 453: { + bitField0_ |= 0x02000000; + detFgFraction_ = input.readFloat(); + break; + } + case 464: { + bitField0_ |= 0x04000000; + detContextPad_ = input.readUInt32(); + break; + } + case 474: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x08000000; + detCropMode_ = bs; + break; + } + case 480: { + bitField0_ |= 0x10000000; + newNum_ = input.readInt32(); + break; + } + case 488: { + bitField0_ |= 0x20000000; + newChannels_ = input.readInt32(); + break; + } + case 496: { + bitField0_ |= 0x40000000; + newHeight_ = input.readInt32(); + break; + } + case 504: { + bitField0_ |= 0x80000000; + newWidth_ = input.readInt32(); + break; + } + case 512: { + bitField1_ |= 0x00000001; + shuffleImages_ = input.readBool(); + break; + } + case 520: { + bitField1_ |= 0x00000002; + concatDim_ = input.readUInt32(); + break; + } + case 8010: { + caffe.Caffe.HDF5OutputParameter.Builder subBuilder = null; + if (((bitField1_ & 0x00000004) == 0x00000004)) { + subBuilder = hdf5OutputParam_.toBuilder(); + } + hdf5OutputParam_ = input.readMessage(caffe.Caffe.HDF5OutputParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hdf5OutputParam_); + hdf5OutputParam_ = subBuilder.buildPartial(); + } + bitField1_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00400000) == 0x00400000)) { + blobs_ = java.util.Collections.unmodifiableList(blobs_); + } + if (((mutable_bitField0_ & 0x00800000) == 0x00800000)) { + blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); + } + if (((mutable_bitField0_ & 0x01000000) == 0x01000000)) { + weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_V0LayerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.V0LayerParameter.class, caffe.Caffe.V0LayerParameter.Builder.class); + } + + /** + * Protobuf enum {@code caffe.V0LayerParameter.PoolMethod} + */ + public enum PoolMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + * MAX = 0; + */ + MAX(0, 0), + /** + * AVE = 1; + */ + AVE(1, 1), + /** + * STOCHASTIC = 2; + */ + STOCHASTIC(2, 2), + ; + + /** + * MAX = 0; + */ + public static final int MAX_VALUE = 0; + /** + * AVE = 1; + */ + public static final int AVE_VALUE = 1; + /** + * STOCHASTIC = 2; + */ + public static final int STOCHASTIC_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static PoolMethod valueOf(int value) { + switch (value) { + case 0: return MAX; + case 1: return AVE; + case 2: return STOCHASTIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PoolMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PoolMethod findValueByNumber(int number) { + return PoolMethod.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.V0LayerParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final PoolMethod[] VALUES = values(); + + public static PoolMethod 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 PoolMethod(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:caffe.V0LayerParameter.PoolMethod) + } + + private int bitField0_; + private int bitField1_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile 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; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + * optional string type = 2; + * + *
+     * the string to specify the layer type
+     * 
+ */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string type = 2; + * + *
+     * the string to specify 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 string to specify 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; + } + } + + public static final int NUM_OUTPUT_FIELD_NUMBER = 3; + private int numOutput_; + /** + * optional uint32 num_output = 3; + * + *
+     * Parameters to specify layers with inner products.
+     * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 num_output = 3; + * + *
+     * Parameters to specify layers with inner products.
+     * 
+ */ + public int getNumOutput() { + return numOutput_; + } + + public static final int BIASTERM_FIELD_NUMBER = 4; + private boolean biasterm_; + /** + * optional bool biasterm = 4 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean hasBiasterm() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool biasterm = 4 [default = true]; + * + *
+     * whether to have bias terms
+     * 
+ */ + public boolean getBiasterm() { + return biasterm_; + } + + public static final int WEIGHT_FILLER_FIELD_NUMBER = 5; + private caffe.Caffe.FillerParameter weightFiller_; + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+     * The filler for the weight
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + + public static final int BIAS_FILLER_FIELD_NUMBER = 6; + private caffe.Caffe.FillerParameter biasFiller_; + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+     * The filler for the bias
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + + public static final int PAD_FIELD_NUMBER = 7; + private int pad_; + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+     * The padding size
+     * 
+ */ + public boolean hasPad() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+     * The padding size
+     * 
+ */ + public int getPad() { + return pad_; + } + + public static final int KERNELSIZE_FIELD_NUMBER = 8; + private int kernelsize_; + /** + * optional uint32 kernelsize = 8; + * + *
+     * The kernel size
+     * 
+ */ + public boolean hasKernelsize() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 kernelsize = 8; + * + *
+     * The kernel size
+     * 
+ */ + public int getKernelsize() { + return kernelsize_; + } + + public static final int GROUP_FIELD_NUMBER = 9; + private int group_; + /** + * optional uint32 group = 9 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 group = 9 [default = 1]; + * + *
+     * The group size for group conv
+     * 
+ */ + public int getGroup() { + return group_; + } + + public static final int STRIDE_FIELD_NUMBER = 10; + private int stride_; + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+     * The stride
+     * 
+ */ + public boolean hasStride() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+     * The stride
+     * 
+ */ + public int getStride() { + return stride_; + } + + public static final int POOL_FIELD_NUMBER = 11; + private int pool_; + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+     * The pooling method
+     * 
+ */ + public caffe.Caffe.V0LayerParameter.PoolMethod getPool() { + caffe.Caffe.V0LayerParameter.PoolMethod result = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.V0LayerParameter.PoolMethod.MAX : result; + } + + public static final int DROPOUT_RATIO_FIELD_NUMBER = 12; + private float dropoutRatio_; + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + public boolean hasDropoutRatio() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+     * dropout ratio
+     * 
+ */ + public float getDropoutRatio() { + return dropoutRatio_; + } + + public static final int LOCAL_SIZE_FIELD_NUMBER = 13; + private int localSize_; + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+     * for local response norm
+     * 
+ */ + public boolean hasLocalSize() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+     * for local response norm
+     * 
+ */ + public int getLocalSize() { + return localSize_; + } + + public static final int ALPHA_FIELD_NUMBER = 14; + private float alpha_; + /** + * optional float alpha = 14 [default = 1]; + * + *
+     * for local response norm
+     * 
+ */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional float alpha = 14 [default = 1]; + * + *
+     * for local response norm
+     * 
+ */ + public float getAlpha() { + return alpha_; + } + + public static final int BETA_FIELD_NUMBER = 15; + private float beta_; + /** + * optional float beta = 15 [default = 0.75]; + * + *
+     * for local response norm
+     * 
+ */ + public boolean hasBeta() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional float beta = 15 [default = 0.75]; + * + *
+     * for local response norm
+     * 
+ */ + public float getBeta() { + return beta_; + } + + public static final int K_FIELD_NUMBER = 22; + private float k_; + /** + * optional float k = 22 [default = 1]; + */ + public boolean hasK() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional float k = 22 [default = 1]; + */ + public float getK() { + return k_; + } + + public static final int SOURCE_FIELD_NUMBER = 16; + private volatile java.lang.Object source_; + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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()) { + source_ = s; + } + return s; + } + } + /** + * optional string source = 16; + * + *
+     * For data layers, specify the data source
+     * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCALE_FIELD_NUMBER = 17; + private float scale_; + /** + * optional float scale = 17 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional float scale = 17 [default = 1]; + * + *
+     * For data pre-processing, we can do simple scaling and subtracting the
+     * data mean, if provided. Note that the mean subtraction is always carried
+     * out before scaling.
+     * 
+ */ + public float getScale() { + return scale_; + } + + public static final int MEANFILE_FIELD_NUMBER = 18; + private volatile java.lang.Object meanfile_; + /** + * optional string meanfile = 18; + */ + public boolean hasMeanfile() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional string meanfile = 18; + */ + public java.lang.String getMeanfile() { + java.lang.Object ref = meanfile_; + 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()) { + meanfile_ = s; + } + return s; + } + } + /** + * optional string meanfile = 18; + */ + public com.google.protobuf.ByteString + getMeanfileBytes() { + java.lang.Object ref = meanfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCHSIZE_FIELD_NUMBER = 19; + private int batchsize_; + /** + * optional uint32 batchsize = 19; + * + *
+     * For data layers, specify the batch size.
+     * 
+ */ + public boolean hasBatchsize() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional uint32 batchsize = 19; + * + *
+     * For data layers, specify the batch size.
+     * 
+ */ + public int getBatchsize() { + return batchsize_; + } + + public static final int CROPSIZE_FIELD_NUMBER = 20; + private int cropsize_; + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+     * For data layers, specify if we would like to randomly crop an image.
+     * 
+ */ + public boolean hasCropsize() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+     * For data layers, specify if we would like to randomly crop an image.
+     * 
+ */ + public int getCropsize() { + return cropsize_; + } + + public static final int MIRROR_FIELD_NUMBER = 21; + private boolean mirror_; + /** + * optional bool mirror = 21 [default = false]; + * + *
+     * For data layers, specify if we want to randomly mirror data.
+     * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00200000) == 0x00200000); + } + /** + * optional bool mirror = 21 [default = false]; + * + *
+     * For data layers, specify if we want to randomly mirror data.
+     * 
+ */ + public boolean getMirror() { + return mirror_; + } + + public static final int BLOBS_FIELD_NUMBER = 50; + private java.util.List blobs_; + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + public java.util.List getBlobsList() { + return blobs_; + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + public java.util.List + getBlobsOrBuilderList() { + return blobs_; + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + public int getBlobsCount() { + return blobs_.size(); + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + public caffe.Caffe.BlobProto getBlobs(int index) { + return blobs_.get(index); + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+     * The blobs containing the numeric parameters of the layer
+     * 
+ */ + public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index) { + return blobs_.get(index); + } + + public static final int BLOBS_LR_FIELD_NUMBER = 51; + private java.util.List blobsLr_; + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + public java.util.List + getBlobsLrList() { + return blobsLr_; + } + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + public int getBlobsLrCount() { + return blobsLr_.size(); + } + /** + * repeated float blobs_lr = 51; + * + *
+     * The ratio that is multiplied on the global learning rate. If you want to
+     * set the learning ratio for one blob, you need to set it for all blobs.
+     * 
+ */ + public float getBlobsLr(int index) { + return blobsLr_.get(index); + } + + public static final int WEIGHT_DECAY_FIELD_NUMBER = 52; + private java.util.List weightDecay_; + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + public java.util.List + getWeightDecayList() { + return weightDecay_; + } + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + public int getWeightDecayCount() { + return weightDecay_.size(); + } + /** + * repeated float weight_decay = 52; + * + *
+     * The weight decay that is multiplied on the global weight decay.
+     * 
+ */ + public float getWeightDecay(int index) { + return weightDecay_.get(index); + } + + public static final int RAND_SKIP_FIELD_NUMBER = 53; + private int randSkip_; + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x00400000) == 0x00400000); + } + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+     * The rand_skip variable is for the data layer to skip a few data points
+     * to avoid all asynchronous sgd clients to start at the same point. The skip
+     * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+     * be larger than the number of keys in the database.
+     * 
+ */ + public int getRandSkip() { + return randSkip_; + } + + public static final int DET_FG_THRESHOLD_FIELD_NUMBER = 54; + private float detFgThreshold_; + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+     * Fields related to detection (det_*)
+     * foreground (object) overlap threshold
+     * 
+ */ + public boolean hasDetFgThreshold() { + return ((bitField0_ & 0x00800000) == 0x00800000); + } + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+     * Fields related to detection (det_*)
+     * foreground (object) overlap threshold
+     * 
+ */ + public float getDetFgThreshold() { + return detFgThreshold_; + } + + public static final int DET_BG_THRESHOLD_FIELD_NUMBER = 55; + private float detBgThreshold_; + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+     * background (non-object) overlap threshold
+     * 
+ */ + public boolean hasDetBgThreshold() { + return ((bitField0_ & 0x01000000) == 0x01000000); + } + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+     * background (non-object) overlap threshold
+     * 
+ */ + public float getDetBgThreshold() { + return detBgThreshold_; + } + + public static final int DET_FG_FRACTION_FIELD_NUMBER = 56; + private float detFgFraction_; + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + public boolean hasDetFgFraction() { + return ((bitField0_ & 0x02000000) == 0x02000000); + } + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+     * Fraction of batch that should be foreground objects
+     * 
+ */ + public float getDetFgFraction() { + return detFgFraction_; + } + + public static final int DET_CONTEXT_PAD_FIELD_NUMBER = 58; + private int detContextPad_; + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + public boolean hasDetContextPad() { + return ((bitField0_ & 0x04000000) == 0x04000000); + } + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+     * Amount of contextual padding to add around a window
+     * (used only by the window_data_layer)
+     * 
+ */ + public int getDetContextPad() { + return detContextPad_; + } + + public static final int DET_CROP_MODE_FIELD_NUMBER = 59; + private volatile java.lang.Object detCropMode_; + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public boolean hasDetCropMode() { + return ((bitField0_ & 0x08000000) == 0x08000000); + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public java.lang.String getDetCropMode() { + java.lang.Object ref = detCropMode_; + 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()) { + detCropMode_ = s; + } + return s; + } + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+     * Mode for cropping out a detection window
+     * warp: cropped window is warped to a fixed size and aspect ratio
+     * square: the tightest square around the window is cropped
+     * 
+ */ + public com.google.protobuf.ByteString + getDetCropModeBytes() { + java.lang.Object ref = detCropMode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detCropMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_NUM_FIELD_NUMBER = 60; + private int newNum_; + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+     * For ReshapeLayer, one needs to specify the new dimensions.
+     * 
+ */ + public boolean hasNewNum() { + return ((bitField0_ & 0x10000000) == 0x10000000); + } + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+     * For ReshapeLayer, one needs to specify the new dimensions.
+     * 
+ */ + public int getNewNum() { + return newNum_; + } + + public static final int NEW_CHANNELS_FIELD_NUMBER = 61; + private int newChannels_; + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public boolean hasNewChannels() { + return ((bitField0_ & 0x20000000) == 0x20000000); + } + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public int getNewChannels() { + return newChannels_; + } + + public static final int NEW_HEIGHT_FIELD_NUMBER = 62; + private int newHeight_; + /** + * optional int32 new_height = 62 [default = 0]; + */ + public boolean hasNewHeight() { + return ((bitField0_ & 0x40000000) == 0x40000000); + } + /** + * optional int32 new_height = 62 [default = 0]; + */ + public int getNewHeight() { + return newHeight_; + } + + public static final int NEW_WIDTH_FIELD_NUMBER = 63; + private int newWidth_; + /** + * optional int32 new_width = 63 [default = 0]; + */ + public boolean hasNewWidth() { + return ((bitField0_ & 0x80000000) == 0x80000000); + } + /** + * optional int32 new_width = 63 [default = 0]; + */ + public int getNewWidth() { + return newWidth_; + } + + public static final int SHUFFLE_IMAGES_FIELD_NUMBER = 64; + private boolean shuffleImages_; + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + public boolean hasShuffleImages() { + return ((bitField1_ & 0x00000001) == 0x00000001); + } + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+     * Whether or not ImageLayer should shuffle the list of files at every epoch.
+     * It will also resize images if new_height or new_width are not zero.
+     * 
+ */ + public boolean getShuffleImages() { + return shuffleImages_; + } + + public static final int CONCAT_DIM_FIELD_NUMBER = 65; + private int concatDim_; + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+     * For ConcatLayer, one needs to specify the dimension for concatenation, and
+     * the other dimensions must be the same for all the bottom blobs.
+     * By default it will concatenate blobs along the channels dimension.
+     * 
+ */ + public boolean hasConcatDim() { + return ((bitField1_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+     * For ConcatLayer, one needs to specify the dimension for concatenation, and
+     * the other dimensions must be the same for all the bottom blobs.
+     * By default it will concatenate blobs along the channels dimension.
+     * 
+ */ + public int getConcatDim() { + return concatDim_; + } + + public static final int HDF5_OUTPUT_PARAM_FIELD_NUMBER = 1001; + private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_; + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public boolean hasHdf5OutputParam() { + return ((bitField1_ & 0x00000004) == 0x00000004); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, numOutput_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, biasterm_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, getWeightFiller()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, getBiasFiller()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(7, pad_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeUInt32(8, kernelsize_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeUInt32(9, group_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeUInt32(10, stride_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeEnum(11, pool_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeFloat(12, dropoutRatio_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeUInt32(13, localSize_); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeFloat(14, alpha_); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + output.writeFloat(15, beta_); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, source_); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeFloat(17, scale_); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, meanfile_); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + output.writeUInt32(19, batchsize_); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + output.writeUInt32(20, cropsize_); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + output.writeBool(21, mirror_); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeFloat(22, k_); + } + for (int i = 0; i < blobs_.size(); i++) { + output.writeMessage(50, blobs_.get(i)); + } + for (int i = 0; i < blobsLr_.size(); i++) { + output.writeFloat(51, blobsLr_.get(i)); + } + for (int i = 0; i < weightDecay_.size(); i++) { + output.writeFloat(52, weightDecay_.get(i)); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + output.writeUInt32(53, randSkip_); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + output.writeFloat(54, detFgThreshold_); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + output.writeFloat(55, detBgThreshold_); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + output.writeFloat(56, detFgFraction_); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + output.writeUInt32(58, detContextPad_); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + com.google.protobuf.GeneratedMessage.writeString(output, 59, detCropMode_); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + output.writeInt32(60, newNum_); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + output.writeInt32(61, newChannels_); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + output.writeInt32(62, newHeight_); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + output.writeInt32(63, newWidth_); + } + if (((bitField1_ & 0x00000001) == 0x00000001)) { + output.writeBool(64, shuffleImages_); + } + if (((bitField1_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(65, concatDim_); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + output.writeMessage(1001, getHdf5OutputParam()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, numOutput_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, biasterm_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getWeightFiller()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getBiasFiller()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, pad_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, kernelsize_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, group_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, stride_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, pool_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(12, dropoutRatio_); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(13, localSize_); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(14, alpha_); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(15, beta_); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(16, source_); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(17, scale_); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(18, meanfile_); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(19, batchsize_); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(20, cropsize_); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(21, mirror_); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(22, k_); + } + for (int i = 0; i < blobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(50, blobs_.get(i)); + } + { + int dataSize = 0; + dataSize = 4 * getBlobsLrList().size(); + size += dataSize; + size += 2 * getBlobsLrList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getWeightDecayList().size(); + size += dataSize; + size += 2 * getWeightDecayList().size(); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(53, randSkip_); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(54, detFgThreshold_); + } + if (((bitField0_ & 0x01000000) == 0x01000000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(55, detBgThreshold_); + } + if (((bitField0_ & 0x02000000) == 0x02000000)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(56, detFgFraction_); + } + if (((bitField0_ & 0x04000000) == 0x04000000)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(58, detContextPad_); + } + if (((bitField0_ & 0x08000000) == 0x08000000)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(59, detCropMode_); + } + if (((bitField0_ & 0x10000000) == 0x10000000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(60, newNum_); + } + if (((bitField0_ & 0x20000000) == 0x20000000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(61, newChannels_); + } + if (((bitField0_ & 0x40000000) == 0x40000000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(62, newHeight_); + } + if (((bitField0_ & 0x80000000) == 0x80000000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(63, newWidth_); + } + if (((bitField1_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(64, shuffleImages_); + } + if (((bitField1_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(65, concatDim_); + } + if (((bitField1_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1001, getHdf5OutputParam()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.V0LayerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.V0LayerParameter 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.V0LayerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.V0LayerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.V0LayerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.V0LayerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.V0LayerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.V0LayerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.V0LayerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.V0LayerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.V0LayerParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.V0LayerParameter} + * + *
+     * DEPRECATED: V0LayerParameter is the old way of specifying layer parameters
+     * in Caffe.  We keep this message type around for legacy support.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.V0LayerParameter) + caffe.Caffe.V0LayerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_V0LayerParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.V0LayerParameter.class, caffe.Caffe.V0LayerParameter.Builder.class); + } + + // Construct using caffe.Caffe.V0LayerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getWeightFillerFieldBuilder(); + getBiasFillerFieldBuilder(); + getBlobsFieldBuilder(); + getHdf5OutputParamFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + numOutput_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + biasterm_ = true; + bitField0_ = (bitField0_ & ~0x00000008); + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + pad_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + kernelsize_ = 0; + bitField0_ = (bitField0_ & ~0x00000080); + group_ = 1; + bitField0_ = (bitField0_ & ~0x00000100); + stride_ = 1; + bitField0_ = (bitField0_ & ~0x00000200); + pool_ = 0; + bitField0_ = (bitField0_ & ~0x00000400); + dropoutRatio_ = 0.5F; + bitField0_ = (bitField0_ & ~0x00000800); + localSize_ = 5; + bitField0_ = (bitField0_ & ~0x00001000); + alpha_ = 1F; + bitField0_ = (bitField0_ & ~0x00002000); + beta_ = 0.75F; + bitField0_ = (bitField0_ & ~0x00004000); + k_ = 1F; + bitField0_ = (bitField0_ & ~0x00008000); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00010000); + scale_ = 1F; + bitField0_ = (bitField0_ & ~0x00020000); + meanfile_ = ""; + bitField0_ = (bitField0_ & ~0x00040000); + batchsize_ = 0; + bitField0_ = (bitField0_ & ~0x00080000); + cropsize_ = 0; + bitField0_ = (bitField0_ & ~0x00100000); + mirror_ = false; + bitField0_ = (bitField0_ & ~0x00200000); + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00400000); + } else { + blobsBuilder_.clear(); + } + blobsLr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + weightDecay_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + randSkip_ = 0; + bitField0_ = (bitField0_ & ~0x02000000); + detFgThreshold_ = 0.5F; + bitField0_ = (bitField0_ & ~0x04000000); + detBgThreshold_ = 0.5F; + bitField0_ = (bitField0_ & ~0x08000000); + detFgFraction_ = 0.25F; + bitField0_ = (bitField0_ & ~0x10000000); + detContextPad_ = 0; + bitField0_ = (bitField0_ & ~0x20000000); + detCropMode_ = "warp"; + bitField0_ = (bitField0_ & ~0x40000000); + newNum_ = 0; + bitField0_ = (bitField0_ & ~0x80000000); + newChannels_ = 0; + bitField1_ = (bitField1_ & ~0x00000001); + newHeight_ = 0; + bitField1_ = (bitField1_ & ~0x00000002); + newWidth_ = 0; + bitField1_ = (bitField1_ & ~0x00000004); + shuffleImages_ = false; + bitField1_ = (bitField1_ & ~0x00000008); + concatDim_ = 1; + bitField1_ = (bitField1_ & ~0x00000010); + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_V0LayerParameter_descriptor; + } + + public caffe.Caffe.V0LayerParameter getDefaultInstanceForType() { + return caffe.Caffe.V0LayerParameter.getDefaultInstance(); + } + + public caffe.Caffe.V0LayerParameter build() { + caffe.Caffe.V0LayerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.V0LayerParameter buildPartial() { + caffe.Caffe.V0LayerParameter result = new caffe.Caffe.V0LayerParameter(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 (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numOutput_ = numOutput_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.biasterm_ = biasterm_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (weightFillerBuilder_ == null) { + result.weightFiller_ = weightFiller_; + } else { + result.weightFiller_ = weightFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (biasFillerBuilder_ == null) { + result.biasFiller_ = biasFiller_; + } else { + result.biasFiller_ = biasFillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.pad_ = pad_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.kernelsize_ = kernelsize_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.group_ = group_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.stride_ = stride_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.pool_ = pool_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.dropoutRatio_ = dropoutRatio_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00001000; + } + result.localSize_ = localSize_; + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00002000; + } + result.alpha_ = alpha_; + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00004000; + } + result.beta_ = beta_; + if (((from_bitField0_ & 0x00008000) == 0x00008000)) { + to_bitField0_ |= 0x00008000; + } + result.k_ = k_; + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00010000; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00020000; + } + result.scale_ = scale_; + if (((from_bitField0_ & 0x00040000) == 0x00040000)) { + to_bitField0_ |= 0x00040000; + } + result.meanfile_ = meanfile_; + if (((from_bitField0_ & 0x00080000) == 0x00080000)) { + to_bitField0_ |= 0x00080000; + } + result.batchsize_ = batchsize_; + if (((from_bitField0_ & 0x00100000) == 0x00100000)) { + to_bitField0_ |= 0x00100000; + } + result.cropsize_ = cropsize_; + if (((from_bitField0_ & 0x00200000) == 0x00200000)) { + to_bitField0_ |= 0x00200000; + } + result.mirror_ = mirror_; + if (blobsBuilder_ == null) { + if (((bitField0_ & 0x00400000) == 0x00400000)) { + blobs_ = java.util.Collections.unmodifiableList(blobs_); + bitField0_ = (bitField0_ & ~0x00400000); + } + result.blobs_ = blobs_; + } else { + result.blobs_ = blobsBuilder_.build(); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + blobsLr_ = java.util.Collections.unmodifiableList(blobsLr_); + bitField0_ = (bitField0_ & ~0x00800000); + } + result.blobsLr_ = blobsLr_; + if (((bitField0_ & 0x01000000) == 0x01000000)) { + weightDecay_ = java.util.Collections.unmodifiableList(weightDecay_); + bitField0_ = (bitField0_ & ~0x01000000); + } + result.weightDecay_ = weightDecay_; + if (((from_bitField0_ & 0x02000000) == 0x02000000)) { + to_bitField0_ |= 0x00400000; + } + result.randSkip_ = randSkip_; + if (((from_bitField0_ & 0x04000000) == 0x04000000)) { + to_bitField0_ |= 0x00800000; + } + result.detFgThreshold_ = detFgThreshold_; + if (((from_bitField0_ & 0x08000000) == 0x08000000)) { + to_bitField0_ |= 0x01000000; + } + result.detBgThreshold_ = detBgThreshold_; + if (((from_bitField0_ & 0x10000000) == 0x10000000)) { + to_bitField0_ |= 0x02000000; + } + result.detFgFraction_ = detFgFraction_; + if (((from_bitField0_ & 0x20000000) == 0x20000000)) { + to_bitField0_ |= 0x04000000; + } + result.detContextPad_ = detContextPad_; + if (((from_bitField0_ & 0x40000000) == 0x40000000)) { + to_bitField0_ |= 0x08000000; + } + result.detCropMode_ = detCropMode_; + if (((from_bitField0_ & 0x80000000) == 0x80000000)) { + to_bitField0_ |= 0x10000000; + } + result.newNum_ = newNum_; + if (((from_bitField1_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x20000000; + } + result.newChannels_ = newChannels_; + if (((from_bitField1_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x40000000; + } + result.newHeight_ = newHeight_; + if (((from_bitField1_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x80000000; + } + result.newWidth_ = newWidth_; + if (((from_bitField1_ & 0x00000008) == 0x00000008)) { + to_bitField1_ |= 0x00000001; + } + result.shuffleImages_ = shuffleImages_; + if (((from_bitField1_ & 0x00000010) == 0x00000010)) { + to_bitField1_ |= 0x00000002; + } + result.concatDim_ = concatDim_; + if (((from_bitField1_ & 0x00000020) == 0x00000020)) { + to_bitField1_ |= 0x00000004; + } + if (hdf5OutputParamBuilder_ == null) { + result.hdf5OutputParam_ = hdf5OutputParam_; + } else { + result.hdf5OutputParam_ = hdf5OutputParamBuilder_.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.V0LayerParameter) { + return mergeFrom((caffe.Caffe.V0LayerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.V0LayerParameter other) { + if (other == caffe.Caffe.V0LayerParameter.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasType()) { + bitField0_ |= 0x00000002; + type_ = other.type_; + onChanged(); + } + if (other.hasNumOutput()) { + setNumOutput(other.getNumOutput()); + } + if (other.hasBiasterm()) { + setBiasterm(other.getBiasterm()); + } + if (other.hasWeightFiller()) { + mergeWeightFiller(other.getWeightFiller()); + } + if (other.hasBiasFiller()) { + mergeBiasFiller(other.getBiasFiller()); + } + if (other.hasPad()) { + setPad(other.getPad()); + } + if (other.hasKernelsize()) { + setKernelsize(other.getKernelsize()); + } + if (other.hasGroup()) { + setGroup(other.getGroup()); + } + if (other.hasStride()) { + setStride(other.getStride()); + } + if (other.hasPool()) { + setPool(other.getPool()); + } + if (other.hasDropoutRatio()) { + setDropoutRatio(other.getDropoutRatio()); + } + if (other.hasLocalSize()) { + setLocalSize(other.getLocalSize()); + } + if (other.hasAlpha()) { + setAlpha(other.getAlpha()); + } + if (other.hasBeta()) { + setBeta(other.getBeta()); + } + if (other.hasK()) { + setK(other.getK()); + } + if (other.hasSource()) { + bitField0_ |= 0x00010000; + source_ = other.source_; + onChanged(); + } + if (other.hasScale()) { + setScale(other.getScale()); + } + if (other.hasMeanfile()) { + bitField0_ |= 0x00040000; + meanfile_ = other.meanfile_; + onChanged(); + } + if (other.hasBatchsize()) { + setBatchsize(other.getBatchsize()); + } + if (other.hasCropsize()) { + setCropsize(other.getCropsize()); + } + if (other.hasMirror()) { + setMirror(other.getMirror()); + } + if (blobsBuilder_ == null) { + if (!other.blobs_.isEmpty()) { + if (blobs_.isEmpty()) { + blobs_ = other.blobs_; + bitField0_ = (bitField0_ & ~0x00400000); + } else { + ensureBlobsIsMutable(); + blobs_.addAll(other.blobs_); + } + onChanged(); + } + } else { + if (!other.blobs_.isEmpty()) { + if (blobsBuilder_.isEmpty()) { + blobsBuilder_.dispose(); + blobsBuilder_ = null; + blobs_ = other.blobs_; + bitField0_ = (bitField0_ & ~0x00400000); + blobsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBlobsFieldBuilder() : null; + } else { + blobsBuilder_.addAllMessages(other.blobs_); + } + } + } + if (!other.blobsLr_.isEmpty()) { + if (blobsLr_.isEmpty()) { + blobsLr_ = other.blobsLr_; + bitField0_ = (bitField0_ & ~0x00800000); + } else { + ensureBlobsLrIsMutable(); + blobsLr_.addAll(other.blobsLr_); + } + onChanged(); + } + if (!other.weightDecay_.isEmpty()) { + if (weightDecay_.isEmpty()) { + weightDecay_ = other.weightDecay_; + bitField0_ = (bitField0_ & ~0x01000000); + } else { + ensureWeightDecayIsMutable(); + weightDecay_.addAll(other.weightDecay_); + } + onChanged(); + } + if (other.hasRandSkip()) { + setRandSkip(other.getRandSkip()); + } + if (other.hasDetFgThreshold()) { + setDetFgThreshold(other.getDetFgThreshold()); + } + if (other.hasDetBgThreshold()) { + setDetBgThreshold(other.getDetBgThreshold()); + } + if (other.hasDetFgFraction()) { + setDetFgFraction(other.getDetFgFraction()); + } + if (other.hasDetContextPad()) { + setDetContextPad(other.getDetContextPad()); + } + if (other.hasDetCropMode()) { + bitField0_ |= 0x40000000; + detCropMode_ = other.detCropMode_; + onChanged(); + } + if (other.hasNewNum()) { + setNewNum(other.getNewNum()); + } + if (other.hasNewChannels()) { + setNewChannels(other.getNewChannels()); + } + if (other.hasNewHeight()) { + setNewHeight(other.getNewHeight()); + } + if (other.hasNewWidth()) { + setNewWidth(other.getNewWidth()); + } + if (other.hasShuffleImages()) { + setShuffleImages(other.getShuffleImages()); + } + if (other.hasConcatDim()) { + setConcatDim(other.getConcatDim()); + } + if (other.hasHdf5OutputParam()) { + mergeHdf5OutputParam(other.getHdf5OutputParam()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.V0LayerParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.V0LayerParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + private int bitField1_; + + 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)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + 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; + } + + private java.lang.Object type_ = ""; + /** + * optional string type = 2; + * + *
+       * the string to specify the layer type
+       * 
+ */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string type = 2; + * + *
+       * the string to specify the layer type
+       * 
+ */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + type_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type = 2; + * + *
+       * the string to specify 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 string to specify 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 string to specify the layer type
+       * 
+ */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * optional string type = 2; + * + *
+       * the string to specify the layer type
+       * 
+ */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + + private int numOutput_ ; + /** + * optional uint32 num_output = 3; + * + *
+       * Parameters to specify layers with inner products.
+       * 
+ */ + public boolean hasNumOutput() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 num_output = 3; + * + *
+       * Parameters to specify layers with inner products.
+       * 
+ */ + public int getNumOutput() { + return numOutput_; + } + /** + * optional uint32 num_output = 3; + * + *
+       * Parameters to specify layers with inner products.
+       * 
+ */ + public Builder setNumOutput(int value) { + bitField0_ |= 0x00000004; + numOutput_ = value; + onChanged(); + return this; + } + /** + * optional uint32 num_output = 3; + * + *
+       * Parameters to specify layers with inner products.
+       * 
+ */ + public Builder clearNumOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + numOutput_ = 0; + onChanged(); + return this; + } + + private boolean biasterm_ = true; + /** + * optional bool biasterm = 4 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean hasBiasterm() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool biasterm = 4 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public boolean getBiasterm() { + return biasterm_; + } + /** + * optional bool biasterm = 4 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder setBiasterm(boolean value) { + bitField0_ |= 0x00000008; + biasterm_ = value; + onChanged(); + return this; + } + /** + * optional bool biasterm = 4 [default = true]; + * + *
+       * whether to have bias terms
+       * 
+ */ + public Builder clearBiasterm() { + bitField0_ = (bitField0_ & ~0x00000008); + biasterm_ = true; + onChanged(); + return this; + } + + private caffe.Caffe.FillerParameter weightFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> weightFillerBuilder_; + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public boolean hasWeightFiller() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter getWeightFiller() { + if (weightFillerBuilder_ == null) { + return weightFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } else { + return weightFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + weightFiller_ = value; + onChanged(); + } else { + weightFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder setWeightFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (weightFillerBuilder_ == null) { + weightFiller_ = builderForValue.build(); + onChanged(); + } else { + weightFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder mergeWeightFiller(caffe.Caffe.FillerParameter value) { + if (weightFillerBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + weightFiller_ != null && + weightFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + weightFiller_ = + caffe.Caffe.FillerParameter.newBuilder(weightFiller_).mergeFrom(value).buildPartial(); + } else { + weightFiller_ = value; + } + onChanged(); + } else { + weightFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public Builder clearWeightFiller() { + if (weightFillerBuilder_ == null) { + weightFiller_ = null; + onChanged(); + } else { + weightFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getWeightFillerBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getWeightFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getWeightFillerOrBuilder() { + if (weightFillerBuilder_ != null) { + return weightFillerBuilder_.getMessageOrBuilder(); + } else { + return weightFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : weightFiller_; + } + } + /** + * optional .caffe.FillerParameter weight_filler = 5; + * + *
+       * The filler for the weight
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getWeightFillerFieldBuilder() { + if (weightFillerBuilder_ == null) { + weightFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getWeightFiller(), + getParentForChildren(), + isClean()); + weightFiller_ = null; + } + return weightFillerBuilder_; + } + + private caffe.Caffe.FillerParameter biasFiller_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> biasFillerBuilder_; + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public boolean hasBiasFiller() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter getBiasFiller() { + if (biasFillerBuilder_ == null) { + return biasFiller_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } else { + return biasFillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + biasFiller_ = value; + onChanged(); + } else { + biasFillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder setBiasFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (biasFillerBuilder_ == null) { + biasFiller_ = builderForValue.build(); + onChanged(); + } else { + biasFillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder mergeBiasFiller(caffe.Caffe.FillerParameter value) { + if (biasFillerBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + biasFiller_ != null && + biasFiller_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + biasFiller_ = + caffe.Caffe.FillerParameter.newBuilder(biasFiller_).mergeFrom(value).buildPartial(); + } else { + biasFiller_ = value; + } + onChanged(); + } else { + biasFillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public Builder clearBiasFiller() { + if (biasFillerBuilder_ == null) { + biasFiller_ = null; + onChanged(); + } else { + biasFillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getBiasFillerBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getBiasFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getBiasFillerOrBuilder() { + if (biasFillerBuilder_ != null) { + return biasFillerBuilder_.getMessageOrBuilder(); + } else { + return biasFiller_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : biasFiller_; + } + } + /** + * optional .caffe.FillerParameter bias_filler = 6; + * + *
+       * The filler for the bias
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getBiasFillerFieldBuilder() { + if (biasFillerBuilder_ == null) { + biasFillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getBiasFiller(), + getParentForChildren(), + isClean()); + biasFiller_ = null; + } + return biasFillerBuilder_; + } + + private int pad_ ; + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+       * The padding size
+       * 
+ */ + public boolean hasPad() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+       * The padding size
+       * 
+ */ + public int getPad() { + return pad_; + } + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+       * The padding size
+       * 
+ */ + public Builder setPad(int value) { + bitField0_ |= 0x00000040; + pad_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pad = 7 [default = 0]; + * + *
+       * The padding size
+       * 
+ */ + public Builder clearPad() { + bitField0_ = (bitField0_ & ~0x00000040); + pad_ = 0; + onChanged(); + return this; + } + + private int kernelsize_ ; + /** + * optional uint32 kernelsize = 8; + * + *
+       * The kernel size
+       * 
+ */ + public boolean hasKernelsize() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional uint32 kernelsize = 8; + * + *
+       * The kernel size
+       * 
+ */ + public int getKernelsize() { + return kernelsize_; + } + /** + * optional uint32 kernelsize = 8; + * + *
+       * The kernel size
+       * 
+ */ + public Builder setKernelsize(int value) { + bitField0_ |= 0x00000080; + kernelsize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 kernelsize = 8; + * + *
+       * The kernel size
+       * 
+ */ + public Builder clearKernelsize() { + bitField0_ = (bitField0_ & ~0x00000080); + kernelsize_ = 0; + onChanged(); + return this; + } + + private int group_ = 1; + /** + * optional uint32 group = 9 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional uint32 group = 9 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public int getGroup() { + return group_; + } + /** + * optional uint32 group = 9 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public Builder setGroup(int value) { + bitField0_ |= 0x00000100; + group_ = value; + onChanged(); + return this; + } + /** + * optional uint32 group = 9 [default = 1]; + * + *
+       * The group size for group conv
+       * 
+ */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00000100); + group_ = 1; + onChanged(); + return this; + } + + private int stride_ = 1; + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+       * The stride
+       * 
+ */ + public boolean hasStride() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+       * The stride
+       * 
+ */ + public int getStride() { + return stride_; + } + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+       * The stride
+       * 
+ */ + public Builder setStride(int value) { + bitField0_ |= 0x00000200; + stride_ = value; + onChanged(); + return this; + } + /** + * optional uint32 stride = 10 [default = 1]; + * + *
+       * The stride
+       * 
+ */ + public Builder clearStride() { + bitField0_ = (bitField0_ & ~0x00000200); + stride_ = 1; + onChanged(); + return this; + } + + private int pool_ = 0; + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public boolean hasPool() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public caffe.Caffe.V0LayerParameter.PoolMethod getPool() { + caffe.Caffe.V0LayerParameter.PoolMethod result = caffe.Caffe.V0LayerParameter.PoolMethod.valueOf(pool_); + return result == null ? caffe.Caffe.V0LayerParameter.PoolMethod.MAX : result; + } + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder setPool(caffe.Caffe.V0LayerParameter.PoolMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + pool_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX]; + * + *
+       * The pooling method
+       * 
+ */ + public Builder clearPool() { + bitField0_ = (bitField0_ & ~0x00000400); + pool_ = 0; + onChanged(); + return this; + } + + private float dropoutRatio_ = 0.5F; + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public boolean hasDropoutRatio() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public float getDropoutRatio() { + return dropoutRatio_; + } + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public Builder setDropoutRatio(float value) { + bitField0_ |= 0x00000800; + dropoutRatio_ = value; + onChanged(); + return this; + } + /** + * optional float dropout_ratio = 12 [default = 0.5]; + * + *
+       * dropout ratio
+       * 
+ */ + public Builder clearDropoutRatio() { + bitField0_ = (bitField0_ & ~0x00000800); + dropoutRatio_ = 0.5F; + onChanged(); + return this; + } + + private int localSize_ = 5; + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+       * for local response norm
+       * 
+ */ + public boolean hasLocalSize() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+       * for local response norm
+       * 
+ */ + public int getLocalSize() { + return localSize_; + } + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder setLocalSize(int value) { + bitField0_ |= 0x00001000; + localSize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 local_size = 13 [default = 5]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder clearLocalSize() { + bitField0_ = (bitField0_ & ~0x00001000); + localSize_ = 5; + onChanged(); + return this; + } + + private float alpha_ = 1F; + /** + * optional float alpha = 14 [default = 1]; + * + *
+       * for local response norm
+       * 
+ */ + public boolean hasAlpha() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional float alpha = 14 [default = 1]; + * + *
+       * for local response norm
+       * 
+ */ + public float getAlpha() { + return alpha_; + } + /** + * optional float alpha = 14 [default = 1]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder setAlpha(float value) { + bitField0_ |= 0x00002000; + alpha_ = value; + onChanged(); + return this; + } + /** + * optional float alpha = 14 [default = 1]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder clearAlpha() { + bitField0_ = (bitField0_ & ~0x00002000); + alpha_ = 1F; + onChanged(); + return this; + } + + private float beta_ = 0.75F; + /** + * optional float beta = 15 [default = 0.75]; + * + *
+       * for local response norm
+       * 
+ */ + public boolean hasBeta() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional float beta = 15 [default = 0.75]; + * + *
+       * for local response norm
+       * 
+ */ + public float getBeta() { + return beta_; + } + /** + * optional float beta = 15 [default = 0.75]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder setBeta(float value) { + bitField0_ |= 0x00004000; + beta_ = value; + onChanged(); + return this; + } + /** + * optional float beta = 15 [default = 0.75]; + * + *
+       * for local response norm
+       * 
+ */ + public Builder clearBeta() { + bitField0_ = (bitField0_ & ~0x00004000); + beta_ = 0.75F; + onChanged(); + return this; + } + + private float k_ = 1F; + /** + * optional float k = 22 [default = 1]; + */ + public boolean hasK() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional float k = 22 [default = 1]; + */ + public float getK() { + return k_; + } + /** + * optional float k = 22 [default = 1]; + */ + public Builder setK(float value) { + bitField0_ |= 0x00008000; + k_ = value; + onChanged(); + return this; + } + /** + * optional float k = 22 [default = 1]; + */ + public Builder clearK() { + bitField0_ = (bitField0_ & ~0x00008000); + k_ = 1F; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public boolean hasSource() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + source_ = value; + onChanged(); + return this; + } + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00010000); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string source = 16; + * + *
+       * For data layers, specify the data source
+       * 
+ */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + source_ = value; + onChanged(); + return this; + } + + private float scale_ = 1F; + /** + * optional float scale = 17 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public boolean hasScale() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional float scale = 17 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public float getScale() { + return scale_; + } + /** + * optional float scale = 17 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder setScale(float value) { + bitField0_ |= 0x00020000; + scale_ = value; + onChanged(); + return this; + } + /** + * optional float scale = 17 [default = 1]; + * + *
+       * For data pre-processing, we can do simple scaling and subtracting the
+       * data mean, if provided. Note that the mean subtraction is always carried
+       * out before scaling.
+       * 
+ */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00020000); + scale_ = 1F; + onChanged(); + return this; + } + + private java.lang.Object meanfile_ = ""; + /** + * optional string meanfile = 18; + */ + public boolean hasMeanfile() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional string meanfile = 18; + */ + public java.lang.String getMeanfile() { + java.lang.Object ref = meanfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + meanfile_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string meanfile = 18; + */ + public com.google.protobuf.ByteString + getMeanfileBytes() { + java.lang.Object ref = meanfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + meanfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string meanfile = 18; + */ + public Builder setMeanfile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + meanfile_ = value; + onChanged(); + return this; + } + /** + * optional string meanfile = 18; + */ + public Builder clearMeanfile() { + bitField0_ = (bitField0_ & ~0x00040000); + meanfile_ = getDefaultInstance().getMeanfile(); + onChanged(); + return this; + } + /** + * optional string meanfile = 18; + */ + public Builder setMeanfileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + meanfile_ = value; + onChanged(); + return this; + } + + private int batchsize_ ; + /** + * optional uint32 batchsize = 19; + * + *
+       * For data layers, specify the batch size.
+       * 
+ */ + public boolean hasBatchsize() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional uint32 batchsize = 19; + * + *
+       * For data layers, specify the batch size.
+       * 
+ */ + public int getBatchsize() { + return batchsize_; + } + /** + * optional uint32 batchsize = 19; + * + *
+       * For data layers, specify the batch size.
+       * 
+ */ + public Builder setBatchsize(int value) { + bitField0_ |= 0x00080000; + batchsize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 batchsize = 19; + * + *
+       * For data layers, specify the batch size.
+       * 
+ */ + public Builder clearBatchsize() { + bitField0_ = (bitField0_ & ~0x00080000); + batchsize_ = 0; + onChanged(); + return this; + } + + private int cropsize_ ; + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+       * For data layers, specify if we would like to randomly crop an image.
+       * 
+ */ + public boolean hasCropsize() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+       * For data layers, specify if we would like to randomly crop an image.
+       * 
+ */ + public int getCropsize() { + return cropsize_; + } + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+       * For data layers, specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder setCropsize(int value) { + bitField0_ |= 0x00100000; + cropsize_ = value; + onChanged(); + return this; + } + /** + * optional uint32 cropsize = 20 [default = 0]; + * + *
+       * For data layers, specify if we would like to randomly crop an image.
+       * 
+ */ + public Builder clearCropsize() { + bitField0_ = (bitField0_ & ~0x00100000); + cropsize_ = 0; + onChanged(); + return this; + } + + private boolean mirror_ ; + /** + * optional bool mirror = 21 [default = false]; + * + *
+       * For data layers, specify if we want to randomly mirror data.
+       * 
+ */ + public boolean hasMirror() { + return ((bitField0_ & 0x00200000) == 0x00200000); + } + /** + * optional bool mirror = 21 [default = false]; + * + *
+       * For data layers, specify if we want to randomly mirror data.
+       * 
+ */ + public boolean getMirror() { + return mirror_; + } + /** + * optional bool mirror = 21 [default = false]; + * + *
+       * For data layers, specify if we want to randomly mirror data.
+       * 
+ */ + public Builder setMirror(boolean value) { + bitField0_ |= 0x00200000; + mirror_ = value; + onChanged(); + return this; + } + /** + * optional bool mirror = 21 [default = false]; + * + *
+       * For data layers, specify if we want to randomly mirror data.
+       * 
+ */ + public Builder clearMirror() { + bitField0_ = (bitField0_ & ~0x00200000); + mirror_ = false; + onChanged(); + return this; + } + + private java.util.List blobs_ = + java.util.Collections.emptyList(); + private void ensureBlobsIsMutable() { + if (!((bitField0_ & 0x00400000) == 0x00400000)) { + blobs_ = new java.util.ArrayList(blobs_); + bitField0_ |= 0x00400000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + caffe.Caffe.BlobProto, caffe.Caffe.BlobProto.Builder, caffe.Caffe.BlobProtoOrBuilder> blobsBuilder_; + + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public java.util.List getBlobsList() { + if (blobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobs_); + } else { + return blobsBuilder_.getMessageList(); + } + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public int getBlobsCount() { + if (blobsBuilder_ == null) { + return blobs_.size(); + } else { + return blobsBuilder_.getCount(); + } + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public caffe.Caffe.BlobProto getBlobs(int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); + } else { + return blobsBuilder_.getMessage(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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 = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public Builder addAllBlobs( + java.lang.Iterable values) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blobs_); + onChanged(); + } else { + blobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public Builder clearBlobs() { + if (blobsBuilder_ == null) { + blobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + } else { + blobsBuilder_.clear(); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public Builder removeBlobs(int index) { + if (blobsBuilder_ == null) { + ensureBlobsIsMutable(); + blobs_.remove(index); + onChanged(); + } else { + blobsBuilder_.remove(index); + } + return this; + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder getBlobsBuilder( + int index) { + return getBlobsFieldBuilder().getBuilder(index); + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public caffe.Caffe.BlobProtoOrBuilder getBlobsOrBuilder( + int index) { + if (blobsBuilder_ == null) { + return blobs_.get(index); } else { + return blobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public java.util.List + getBlobsOrBuilderList() { + if (blobsBuilder_ != null) { + return blobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blobs_); + } + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder() { + return getBlobsFieldBuilder().addBuilder( + caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + public caffe.Caffe.BlobProto.Builder addBlobsBuilder( + int index) { + return getBlobsFieldBuilder().addBuilder( + index, caffe.Caffe.BlobProto.getDefaultInstance()); + } + /** + * repeated .caffe.BlobProto blobs = 50; + * + *
+       * The blobs containing the numeric parameters of the layer
+       * 
+ */ + 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_ & 0x00400000) == 0x00400000), + getParentForChildren(), + isClean()); + blobs_ = null; + } + return blobsBuilder_; + } + + private java.util.List blobsLr_ = java.util.Collections.emptyList(); + private void ensureBlobsLrIsMutable() { + if (!((bitField0_ & 0x00800000) == 0x00800000)) { + blobsLr_ = new java.util.ArrayList(blobsLr_); + bitField0_ |= 0x00800000; + } + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public java.util.List + getBlobsLrList() { + return java.util.Collections.unmodifiableList(blobsLr_); + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public int getBlobsLrCount() { + return blobsLr_.size(); + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public float getBlobsLr(int index) { + return blobsLr_.get(index); + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public Builder setBlobsLr( + int index, float value) { + ensureBlobsLrIsMutable(); + blobsLr_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public Builder addBlobsLr(float value) { + ensureBlobsLrIsMutable(); + blobsLr_.add(value); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public Builder addAllBlobsLr( + java.lang.Iterable values) { + ensureBlobsLrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blobsLr_); + onChanged(); + return this; + } + /** + * repeated float blobs_lr = 51; + * + *
+       * The ratio that is multiplied on the global learning rate. If you want to
+       * set the learning ratio for one blob, you need to set it for all blobs.
+       * 
+ */ + public Builder clearBlobsLr() { + blobsLr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + private java.util.List weightDecay_ = java.util.Collections.emptyList(); + private void ensureWeightDecayIsMutable() { + if (!((bitField0_ & 0x01000000) == 0x01000000)) { + weightDecay_ = new java.util.ArrayList(weightDecay_); + bitField0_ |= 0x01000000; + } + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public java.util.List + getWeightDecayList() { + return java.util.Collections.unmodifiableList(weightDecay_); + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public int getWeightDecayCount() { + return weightDecay_.size(); + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public float getWeightDecay(int index) { + return weightDecay_.get(index); + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public Builder setWeightDecay( + int index, float value) { + ensureWeightDecayIsMutable(); + weightDecay_.set(index, value); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public Builder addWeightDecay(float value) { + ensureWeightDecayIsMutable(); + weightDecay_.add(value); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public Builder addAllWeightDecay( + java.lang.Iterable values) { + ensureWeightDecayIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, weightDecay_); + onChanged(); + return this; + } + /** + * repeated float weight_decay = 52; + * + *
+       * The weight decay that is multiplied on the global weight decay.
+       * 
+ */ + public Builder clearWeightDecay() { + weightDecay_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + onChanged(); + return this; + } + + private int randSkip_ ; + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public boolean hasRandSkip() { + return ((bitField0_ & 0x02000000) == 0x02000000); + } + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public int getRandSkip() { + return randSkip_; + } + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public Builder setRandSkip(int value) { + bitField0_ |= 0x02000000; + randSkip_ = value; + onChanged(); + return this; + } + /** + * optional uint32 rand_skip = 53 [default = 0]; + * + *
+       * The rand_skip variable is for the data layer to skip a few data points
+       * to avoid all asynchronous sgd clients to start at the same point. The skip
+       * point would be set as rand_skip * rand(0,1). Note that rand_skip should not
+       * be larger than the number of keys in the database.
+       * 
+ */ + public Builder clearRandSkip() { + bitField0_ = (bitField0_ & ~0x02000000); + randSkip_ = 0; + onChanged(); + return this; + } + + private float detFgThreshold_ = 0.5F; + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+       * Fields related to detection (det_*)
+       * foreground (object) overlap threshold
+       * 
+ */ + public boolean hasDetFgThreshold() { + return ((bitField0_ & 0x04000000) == 0x04000000); + } + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+       * Fields related to detection (det_*)
+       * foreground (object) overlap threshold
+       * 
+ */ + public float getDetFgThreshold() { + return detFgThreshold_; + } + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+       * Fields related to detection (det_*)
+       * foreground (object) overlap threshold
+       * 
+ */ + public Builder setDetFgThreshold(float value) { + bitField0_ |= 0x04000000; + detFgThreshold_ = value; + onChanged(); + return this; + } + /** + * optional float det_fg_threshold = 54 [default = 0.5]; + * + *
+       * Fields related to detection (det_*)
+       * foreground (object) overlap threshold
+       * 
+ */ + public Builder clearDetFgThreshold() { + bitField0_ = (bitField0_ & ~0x04000000); + detFgThreshold_ = 0.5F; + onChanged(); + return this; + } + + private float detBgThreshold_ = 0.5F; + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+       * background (non-object) overlap threshold
+       * 
+ */ + public boolean hasDetBgThreshold() { + return ((bitField0_ & 0x08000000) == 0x08000000); + } + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+       * background (non-object) overlap threshold
+       * 
+ */ + public float getDetBgThreshold() { + return detBgThreshold_; + } + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+       * background (non-object) overlap threshold
+       * 
+ */ + public Builder setDetBgThreshold(float value) { + bitField0_ |= 0x08000000; + detBgThreshold_ = value; + onChanged(); + return this; + } + /** + * optional float det_bg_threshold = 55 [default = 0.5]; + * + *
+       * background (non-object) overlap threshold
+       * 
+ */ + public Builder clearDetBgThreshold() { + bitField0_ = (bitField0_ & ~0x08000000); + detBgThreshold_ = 0.5F; + onChanged(); + return this; + } + + private float detFgFraction_ = 0.25F; + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public boolean hasDetFgFraction() { + return ((bitField0_ & 0x10000000) == 0x10000000); + } + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public float getDetFgFraction() { + return detFgFraction_; + } + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public Builder setDetFgFraction(float value) { + bitField0_ |= 0x10000000; + detFgFraction_ = value; + onChanged(); + return this; + } + /** + * optional float det_fg_fraction = 56 [default = 0.25]; + * + *
+       * Fraction of batch that should be foreground objects
+       * 
+ */ + public Builder clearDetFgFraction() { + bitField0_ = (bitField0_ & ~0x10000000); + detFgFraction_ = 0.25F; + onChanged(); + return this; + } + + private int detContextPad_ ; + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public boolean hasDetContextPad() { + return ((bitField0_ & 0x20000000) == 0x20000000); + } + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public int getDetContextPad() { + return detContextPad_; + } + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public Builder setDetContextPad(int value) { + bitField0_ |= 0x20000000; + detContextPad_ = value; + onChanged(); + return this; + } + /** + * optional uint32 det_context_pad = 58 [default = 0]; + * + *
+       * Amount of contextual padding to add around a window
+       * (used only by the window_data_layer)
+       * 
+ */ + public Builder clearDetContextPad() { + bitField0_ = (bitField0_ & ~0x20000000); + detContextPad_ = 0; + onChanged(); + return this; + } + + private java.lang.Object detCropMode_ = "warp"; + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public boolean hasDetCropMode() { + return ((bitField0_ & 0x40000000) == 0x40000000); + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public java.lang.String getDetCropMode() { + java.lang.Object ref = detCropMode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + detCropMode_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public com.google.protobuf.ByteString + getDetCropModeBytes() { + java.lang.Object ref = detCropMode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detCropMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder setDetCropMode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x40000000; + detCropMode_ = value; + onChanged(); + return this; + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder clearDetCropMode() { + bitField0_ = (bitField0_ & ~0x40000000); + detCropMode_ = getDefaultInstance().getDetCropMode(); + onChanged(); + return this; + } + /** + * optional string det_crop_mode = 59 [default = "warp"]; + * + *
+       * Mode for cropping out a detection window
+       * warp: cropped window is warped to a fixed size and aspect ratio
+       * square: the tightest square around the window is cropped
+       * 
+ */ + public Builder setDetCropModeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x40000000; + detCropMode_ = value; + onChanged(); + return this; + } + + private int newNum_ ; + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+       * For ReshapeLayer, one needs to specify the new dimensions.
+       * 
+ */ + public boolean hasNewNum() { + return ((bitField0_ & 0x80000000) == 0x80000000); + } + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+       * For ReshapeLayer, one needs to specify the new dimensions.
+       * 
+ */ + public int getNewNum() { + return newNum_; + } + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+       * For ReshapeLayer, one needs to specify the new dimensions.
+       * 
+ */ + public Builder setNewNum(int value) { + bitField0_ |= 0x80000000; + newNum_ = value; + onChanged(); + return this; + } + /** + * optional int32 new_num = 60 [default = 0]; + * + *
+       * For ReshapeLayer, one needs to specify the new dimensions.
+       * 
+ */ + public Builder clearNewNum() { + bitField0_ = (bitField0_ & ~0x80000000); + newNum_ = 0; + onChanged(); + return this; + } + + private int newChannels_ ; + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public boolean hasNewChannels() { + return ((bitField1_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public int getNewChannels() { + return newChannels_; + } + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public Builder setNewChannels(int value) { + bitField1_ |= 0x00000001; + newChannels_ = value; + onChanged(); + return this; + } + /** + * optional int32 new_channels = 61 [default = 0]; + */ + public Builder clearNewChannels() { + bitField1_ = (bitField1_ & ~0x00000001); + newChannels_ = 0; + onChanged(); + return this; + } + + private int newHeight_ ; + /** + * optional int32 new_height = 62 [default = 0]; + */ + public boolean hasNewHeight() { + return ((bitField1_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 new_height = 62 [default = 0]; + */ + public int getNewHeight() { + return newHeight_; + } + /** + * optional int32 new_height = 62 [default = 0]; + */ + public Builder setNewHeight(int value) { + bitField1_ |= 0x00000002; + newHeight_ = value; + onChanged(); + return this; + } + /** + * optional int32 new_height = 62 [default = 0]; + */ + public Builder clearNewHeight() { + bitField1_ = (bitField1_ & ~0x00000002); + newHeight_ = 0; + onChanged(); + return this; + } + + private int newWidth_ ; + /** + * optional int32 new_width = 63 [default = 0]; + */ + public boolean hasNewWidth() { + return ((bitField1_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 new_width = 63 [default = 0]; + */ + public int getNewWidth() { + return newWidth_; + } + /** + * optional int32 new_width = 63 [default = 0]; + */ + public Builder setNewWidth(int value) { + bitField1_ |= 0x00000004; + newWidth_ = value; + onChanged(); + return this; + } + /** + * optional int32 new_width = 63 [default = 0]; + */ + public Builder clearNewWidth() { + bitField1_ = (bitField1_ & ~0x00000004); + newWidth_ = 0; + onChanged(); + return this; + } + + private boolean shuffleImages_ ; + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public boolean hasShuffleImages() { + return ((bitField1_ & 0x00000008) == 0x00000008); + } + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public boolean getShuffleImages() { + return shuffleImages_; + } + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public Builder setShuffleImages(boolean value) { + bitField1_ |= 0x00000008; + shuffleImages_ = value; + onChanged(); + return this; + } + /** + * optional bool shuffle_images = 64 [default = false]; + * + *
+       * Whether or not ImageLayer should shuffle the list of files at every epoch.
+       * It will also resize images if new_height or new_width are not zero.
+       * 
+ */ + public Builder clearShuffleImages() { + bitField1_ = (bitField1_ & ~0x00000008); + shuffleImages_ = false; + onChanged(); + return this; + } + + private int concatDim_ = 1; + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+       * For ConcatLayer, one needs to specify the dimension for concatenation, and
+       * the other dimensions must be the same for all the bottom blobs.
+       * By default it will concatenate blobs along the channels dimension.
+       * 
+ */ + public boolean hasConcatDim() { + return ((bitField1_ & 0x00000010) == 0x00000010); + } + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+       * For ConcatLayer, one needs to specify the dimension for concatenation, and
+       * the other dimensions must be the same for all the bottom blobs.
+       * By default it will concatenate blobs along the channels dimension.
+       * 
+ */ + public int getConcatDim() { + return concatDim_; + } + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+       * For ConcatLayer, one needs to specify the dimension for concatenation, and
+       * the other dimensions must be the same for all the bottom blobs.
+       * By default it will concatenate blobs along the channels dimension.
+       * 
+ */ + public Builder setConcatDim(int value) { + bitField1_ |= 0x00000010; + concatDim_ = value; + onChanged(); + return this; + } + /** + * optional uint32 concat_dim = 65 [default = 1]; + * + *
+       * For ConcatLayer, one needs to specify the dimension for concatenation, and
+       * the other dimensions must be the same for all the bottom blobs.
+       * By default it will concatenate blobs along the channels dimension.
+       * 
+ */ + public Builder clearConcatDim() { + bitField1_ = (bitField1_ & ~0x00000010); + concatDim_ = 1; + onChanged(); + return this; + } + + private caffe.Caffe.HDF5OutputParameter hdf5OutputParam_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> hdf5OutputParamBuilder_; + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public boolean hasHdf5OutputParam() { + return ((bitField1_ & 0x00000020) == 0x00000020); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public caffe.Caffe.HDF5OutputParameter getHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + return hdf5OutputParam_ == null ? caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } else { + return hdf5OutputParamBuilder_.getMessage(); + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public Builder setHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hdf5OutputParam_ = value; + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public Builder setHdf5OutputParam( + caffe.Caffe.HDF5OutputParameter.Builder builderForValue) { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = builderForValue.build(); + onChanged(); + } else { + hdf5OutputParamBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public Builder mergeHdf5OutputParam(caffe.Caffe.HDF5OutputParameter value) { + if (hdf5OutputParamBuilder_ == null) { + if (((bitField1_ & 0x00000020) == 0x00000020) && + hdf5OutputParam_ != null && + hdf5OutputParam_ != caffe.Caffe.HDF5OutputParameter.getDefaultInstance()) { + hdf5OutputParam_ = + caffe.Caffe.HDF5OutputParameter.newBuilder(hdf5OutputParam_).mergeFrom(value).buildPartial(); + } else { + hdf5OutputParam_ = value; + } + onChanged(); + } else { + hdf5OutputParamBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000020; + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public Builder clearHdf5OutputParam() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParam_ = null; + onChanged(); + } else { + hdf5OutputParamBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + return this; + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public caffe.Caffe.HDF5OutputParameter.Builder getHdf5OutputParamBuilder() { + bitField1_ |= 0x00000020; + onChanged(); + return getHdf5OutputParamFieldBuilder().getBuilder(); + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + public caffe.Caffe.HDF5OutputParameterOrBuilder getHdf5OutputParamOrBuilder() { + if (hdf5OutputParamBuilder_ != null) { + return hdf5OutputParamBuilder_.getMessageOrBuilder(); + } else { + return hdf5OutputParam_ == null ? + caffe.Caffe.HDF5OutputParameter.getDefaultInstance() : hdf5OutputParam_; + } + } + /** + * optional .caffe.HDF5OutputParameter hdf5_output_param = 1001; + */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder> + getHdf5OutputParamFieldBuilder() { + if (hdf5OutputParamBuilder_ == null) { + hdf5OutputParamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.HDF5OutputParameter, caffe.Caffe.HDF5OutputParameter.Builder, caffe.Caffe.HDF5OutputParameterOrBuilder>( + getHdf5OutputParam(), + getParentForChildren(), + isClean()); + hdf5OutputParam_ = null; + } + return hdf5OutputParamBuilder_; + } + + // @@protoc_insertion_point(builder_scope:caffe.V0LayerParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.V0LayerParameter) + private static final caffe.Caffe.V0LayerParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.V0LayerParameter(); + } + + public static caffe.Caffe.V0LayerParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public V0LayerParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new V0LayerParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.V0LayerParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PReLUParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:caffe.PReLUParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + boolean hasFiller(); + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + caffe.Caffe.FillerParameter getFiller(); + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder(); + + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+     * Whether or not slope paramters are shared across channels.
+     * 
+ */ + boolean hasChannelShared(); + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+     * Whether or not slope paramters are shared across channels.
+     * 
+ */ + boolean getChannelShared(); + } + /** + * Protobuf type {@code caffe.PReLUParameter} + * + *
+   * Parametric ReLU described in K. He et al, Delving Deep into Rectifiers:
+   * Surpassing Human-Level Performance on ImageNet Classification, 2015.
+   * 
+ */ + public static final class PReLUParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:caffe.PReLUParameter) + PReLUParameterOrBuilder { + // Use PReLUParameter.newBuilder() to construct. + private PReLUParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PReLUParameter() { + channelShared_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PReLUParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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: { + caffe.Caffe.FillerParameter.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = filler_.toBuilder(); + } + filler_ = input.readMessage(caffe.Caffe.FillerParameter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filler_); + filler_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + bitField0_ |= 0x00000002; + channelShared_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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_PReLUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PReLUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PReLUParameter.class, caffe.Caffe.PReLUParameter.Builder.class); + } + + private int bitField0_; + public static final int FILLER_FIELD_NUMBER = 1; + private caffe.Caffe.FillerParameter filler_; + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+     * Initial value of a_i. Default is a_i=0.25 for all i.
+     * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + + public static final int CHANNEL_SHARED_FIELD_NUMBER = 2; + private boolean channelShared_; + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+     * Whether or not slope paramters are shared across channels.
+     * 
+ */ + public boolean hasChannelShared() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+     * Whether or not slope paramters are shared across channels.
+     * 
+ */ + public boolean getChannelShared() { + return channelShared_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getFiller()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, channelShared_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFiller()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, channelShared_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static caffe.Caffe.PReLUParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PReLUParameter 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.PReLUParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static caffe.Caffe.PReLUParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static caffe.Caffe.PReLUParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PReLUParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static caffe.Caffe.PReLUParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static caffe.Caffe.PReLUParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static caffe.Caffe.PReLUParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static caffe.Caffe.PReLUParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(caffe.Caffe.PReLUParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code caffe.PReLUParameter} + * + *
+     * Parametric ReLU described in K. He et al, Delving Deep into Rectifiers:
+     * Surpassing Human-Level Performance on ImageNet Classification, 2015.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:caffe.PReLUParameter) + caffe.Caffe.PReLUParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return caffe.Caffe.internal_static_caffe_PReLUParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return caffe.Caffe.internal_static_caffe_PReLUParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + caffe.Caffe.PReLUParameter.class, caffe.Caffe.PReLUParameter.Builder.class); + } + + // Construct using caffe.Caffe.PReLUParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFillerFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (fillerBuilder_ == null) { + filler_ = null; + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + channelShared_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return caffe.Caffe.internal_static_caffe_PReLUParameter_descriptor; + } + + public caffe.Caffe.PReLUParameter getDefaultInstanceForType() { + return caffe.Caffe.PReLUParameter.getDefaultInstance(); + } + + public caffe.Caffe.PReLUParameter build() { + caffe.Caffe.PReLUParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public caffe.Caffe.PReLUParameter buildPartial() { + caffe.Caffe.PReLUParameter result = new caffe.Caffe.PReLUParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (fillerBuilder_ == null) { + result.filler_ = filler_; + } else { + result.filler_ = fillerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.channelShared_ = channelShared_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof caffe.Caffe.PReLUParameter) { + return mergeFrom((caffe.Caffe.PReLUParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(caffe.Caffe.PReLUParameter other) { + if (other == caffe.Caffe.PReLUParameter.getDefaultInstance()) return this; + if (other.hasFiller()) { + mergeFiller(other.getFiller()); + } + if (other.hasChannelShared()) { + setChannelShared(other.getChannelShared()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + caffe.Caffe.PReLUParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (caffe.Caffe.PReLUParameter) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private caffe.Caffe.FillerParameter filler_ = null; + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> fillerBuilder_; + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public boolean hasFiller() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public caffe.Caffe.FillerParameter getFiller() { + if (fillerBuilder_ == null) { + return filler_ == null ? caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } else { + return fillerBuilder_.getMessage(); + } + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public Builder setFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filler_ = value; + onChanged(); + } else { + fillerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public Builder setFiller( + caffe.Caffe.FillerParameter.Builder builderForValue) { + if (fillerBuilder_ == null) { + filler_ = builderForValue.build(); + onChanged(); + } else { + fillerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public Builder mergeFiller(caffe.Caffe.FillerParameter value) { + if (fillerBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + filler_ != null && + filler_ != caffe.Caffe.FillerParameter.getDefaultInstance()) { + filler_ = + caffe.Caffe.FillerParameter.newBuilder(filler_).mergeFrom(value).buildPartial(); + } else { + filler_ = value; + } + onChanged(); + } else { + fillerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public Builder clearFiller() { + if (fillerBuilder_ == null) { + filler_ = null; + onChanged(); + } else { + fillerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public caffe.Caffe.FillerParameter.Builder getFillerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFillerFieldBuilder().getBuilder(); + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + public caffe.Caffe.FillerParameterOrBuilder getFillerOrBuilder() { + if (fillerBuilder_ != null) { + return fillerBuilder_.getMessageOrBuilder(); + } else { + return filler_ == null ? + caffe.Caffe.FillerParameter.getDefaultInstance() : filler_; + } + } + /** + * optional .caffe.FillerParameter filler = 1; + * + *
+       * Initial value of a_i. Default is a_i=0.25 for all i.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder> + getFillerFieldBuilder() { + if (fillerBuilder_ == null) { + fillerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + caffe.Caffe.FillerParameter, caffe.Caffe.FillerParameter.Builder, caffe.Caffe.FillerParameterOrBuilder>( + getFiller(), + getParentForChildren(), + isClean()); + filler_ = null; + } + return fillerBuilder_; + } + + private boolean channelShared_ ; + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+       * Whether or not slope paramters are shared across channels.
+       * 
+ */ + public boolean hasChannelShared() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+       * Whether or not slope paramters are shared across channels.
+       * 
+ */ + public boolean getChannelShared() { + return channelShared_; + } + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+       * Whether or not slope paramters are shared across channels.
+       * 
+ */ + public Builder setChannelShared(boolean value) { + bitField0_ |= 0x00000002; + channelShared_ = value; + onChanged(); + return this; + } + /** + * optional bool channel_shared = 2 [default = false]; + * + *
+       * Whether or not slope paramters are shared across channels.
+       * 
+ */ + public Builder clearChannelShared() { + bitField0_ = (bitField0_ & ~0x00000002); + channelShared_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:caffe.PReLUParameter) + } + + // @@protoc_insertion_point(class_scope:caffe.PReLUParameter) + private static final caffe.Caffe.PReLUParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new caffe.Caffe.PReLUParameter(); + } + + public static caffe.Caffe.PReLUParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PReLUParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PReLUParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public caffe.Caffe.PReLUParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_BlobShape_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_BlobShape_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_BlobProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_BlobProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_BlobProtoVector_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_BlobProtoVector_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_Datum_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_Datum_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_FillerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_FillerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_NetParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_NetParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SolverParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SolverParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SolverState_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SolverState_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_NetState_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_NetState_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_NetStateRule_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_NetStateRule_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ParamSpec_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ParamSpec_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_LayerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_LayerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_TransformationParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_TransformationParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_LossParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_LossParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_AccuracyParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_AccuracyParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ArgMaxParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ArgMaxParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ConcatParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ConcatParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_BatchNormParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_BatchNormParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_BiasParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_BiasParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ContrastiveLossParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ConvolutionParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ConvolutionParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_CropParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_CropParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_DataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_DataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_DropoutParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_DropoutParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_DummyDataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_DummyDataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_EltwiseParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_EltwiseParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ELUParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ELUParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_EmbedParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_EmbedParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ExpParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ExpParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_FlattenParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_FlattenParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_HDF5DataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_HDF5DataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_HDF5OutputParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_HDF5OutputParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_HingeLossParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_HingeLossParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ImageDataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ImageDataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_InfogainLossParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_InfogainLossParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_InnerProductParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_InnerProductParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_InputParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_InputParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_LogParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_LogParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_LRNParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_LRNParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_MemoryDataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_MemoryDataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_MVNParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_MVNParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_PoolingParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_PoolingParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_PowerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_PowerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_PythonParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_PythonParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ReductionParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ReductionParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ReLUParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ReLUParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ReshapeParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ReshapeParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ScaleParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ScaleParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SigmoidParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SigmoidParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SliceParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SliceParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SoftmaxParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SoftmaxParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_TanHParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_TanHParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_TileParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_TileParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_ThresholdParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_ThresholdParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_WindowDataParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_WindowDataParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_SPPParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_SPPParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_V1LayerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_V1LayerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_V0LayerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_V0LayerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_caffe_PReLUParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_caffe_PReLUParameter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\013caffe.proto\022\005caffe\"\034\n\tBlobShape\022\017\n\003dim" + + "\030\001 \003(\003B\002\020\001\"\314\001\n\tBlobProto\022\037\n\005shape\030\007 \001(\0132" + + "\020.caffe.BlobShape\022\020\n\004data\030\005 \003(\002B\002\020\001\022\020\n\004d" + + "iff\030\006 \003(\002B\002\020\001\022\027\n\013double_data\030\010 \003(\001B\002\020\001\022\027" + + "\n\013double_diff\030\t \003(\001B\002\020\001\022\016\n\003num\030\001 \001(\005:\0010\022" + + "\023\n\010channels\030\002 \001(\005:\0010\022\021\n\006height\030\003 \001(\005:\0010\022" + + "\020\n\005width\030\004 \001(\005:\0010\"2\n\017BlobProtoVector\022\037\n\005" + + "blobs\030\001 \003(\0132\020.caffe.BlobProto\"\201\001\n\005Datum\022" + + "\020\n\010channels\030\001 \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005wid" + + "th\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\022\r\n\005label\030\005 \001(\005\022\022\n", + "\nfloat_data\030\006 \003(\002\022\026\n\007encoded\030\007 \001(\010:\005fals" + + "e\"\212\002\n\017FillerParameter\022\026\n\004type\030\001 \001(\t:\010con" + + "stant\022\020\n\005value\030\002 \001(\002:\0010\022\016\n\003min\030\003 \001(\002:\0010\022" + + "\016\n\003max\030\004 \001(\002:\0011\022\017\n\004mean\030\005 \001(\002:\0010\022\016\n\003std\030" + + "\006 \001(\002:\0011\022\022\n\006sparse\030\007 \001(\005:\002-1\022B\n\rvariance" + + "_norm\030\010 \001(\0162#.caffe.FillerParameter.Vari" + + "anceNorm:\006FAN_IN\"4\n\014VarianceNorm\022\n\n\006FAN_" + + "IN\020\000\022\013\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002\"\216\002\n\014NetPa" + + "rameter\022\014\n\004name\030\001 \001(\t\022\r\n\005input\030\003 \003(\t\022%\n\013" + + "input_shape\030\010 \003(\0132\020.caffe.BlobShape\022\021\n\ti", + "nput_dim\030\004 \003(\005\022\035\n\016force_backward\030\005 \001(\010:\005" + + "false\022\036\n\005state\030\006 \001(\0132\017.caffe.NetState\022\031\n" + + "\ndebug_info\030\007 \001(\010:\005false\022$\n\005layer\030d \003(\0132" + + "\025.caffe.LayerParameter\022\'\n\006layers\030\002 \003(\0132\027" + + ".caffe.V1LayerParameter\"\234\n\n\017SolverParame" + + "ter\022\013\n\003net\030\030 \001(\t\022&\n\tnet_param\030\031 \001(\0132\023.ca" + + "ffe.NetParameter\022\021\n\ttrain_net\030\001 \001(\t\022\020\n\010t" + + "est_net\030\002 \003(\t\022,\n\017train_net_param\030\025 \001(\0132\023" + + ".caffe.NetParameter\022+\n\016test_net_param\030\026 " + + "\003(\0132\023.caffe.NetParameter\022$\n\013train_state\030", + "\032 \001(\0132\017.caffe.NetState\022#\n\ntest_state\030\033 \003" + + "(\0132\017.caffe.NetState\022\021\n\ttest_iter\030\003 \003(\005\022\030" + + "\n\rtest_interval\030\004 \001(\005:\0010\022 \n\021test_compute" + + "_loss\030\023 \001(\010:\005false\022!\n\023test_initializatio" + + "n\030 \001(\010:\004true\022\017\n\007base_lr\030\005 \001(\002\022\017\n\007displa" + + "y\030\006 \001(\005\022\027\n\014average_loss\030! \001(\005:\0011\022\020\n\010max_" + + "iter\030\007 \001(\005\022\024\n\titer_size\030$ \001(\005:\0011\022\021\n\tlr_p" + + "olicy\030\010 \001(\t\022\r\n\005gamma\030\t \001(\002\022\r\n\005power\030\n \001(" + + "\002\022\020\n\010momentum\030\013 \001(\002\022\024\n\014weight_decay\030\014 \001(" + + "\002\022\037\n\023regularization_type\030\035 \001(\t:\002L2\022\020\n\010st", + "epsize\030\r \001(\005\022\021\n\tstepvalue\030\" \003(\005\022\032\n\016clip_" + + "gradients\030# \001(\002:\002-1\022\023\n\010snapshot\030\016 \001(\005:\0010" + + "\022\027\n\017snapshot_prefix\030\017 \001(\t\022\034\n\rsnapshot_di" + + "ff\030\020 \001(\010:\005false\022K\n\017snapshot_format\030% \001(\016" + + "2%.caffe.SolverParameter.SnapshotFormat:" + + "\013BINARYPROTO\022;\n\013solver_mode\030\021 \001(\0162!.caff" + + "e.SolverParameter.SolverMode:\003GPU\022\024\n\tdev" + + "ice_id\030\022 \001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003:\002-1" + + "\022\021\n\004type\030( \001(\t:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e-0" + + "8\022\030\n\tmomentum2\030\' \001(\002:\0050.999\022\021\n\trms_decay", + "\030& \001(\002\022\031\n\ndebug_info\030\027 \001(\010:\005false\022\"\n\024sna" + + "pshot_after_train\030\034 \001(\010:\004true\022;\n\013solver_" + + "type\030\036 \001(\0162!.caffe.SolverParameter.Solve" + + "rType:\003SGD\"+\n\016SnapshotFormat\022\010\n\004HDF5\020\000\022\017" + + "\n\013BINARYPROTO\020\001\"\036\n\nSolverMode\022\007\n\003CPU\020\000\022\007" + + "\n\003GPU\020\001\"U\n\nSolverType\022\007\n\003SGD\020\000\022\014\n\010NESTER" + + "OV\020\001\022\013\n\007ADAGRAD\020\002\022\013\n\007RMSPROP\020\003\022\014\n\010ADADEL" + + "TA\020\004\022\010\n\004ADAM\020\005\"l\n\013SolverState\022\014\n\004iter\030\001 " + + "\001(\005\022\023\n\013learned_net\030\002 \001(\t\022!\n\007history\030\003 \003(" + + "\0132\020.caffe.BlobProto\022\027\n\014current_step\030\004 \001(", + "\005:\0010\"N\n\010NetState\022!\n\005phase\030\001 \001(\0162\014.caffe." + + "Phase:\004TEST\022\020\n\005level\030\002 \001(\005:\0010\022\r\n\005stage\030\003" + + " \003(\t\"s\n\014NetStateRule\022\033\n\005phase\030\001 \001(\0162\014.ca" + + "ffe.Phase\022\021\n\tmin_level\030\002 \001(\005\022\021\n\tmax_leve" + + "l\030\003 \001(\005\022\r\n\005stage\030\004 \003(\t\022\021\n\tnot_stage\030\005 \003(" + + "\t\"\243\001\n\tParamSpec\022\014\n\004name\030\001 \001(\t\0221\n\nshare_m" + + "ode\030\002 \001(\0162\035.caffe.ParamSpec.DimCheckMode" + + "\022\022\n\007lr_mult\030\003 \001(\002:\0011\022\025\n\ndecay_mult\030\004 \001(\002" + + ":\0011\"*\n\014DimCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMI" + + "SSIVE\020\001\"\230\023\n\016LayerParameter\022\014\n\004name\030\001 \001(\t", + "\022\014\n\004type\030\002 \001(\t\022\016\n\006bottom\030\003 \003(\t\022\013\n\003top\030\004 " + + "\003(\t\022\033\n\005phase\030\n \001(\0162\014.caffe.Phase\022\023\n\013loss" + + "_weight\030\005 \003(\002\022\037\n\005param\030\006 \003(\0132\020.caffe.Par" + + "amSpec\022\037\n\005blobs\030\007 \003(\0132\020.caffe.BlobProto\022" + + "\026\n\016propagate_down\030\013 \003(\010\022$\n\007include\030\010 \003(\013" + + "2\023.caffe.NetStateRule\022$\n\007exclude\030\t \003(\0132\023" + + ".caffe.NetStateRule\0227\n\017transform_param\030d" + + " \001(\0132\036.caffe.TransformationParameter\022(\n\n" + + "loss_param\030e \001(\0132\024.caffe.LossParameter\0220" + + "\n\016accuracy_param\030f \001(\0132\030.caffe.AccuracyP", + "arameter\022,\n\014argmax_param\030g \001(\0132\026.caffe.A" + + "rgMaxParameter\0224\n\020batch_norm_param\030\213\001 \001(" + + "\0132\031.caffe.BatchNormParameter\022)\n\nbias_par" + + "am\030\215\001 \001(\0132\024.caffe.BiasParameter\022,\n\014conca" + + "t_param\030h \001(\0132\026.caffe.ConcatParameter\022?\n" + + "\026contrastive_loss_param\030i \001(\0132\037.caffe.Co" + + "ntrastiveLossParameter\0226\n\021convolution_pa" + + "ram\030j \001(\0132\033.caffe.ConvolutionParameter\022)" + + "\n\ncrop_param\030\220\001 \001(\0132\024.caffe.CropParamete" + + "r\022(\n\ndata_param\030k \001(\0132\024.caffe.DataParame", + "ter\022.\n\rdropout_param\030l \001(\0132\027.caffe.Dropo" + + "utParameter\0223\n\020dummy_data_param\030m \001(\0132\031." + + "caffe.DummyDataParameter\022.\n\reltwise_para" + + "m\030n \001(\0132\027.caffe.EltwiseParameter\022\'\n\telu_" + + "param\030\214\001 \001(\0132\023.caffe.ELUParameter\022+\n\013emb" + + "ed_param\030\211\001 \001(\0132\025.caffe.EmbedParameter\022&" + + "\n\texp_param\030o \001(\0132\023.caffe.ExpParameter\022/" + + "\n\rflatten_param\030\207\001 \001(\0132\027.caffe.FlattenPa" + + "rameter\0221\n\017hdf5_data_param\030p \001(\0132\030.caffe" + + ".HDF5DataParameter\0225\n\021hdf5_output_param\030", + "q \001(\0132\032.caffe.HDF5OutputParameter\0223\n\020hin" + + "ge_loss_param\030r \001(\0132\031.caffe.HingeLossPar" + + "ameter\0223\n\020image_data_param\030s \001(\0132\031.caffe" + + ".ImageDataParameter\0229\n\023infogain_loss_par" + + "am\030t \001(\0132\034.caffe.InfogainLossParameter\0229" + + "\n\023inner_product_param\030u \001(\0132\034.caffe.Inne" + + "rProductParameter\022+\n\013input_param\030\217\001 \001(\0132" + + "\025.caffe.InputParameter\022\'\n\tlog_param\030\206\001 \001" + + "(\0132\023.caffe.LogParameter\022&\n\tlrn_param\030v \001" + + "(\0132\023.caffe.LRNParameter\0225\n\021memory_data_p", + "aram\030w \001(\0132\032.caffe.MemoryDataParameter\022&" + + "\n\tmvn_param\030x \001(\0132\023.caffe.MVNParameter\022." + + "\n\rpooling_param\030y \001(\0132\027.caffe.PoolingPar" + + "ameter\022*\n\013power_param\030z \001(\0132\025.caffe.Powe" + + "rParameter\022+\n\013prelu_param\030\203\001 \001(\0132\025.caffe" + + ".PReLUParameter\022-\n\014python_param\030\202\001 \001(\0132\026" + + ".caffe.PythonParameter\0223\n\017reduction_para" + + "m\030\210\001 \001(\0132\031.caffe.ReductionParameter\022(\n\nr" + + "elu_param\030{ \001(\0132\024.caffe.ReLUParameter\022/\n" + + "\rreshape_param\030\205\001 \001(\0132\027.caffe.ReshapePar", + "ameter\022+\n\013scale_param\030\216\001 \001(\0132\025.caffe.Sca" + + "leParameter\022.\n\rsigmoid_param\030| \001(\0132\027.caf" + + "fe.SigmoidParameter\022.\n\rsoftmax_param\030} \001" + + "(\0132\027.caffe.SoftmaxParameter\022\'\n\tspp_param" + + "\030\204\001 \001(\0132\023.caffe.SPPParameter\022*\n\013slice_pa" + + "ram\030~ \001(\0132\025.caffe.SliceParameter\022(\n\ntanh" + + "_param\030\177 \001(\0132\024.caffe.TanHParameter\0223\n\017th" + + "reshold_param\030\200\001 \001(\0132\031.caffe.ThresholdPa" + + "rameter\022)\n\ntile_param\030\212\001 \001(\0132\024.caffe.Til" + + "eParameter\0226\n\021window_data_param\030\201\001 \001(\0132\032", + ".caffe.WindowDataParameter\"\266\001\n\027Transform" + + "ationParameter\022\020\n\005scale\030\001 \001(\002:\0011\022\025\n\006mirr" + + "or\030\002 \001(\010:\005false\022\024\n\tcrop_size\030\003 \001(\r:\0010\022\021\n" + + "\tmean_file\030\004 \001(\t\022\022\n\nmean_value\030\005 \003(\002\022\032\n\013" + + "force_color\030\006 \001(\010:\005false\022\031\n\nforce_gray\030\007" + + " \001(\010:\005false\"\302\001\n\rLossParameter\022\024\n\014ignore_" + + "label\030\001 \001(\005\022D\n\rnormalization\030\003 \001(\0162&.caf" + + "fe.LossParameter.NormalizationMode:\005VALI" + + "D\022\021\n\tnormalize\030\002 \001(\010\"B\n\021NormalizationMod" + + "e\022\010\n\004FULL\020\000\022\t\n\005VALID\020\001\022\016\n\nBATCH_SIZE\020\002\022\010", + "\n\004NONE\020\003\"L\n\021AccuracyParameter\022\020\n\005top_k\030\001" + + " \001(\r:\0011\022\017\n\004axis\030\002 \001(\005:\0011\022\024\n\014ignore_label" + + "\030\003 \001(\005\"M\n\017ArgMaxParameter\022\032\n\013out_max_val" + + "\030\001 \001(\010:\005false\022\020\n\005top_k\030\002 \001(\r:\0011\022\014\n\004axis\030" + + "\003 \001(\005\"9\n\017ConcatParameter\022\017\n\004axis\030\002 \001(\005:\001" + + "1\022\025\n\nconcat_dim\030\001 \001(\r:\0011\"j\n\022BatchNormPar" + + "ameter\022\030\n\020use_global_stats\030\001 \001(\010\022&\n\027movi" + + "ng_average_fraction\030\002 \001(\002:\0050.999\022\022\n\003eps\030" + + "\003 \001(\002:\0051e-05\"]\n\rBiasParameter\022\017\n\004axis\030\001 " + + "\001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005:\0011\022&\n\006filler\030\003 ", + "\001(\0132\026.caffe.FillerParameter\"L\n\030Contrasti" + + "veLossParameter\022\021\n\006margin\030\001 \001(\002:\0011\022\035\n\016le" + + "gacy_version\030\002 \001(\010:\005false\"\374\003\n\024Convolutio" + + "nParameter\022\022\n\nnum_output\030\001 \001(\r\022\027\n\tbias_t" + + "erm\030\002 \001(\010:\004true\022\013\n\003pad\030\003 \003(\r\022\023\n\013kernel_s" + + "ize\030\004 \003(\r\022\016\n\006stride\030\006 \003(\r\022\020\n\010dilation\030\022 " + + "\003(\r\022\020\n\005pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022" + + "\020\n\010kernel_h\030\013 \001(\r\022\020\n\010kernel_w\030\014 \001(\r\022\020\n\010s" + + "tride_h\030\r \001(\r\022\020\n\010stride_w\030\016 \001(\r\022\020\n\005group" + + "\030\005 \001(\r:\0011\022-\n\rweight_filler\030\007 \001(\0132\026.caffe", + ".FillerParameter\022+\n\013bias_filler\030\010 \001(\0132\026." + + "caffe.FillerParameter\022;\n\006engine\030\017 \001(\0162\"." + + "caffe.ConvolutionParameter.Engine:\007DEFAU" + + "LT\022\017\n\004axis\030\020 \001(\005:\0011\022\036\n\017force_nd_im2col\030\021" + + " \001(\010:\005false\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CA" + + "FFE\020\001\022\t\n\005CUDNN\020\002\"0\n\rCropParameter\022\017\n\004axi" + + "s\030\001 \001(\005:\0012\022\016\n\006offset\030\002 \003(\r\"\244\002\n\rDataParam" + + "eter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_size\030\004 \001(\r" + + "\022\024\n\trand_skip\030\007 \001(\r:\0010\0221\n\007backend\030\010 \001(\0162" + + "\027.caffe.DataParameter.DB:\007LEVELDB\022\020\n\005sca", + "le\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\024\n\tcrop_s" + + "ize\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\"\n\023f" + + "orce_encoded_color\030\t \001(\010:\005false\022\023\n\010prefe" + + "tch\030\n \001(\r:\0014\"\033\n\002DB\022\013\n\007LEVELDB\020\000\022\010\n\004LMDB\020" + + "\001\".\n\020DropoutParameter\022\032\n\rdropout_ratio\030\001" + + " \001(\002:\0030.5\"\240\001\n\022DummyDataParameter\022+\n\013data" + + "_filler\030\001 \003(\0132\026.caffe.FillerParameter\022\037\n" + + "\005shape\030\006 \003(\0132\020.caffe.BlobShape\022\013\n\003num\030\002 " + + "\003(\r\022\020\n\010channels\030\003 \003(\r\022\016\n\006height\030\004 \003(\r\022\r\n" + + "\005width\030\005 \003(\r\"\245\001\n\020EltwiseParameter\0229\n\tope", + "ration\030\001 \001(\0162!.caffe.EltwiseParameter.El" + + "twiseOp:\003SUM\022\r\n\005coeff\030\002 \003(\002\022\036\n\020stable_pr" + + "od_grad\030\003 \001(\010:\004true\"\'\n\tEltwiseOp\022\010\n\004PROD" + + "\020\000\022\007\n\003SUM\020\001\022\007\n\003MAX\020\002\" \n\014ELUParameter\022\020\n\005" + + "alpha\030\001 \001(\002:\0011\"\254\001\n\016EmbedParameter\022\022\n\nnum" + + "_output\030\001 \001(\r\022\021\n\tinput_dim\030\002 \001(\r\022\027\n\tbias" + + "_term\030\003 \001(\010:\004true\022-\n\rweight_filler\030\004 \001(\013" + + "2\026.caffe.FillerParameter\022+\n\013bias_filler\030" + + "\005 \001(\0132\026.caffe.FillerParameter\"D\n\014ExpPara" + + "meter\022\020\n\004base\030\001 \001(\002:\002-1\022\020\n\005scale\030\002 \001(\002:\001", + "1\022\020\n\005shift\030\003 \001(\002:\0010\"9\n\020FlattenParameter\022" + + "\017\n\004axis\030\001 \001(\005:\0011\022\024\n\010end_axis\030\002 \001(\005:\002-1\"O" + + "\n\021HDF5DataParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nb" + + "atch_size\030\002 \001(\r\022\026\n\007shuffle\030\003 \001(\010:\005false\"" + + "(\n\023HDF5OutputParameter\022\021\n\tfile_name\030\001 \001(" + + "\t\"^\n\022HingeLossParameter\0220\n\004norm\030\001 \001(\0162\036." + + "caffe.HingeLossParameter.Norm:\002L1\"\026\n\004Nor" + + "m\022\006\n\002L1\020\001\022\006\n\002L2\020\002\"\227\002\n\022ImageDataParameter" + + "\022\016\n\006source\030\001 \001(\t\022\025\n\nbatch_size\030\004 \001(\r:\0011\022" + + "\024\n\trand_skip\030\007 \001(\r:\0010\022\026\n\007shuffle\030\010 \001(\010:\005", + "false\022\025\n\nnew_height\030\t \001(\r:\0010\022\024\n\tnew_widt" + + "h\030\n \001(\r:\0010\022\026\n\010is_color\030\013 \001(\010:\004true\022\020\n\005sc" + + "ale\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\024\n\tcrop_" + + "size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\025\n\013" + + "root_folder\030\014 \001(\t:\000\"\'\n\025InfogainLossParam" + + "eter\022\016\n\006source\030\001 \001(\t\"\313\001\n\025InnerProductPar" + + "ameter\022\022\n\nnum_output\030\001 \001(\r\022\027\n\tbias_term\030" + + "\002 \001(\010:\004true\022-\n\rweight_filler\030\003 \001(\0132\026.caf" + + "fe.FillerParameter\022+\n\013bias_filler\030\004 \001(\0132" + + "\026.caffe.FillerParameter\022\017\n\004axis\030\005 \001(\005:\0011", + "\022\030\n\ttranspose\030\006 \001(\010:\005false\"1\n\016InputParam" + + "eter\022\037\n\005shape\030\001 \003(\0132\020.caffe.BlobShape\"D\n" + + "\014LogParameter\022\020\n\004base\030\001 \001(\002:\002-1\022\020\n\005scale" + + "\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"\270\002\n\014LRNParam" + + "eter\022\025\n\nlocal_size\030\001 \001(\r:\0015\022\020\n\005alpha\030\002 \001" + + "(\002:\0011\022\022\n\004beta\030\003 \001(\002:\0040.75\022D\n\013norm_region" + + "\030\004 \001(\0162\036.caffe.LRNParameter.NormRegion:\017" + + "ACROSS_CHANNELS\022\014\n\001k\030\005 \001(\002:\0011\0223\n\006engine\030" + + "\006 \001(\0162\032.caffe.LRNParameter.Engine:\007DEFAU" + + "LT\"5\n\nNormRegion\022\023\n\017ACROSS_CHANNELS\020\000\022\022\n", + "\016WITHIN_CHANNEL\020\001\"+\n\006Engine\022\013\n\007DEFAULT\020\000" + + "\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"Z\n\023MemoryDataPara" + + "meter\022\022\n\nbatch_size\030\001 \001(\r\022\020\n\010channels\030\002 " + + "\001(\r\022\016\n\006height\030\003 \001(\r\022\r\n\005width\030\004 \001(\r\"d\n\014MV" + + "NParameter\022 \n\022normalize_variance\030\001 \001(\010:\004" + + "true\022\036\n\017across_channels\030\002 \001(\010:\005false\022\022\n\003" + + "eps\030\003 \001(\002:\0051e-09\"\242\003\n\020PoolingParameter\0225\n" + + "\004pool\030\001 \001(\0162\".caffe.PoolingParameter.Poo" + + "lMethod:\003MAX\022\016\n\003pad\030\004 \001(\r:\0010\022\020\n\005pad_h\030\t " + + "\001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\023\n\013kernel_size\030", + "\002 \001(\r\022\020\n\010kernel_h\030\005 \001(\r\022\020\n\010kernel_w\030\006 \001(" + + "\r\022\021\n\006stride\030\003 \001(\r:\0011\022\020\n\010stride_h\030\007 \001(\r\022\020" + + "\n\010stride_w\030\010 \001(\r\0227\n\006engine\030\013 \001(\0162\036.caffe" + + ".PoolingParameter.Engine:\007DEFAULT\022\035\n\016glo" + + "bal_pooling\030\014 \001(\010:\005false\".\n\nPoolMethod\022\007" + + "\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engi" + + "ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"F\n" + + "\016PowerParameter\022\020\n\005power\030\001 \001(\002:\0011\022\020\n\005sca" + + "le\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"g\n\017PythonP" + + "arameter\022\016\n\006module\030\001 \001(\t\022\r\n\005layer\030\002 \001(\t\022", + "\023\n\tparam_str\030\003 \001(\t:\000\022 \n\021share_in_paralle" + + "l\030\004 \001(\010:\005false\"\255\001\n\022ReductionParameter\022=\n" + + "\toperation\030\001 \001(\0162%.caffe.ReductionParame" + + "ter.ReductionOp:\003SUM\022\017\n\004axis\030\002 \001(\005:\0010\022\020\n" + + "\005coeff\030\003 \001(\002:\0011\"5\n\013ReductionOp\022\007\n\003SUM\020\001\022" + + "\010\n\004ASUM\020\002\022\t\n\005SUMSQ\020\003\022\010\n\004MEAN\020\004\"\215\001\n\rReLUP" + + "arameter\022\031\n\016negative_slope\030\001 \001(\002:\0010\0224\n\006e" + + "ngine\030\002 \001(\0162\033.caffe.ReLUParameter.Engine" + + ":\007DEFAULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFF" + + "E\020\001\022\t\n\005CUDNN\020\002\"Z\n\020ReshapeParameter\022\037\n\005sh", + "ape\030\001 \001(\0132\020.caffe.BlobShape\022\017\n\004axis\030\002 \001(" + + "\005:\0010\022\024\n\010num_axes\030\003 \001(\005:\002-1\"\245\001\n\016ScalePara" + + "meter\022\017\n\004axis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005" + + ":\0011\022&\n\006filler\030\003 \001(\0132\026.caffe.FillerParame" + + "ter\022\030\n\tbias_term\030\004 \001(\010:\005false\022+\n\013bias_fi" + + "ller\030\005 \001(\0132\026.caffe.FillerParameter\"x\n\020Si" + + "gmoidParameter\0227\n\006engine\030\001 \001(\0162\036.caffe.S" + + "igmoidParameter.Engine:\007DEFAULT\"+\n\006Engin" + + "e\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"L\n\016" + + "SliceParameter\022\017\n\004axis\030\003 \001(\005:\0011\022\023\n\013slice", + "_point\030\002 \003(\r\022\024\n\tslice_dim\030\001 \001(\r:\0011\"\211\001\n\020S" + + "oftmaxParameter\0227\n\006engine\030\001 \001(\0162\036.caffe." + + "SoftmaxParameter.Engine:\007DEFAULT\022\017\n\004axis" + + "\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFF" + + "E\020\001\022\t\n\005CUDNN\020\002\"r\n\rTanHParameter\0224\n\006engin" + + "e\030\001 \001(\0162\033.caffe.TanHParameter.Engine:\007DE" + + "FAULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022" + + "\t\n\005CUDNN\020\002\"/\n\rTileParameter\022\017\n\004axis\030\001 \001(" + + "\005:\0011\022\r\n\005tiles\030\002 \001(\005\"*\n\022ThresholdParamete" + + "r\022\024\n\tthreshold\030\001 \001(\002:\0010\"\301\002\n\023WindowDataPa", + "rameter\022\016\n\006source\030\001 \001(\t\022\020\n\005scale\030\002 \001(\002:\001" + + "1\022\021\n\tmean_file\030\003 \001(\t\022\022\n\nbatch_size\030\004 \001(\r" + + "\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005" + + "false\022\031\n\014fg_threshold\030\007 \001(\002:\0030.5\022\031\n\014bg_t" + + "hreshold\030\010 \001(\002:\0030.5\022\031\n\013fg_fraction\030\t \001(\002" + + ":\0040.25\022\026\n\013context_pad\030\n \001(\r:\0010\022\027\n\tcrop_m" + + "ode\030\013 \001(\t:\004warp\022\033\n\014cache_images\030\014 \001(\010:\005f" + + "alse\022\025\n\013root_folder\030\r \001(\t:\000\"\353\001\n\014SPPParam" + + "eter\022\026\n\016pyramid_height\030\001 \001(\r\0221\n\004pool\030\002 \001" + + "(\0162\036.caffe.SPPParameter.PoolMethod:\003MAX\022", + "3\n\006engine\030\006 \001(\0162\032.caffe.SPPParameter.Eng" + + "ine:\007DEFAULT\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003A" + + "VE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022\013\n\007DEFAUL" + + "T\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\340\023\n\020V1LayerPar" + + "ameter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003 \003(\t\022\014\n\004n" + + "ame\030\004 \001(\t\022$\n\007include\030 \003(\0132\023.caffe.NetSt" + + "ateRule\022$\n\007exclude\030! \003(\0132\023.caffe.NetStat" + + "eRule\022/\n\004type\030\005 \001(\0162!.caffe.V1LayerParam" + + "eter.LayerType\022\037\n\005blobs\030\006 \003(\0132\020.caffe.Bl" + + "obProto\022\016\n\005param\030\351\007 \003(\t\022>\n\017blob_share_mo", + "de\030\352\007 \003(\0162$.caffe.V1LayerParameter.DimCh" + + "eckMode\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014weight_deca" + + "y\030\010 \003(\002\022\023\n\013loss_weight\030# \003(\002\0220\n\016accuracy" + + "_param\030\033 \001(\0132\030.caffe.AccuracyParameter\022," + + "\n\014argmax_param\030\027 \001(\0132\026.caffe.ArgMaxParam" + + "eter\022,\n\014concat_param\030\t \001(\0132\026.caffe.Conca" + + "tParameter\022?\n\026contrastive_loss_param\030( \001" + + "(\0132\037.caffe.ContrastiveLossParameter\0226\n\021c" + + "onvolution_param\030\n \001(\0132\033.caffe.Convoluti" + + "onParameter\022(\n\ndata_param\030\013 \001(\0132\024.caffe.", + "DataParameter\022.\n\rdropout_param\030\014 \001(\0132\027.c" + + "affe.DropoutParameter\0223\n\020dummy_data_para" + + "m\030\032 \001(\0132\031.caffe.DummyDataParameter\022.\n\rel" + + "twise_param\030\030 \001(\0132\027.caffe.EltwiseParamet" + + "er\022&\n\texp_param\030) \001(\0132\023.caffe.ExpParamet" + + "er\0221\n\017hdf5_data_param\030\r \001(\0132\030.caffe.HDF5" + + "DataParameter\0225\n\021hdf5_output_param\030\016 \001(\013" + + "2\032.caffe.HDF5OutputParameter\0223\n\020hinge_lo" + + "ss_param\030\035 \001(\0132\031.caffe.HingeLossParamete" + + "r\0223\n\020image_data_param\030\017 \001(\0132\031.caffe.Imag", + "eDataParameter\0229\n\023infogain_loss_param\030\020 " + + "\001(\0132\034.caffe.InfogainLossParameter\0229\n\023inn" + + "er_product_param\030\021 \001(\0132\034.caffe.InnerProd" + + "uctParameter\022&\n\tlrn_param\030\022 \001(\0132\023.caffe." + + "LRNParameter\0225\n\021memory_data_param\030\026 \001(\0132" + + "\032.caffe.MemoryDataParameter\022&\n\tmvn_param" + + "\030\" \001(\0132\023.caffe.MVNParameter\022.\n\rpooling_p" + + "aram\030\023 \001(\0132\027.caffe.PoolingParameter\022*\n\013p" + + "ower_param\030\025 \001(\0132\025.caffe.PowerParameter\022" + + "(\n\nrelu_param\030\036 \001(\0132\024.caffe.ReLUParamete", + "r\022.\n\rsigmoid_param\030& \001(\0132\027.caffe.Sigmoid" + + "Parameter\022.\n\rsoftmax_param\030\' \001(\0132\027.caffe" + + ".SoftmaxParameter\022*\n\013slice_param\030\037 \001(\0132\025" + + ".caffe.SliceParameter\022(\n\ntanh_param\030% \001(" + + "\0132\024.caffe.TanHParameter\0222\n\017threshold_par" + + "am\030\031 \001(\0132\031.caffe.ThresholdParameter\0225\n\021w" + + "indow_data_param\030\024 \001(\0132\032.caffe.WindowDat" + + "aParameter\0227\n\017transform_param\030$ \001(\0132\036.ca" + + "ffe.TransformationParameter\022(\n\nloss_para" + + "m\030* \001(\0132\024.caffe.LossParameter\022&\n\005layer\030\001", + " \001(\0132\027.caffe.V0LayerParameter\"\330\004\n\tLayerT" + + "ype\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010ACCURACY\020\001\022" + + "\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONCAT\020\003\022\024\n\020CON" + + "TRASTIVE_LOSS\020%\022\017\n\013CONVOLUTION\020\004\022\010\n\004DATA" + + "\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROPOUT\020\006\022\016\n\nDU" + + "MMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020\007\022\013\n\007ELTWIS" + + "E\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\tHDF5_DATA\020\t" + + "\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LOSS\020\034\022\n\n\006IM2" + + "COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFOGAIN_LOSS\020\r" + + "\022\021\n\rINNER_PRODUCT\020\016\022\007\n\003LRN\020\017\022\017\n\013MEMORY_D", + "ATA\020\035\022\035\n\031MULTINOMIAL_LOGISTIC_LOSS\020\020\022\007\n\003" + + "MVN\020\"\022\013\n\007POOLING\020\021\022\t\n\005POWER\020\032\022\010\n\004RELU\020\022\022" + + "\013\n\007SIGMOID\020\023\022\036\n\032SIGMOID_CROSS_ENTROPY_LO" + + "SS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020\024\022\020\n\014SOFTMA" + + "X_LOSS\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020!\022\010\n\004TANH\020\027" + + "\022\017\n\013WINDOW_DATA\020\030\022\r\n\tTHRESHOLD\020\037\"*\n\014DimC" + + "heckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\"\375\007\n" + + "\020V0LayerParameter\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030" + + "\002 \001(\t\022\022\n\nnum_output\030\003 \001(\r\022\026\n\010biasterm\030\004 " + + "\001(\010:\004true\022-\n\rweight_filler\030\005 \001(\0132\026.caffe", + ".FillerParameter\022+\n\013bias_filler\030\006 \001(\0132\026." + + "caffe.FillerParameter\022\016\n\003pad\030\007 \001(\r:\0010\022\022\n" + + "\nkernelsize\030\010 \001(\r\022\020\n\005group\030\t \001(\r:\0011\022\021\n\006s" + + "tride\030\n \001(\r:\0011\0225\n\004pool\030\013 \001(\0162\".caffe.V0L" + + "ayerParameter.PoolMethod:\003MAX\022\032\n\rdropout" + + "_ratio\030\014 \001(\002:\0030.5\022\025\n\nlocal_size\030\r \001(\r:\0015" + + "\022\020\n\005alpha\030\016 \001(\002:\0011\022\022\n\004beta\030\017 \001(\002:\0040.75\022\014" + + "\n\001k\030\026 \001(\002:\0011\022\016\n\006source\030\020 \001(\t\022\020\n\005scale\030\021 " + + "\001(\002:\0011\022\020\n\010meanfile\030\022 \001(\t\022\021\n\tbatchsize\030\023 " + + "\001(\r\022\023\n\010cropsize\030\024 \001(\r:\0010\022\025\n\006mirror\030\025 \001(\010", + ":\005false\022\037\n\005blobs\0302 \003(\0132\020.caffe.BlobProto" + + "\022\020\n\010blobs_lr\0303 \003(\002\022\024\n\014weight_decay\0304 \003(\002" + + "\022\024\n\trand_skip\0305 \001(\r:\0010\022\035\n\020det_fg_thresho" + + "ld\0306 \001(\002:\0030.5\022\035\n\020det_bg_threshold\0307 \001(\002:" + + "\0030.5\022\035\n\017det_fg_fraction\0308 \001(\002:\0040.25\022\032\n\017d" + + "et_context_pad\030: \001(\r:\0010\022\033\n\rdet_crop_mode" + + "\030; \001(\t:\004warp\022\022\n\007new_num\030< \001(\005:\0010\022\027\n\014new_" + + "channels\030= \001(\005:\0010\022\025\n\nnew_height\030> \001(\005:\0010" + + "\022\024\n\tnew_width\030? \001(\005:\0010\022\035\n\016shuffle_images" + + "\030@ \001(\010:\005false\022\025\n\nconcat_dim\030A \001(\r:\0011\0226\n\021", + "hdf5_output_param\030\351\007 \001(\0132\032.caffe.HDF5Out" + + "putParameter\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003A" + + "VE\020\001\022\016\n\nSTOCHASTIC\020\002\"W\n\016PReLUParameter\022&" + + "\n\006filler\030\001 \001(\0132\026.caffe.FillerParameter\022\035" + + "\n\016channel_shared\030\002 \001(\010:\005false*\034\n\005Phase\022\t" + + "\n\005TRAIN\020\000\022\010\n\004TEST\020\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_caffe_BlobShape_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_caffe_BlobShape_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_BlobShape_descriptor, + new java.lang.String[] { "Dim", }); + internal_static_caffe_BlobProto_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_caffe_BlobProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_BlobProto_descriptor, + new java.lang.String[] { "Shape", "Data", "Diff", "DoubleData", "DoubleDiff", "Num", "Channels", "Height", "Width", }); + internal_static_caffe_BlobProtoVector_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_caffe_BlobProtoVector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_BlobProtoVector_descriptor, + new java.lang.String[] { "Blobs", }); + internal_static_caffe_Datum_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_caffe_Datum_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_Datum_descriptor, + new java.lang.String[] { "Channels", "Height", "Width", "Data", "Label", "FloatData", "Encoded", }); + internal_static_caffe_FillerParameter_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_caffe_FillerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_FillerParameter_descriptor, + new java.lang.String[] { "Type", "Value", "Min", "Max", "Mean", "Std", "Sparse", "VarianceNorm", }); + internal_static_caffe_NetParameter_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_caffe_NetParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_NetParameter_descriptor, + new java.lang.String[] { "Name", "Input", "InputShape", "InputDim", "ForceBackward", "State", "DebugInfo", "Layer", "Layers", }); + internal_static_caffe_SolverParameter_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_caffe_SolverParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SolverParameter_descriptor, + new java.lang.String[] { "Net", "NetParam", "TrainNet", "TestNet", "TrainNetParam", "TestNetParam", "TrainState", "TestState", "TestIter", "TestInterval", "TestComputeLoss", "TestInitialization", "BaseLr", "Display", "AverageLoss", "MaxIter", "IterSize", "LrPolicy", "Gamma", "Power", "Momentum", "WeightDecay", "RegularizationType", "Stepsize", "Stepvalue", "ClipGradients", "Snapshot", "SnapshotPrefix", "SnapshotDiff", "SnapshotFormat", "SolverMode", "DeviceId", "RandomSeed", "Type", "Delta", "Momentum2", "RmsDecay", "DebugInfo", "SnapshotAfterTrain", "SolverType", }); + internal_static_caffe_SolverState_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_caffe_SolverState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SolverState_descriptor, + new java.lang.String[] { "Iter", "LearnedNet", "History", "CurrentStep", }); + internal_static_caffe_NetState_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_caffe_NetState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_NetState_descriptor, + new java.lang.String[] { "Phase", "Level", "Stage", }); + internal_static_caffe_NetStateRule_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_caffe_NetStateRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_NetStateRule_descriptor, + new java.lang.String[] { "Phase", "MinLevel", "MaxLevel", "Stage", "NotStage", }); + internal_static_caffe_ParamSpec_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_caffe_ParamSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ParamSpec_descriptor, + new java.lang.String[] { "Name", "ShareMode", "LrMult", "DecayMult", }); + internal_static_caffe_LayerParameter_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_caffe_LayerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_LayerParameter_descriptor, + new java.lang.String[] { "Name", "Type", "Bottom", "Top", "Phase", "LossWeight", "Param", "Blobs", "PropagateDown", "Include", "Exclude", "TransformParam", "LossParam", "AccuracyParam", "ArgmaxParam", "BatchNormParam", "BiasParam", "ConcatParam", "ContrastiveLossParam", "ConvolutionParam", "CropParam", "DataParam", "DropoutParam", "DummyDataParam", "EltwiseParam", "EluParam", "EmbedParam", "ExpParam", "FlattenParam", "Hdf5DataParam", "Hdf5OutputParam", "HingeLossParam", "ImageDataParam", "InfogainLossParam", "InnerProductParam", "InputParam", "LogParam", "LrnParam", "MemoryDataParam", "MvnParam", "PoolingParam", "PowerParam", "PreluParam", "PythonParam", "ReductionParam", "ReluParam", "ReshapeParam", "ScaleParam", "SigmoidParam", "SoftmaxParam", "SppParam", "SliceParam", "TanhParam", "ThresholdParam", "TileParam", "WindowDataParam", }); + internal_static_caffe_TransformationParameter_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_caffe_TransformationParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_TransformationParameter_descriptor, + new java.lang.String[] { "Scale", "Mirror", "CropSize", "MeanFile", "MeanValue", "ForceColor", "ForceGray", }); + internal_static_caffe_LossParameter_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_caffe_LossParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_LossParameter_descriptor, + new java.lang.String[] { "IgnoreLabel", "Normalization", "Normalize", }); + internal_static_caffe_AccuracyParameter_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_caffe_AccuracyParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_AccuracyParameter_descriptor, + new java.lang.String[] { "TopK", "Axis", "IgnoreLabel", }); + internal_static_caffe_ArgMaxParameter_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_caffe_ArgMaxParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ArgMaxParameter_descriptor, + new java.lang.String[] { "OutMaxVal", "TopK", "Axis", }); + internal_static_caffe_ConcatParameter_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_caffe_ConcatParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ConcatParameter_descriptor, + new java.lang.String[] { "Axis", "ConcatDim", }); + internal_static_caffe_BatchNormParameter_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_caffe_BatchNormParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_BatchNormParameter_descriptor, + new java.lang.String[] { "UseGlobalStats", "MovingAverageFraction", "Eps", }); + internal_static_caffe_BiasParameter_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_caffe_BiasParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_BiasParameter_descriptor, + new java.lang.String[] { "Axis", "NumAxes", "Filler", }); + internal_static_caffe_ContrastiveLossParameter_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_caffe_ContrastiveLossParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ContrastiveLossParameter_descriptor, + new java.lang.String[] { "Margin", "LegacyVersion", }); + internal_static_caffe_ConvolutionParameter_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_caffe_ConvolutionParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ConvolutionParameter_descriptor, + new java.lang.String[] { "NumOutput", "BiasTerm", "Pad", "KernelSize", "Stride", "Dilation", "PadH", "PadW", "KernelH", "KernelW", "StrideH", "StrideW", "Group", "WeightFiller", "BiasFiller", "Engine", "Axis", "ForceNdIm2Col", }); + internal_static_caffe_CropParameter_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_caffe_CropParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_CropParameter_descriptor, + new java.lang.String[] { "Axis", "Offset", }); + internal_static_caffe_DataParameter_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_caffe_DataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_DataParameter_descriptor, + new java.lang.String[] { "Source", "BatchSize", "RandSkip", "Backend", "Scale", "MeanFile", "CropSize", "Mirror", "ForceEncodedColor", "Prefetch", }); + internal_static_caffe_DropoutParameter_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_caffe_DropoutParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_DropoutParameter_descriptor, + new java.lang.String[] { "DropoutRatio", }); + internal_static_caffe_DummyDataParameter_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_caffe_DummyDataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_DummyDataParameter_descriptor, + new java.lang.String[] { "DataFiller", "Shape", "Num", "Channels", "Height", "Width", }); + internal_static_caffe_EltwiseParameter_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_caffe_EltwiseParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_EltwiseParameter_descriptor, + new java.lang.String[] { "Operation", "Coeff", "StableProdGrad", }); + internal_static_caffe_ELUParameter_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_caffe_ELUParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ELUParameter_descriptor, + new java.lang.String[] { "Alpha", }); + internal_static_caffe_EmbedParameter_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_caffe_EmbedParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_EmbedParameter_descriptor, + new java.lang.String[] { "NumOutput", "InputDim", "BiasTerm", "WeightFiller", "BiasFiller", }); + internal_static_caffe_ExpParameter_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_caffe_ExpParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ExpParameter_descriptor, + new java.lang.String[] { "Base", "Scale", "Shift", }); + internal_static_caffe_FlattenParameter_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_caffe_FlattenParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_FlattenParameter_descriptor, + new java.lang.String[] { "Axis", "EndAxis", }); + internal_static_caffe_HDF5DataParameter_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_caffe_HDF5DataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_HDF5DataParameter_descriptor, + new java.lang.String[] { "Source", "BatchSize", "Shuffle", }); + internal_static_caffe_HDF5OutputParameter_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_caffe_HDF5OutputParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_HDF5OutputParameter_descriptor, + new java.lang.String[] { "FileName", }); + internal_static_caffe_HingeLossParameter_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_caffe_HingeLossParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_HingeLossParameter_descriptor, + new java.lang.String[] { "Norm", }); + internal_static_caffe_ImageDataParameter_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_caffe_ImageDataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ImageDataParameter_descriptor, + new java.lang.String[] { "Source", "BatchSize", "RandSkip", "Shuffle", "NewHeight", "NewWidth", "IsColor", "Scale", "MeanFile", "CropSize", "Mirror", "RootFolder", }); + internal_static_caffe_InfogainLossParameter_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_caffe_InfogainLossParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_InfogainLossParameter_descriptor, + new java.lang.String[] { "Source", }); + internal_static_caffe_InnerProductParameter_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_caffe_InnerProductParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_InnerProductParameter_descriptor, + new java.lang.String[] { "NumOutput", "BiasTerm", "WeightFiller", "BiasFiller", "Axis", "Transpose", }); + internal_static_caffe_InputParameter_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_caffe_InputParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_InputParameter_descriptor, + new java.lang.String[] { "Shape", }); + internal_static_caffe_LogParameter_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_caffe_LogParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_LogParameter_descriptor, + new java.lang.String[] { "Base", "Scale", "Shift", }); + internal_static_caffe_LRNParameter_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_caffe_LRNParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_LRNParameter_descriptor, + new java.lang.String[] { "LocalSize", "Alpha", "Beta", "NormRegion", "K", "Engine", }); + internal_static_caffe_MemoryDataParameter_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_caffe_MemoryDataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_MemoryDataParameter_descriptor, + new java.lang.String[] { "BatchSize", "Channels", "Height", "Width", }); + internal_static_caffe_MVNParameter_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_caffe_MVNParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_MVNParameter_descriptor, + new java.lang.String[] { "NormalizeVariance", "AcrossChannels", "Eps", }); + internal_static_caffe_PoolingParameter_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_caffe_PoolingParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_PoolingParameter_descriptor, + new java.lang.String[] { "Pool", "Pad", "PadH", "PadW", "KernelSize", "KernelH", "KernelW", "Stride", "StrideH", "StrideW", "Engine", "GlobalPooling", }); + internal_static_caffe_PowerParameter_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_caffe_PowerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_PowerParameter_descriptor, + new java.lang.String[] { "Power", "Scale", "Shift", }); + internal_static_caffe_PythonParameter_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_caffe_PythonParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_PythonParameter_descriptor, + new java.lang.String[] { "Module", "Layer", "ParamStr", "ShareInParallel", }); + internal_static_caffe_ReductionParameter_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_caffe_ReductionParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ReductionParameter_descriptor, + new java.lang.String[] { "Operation", "Axis", "Coeff", }); + internal_static_caffe_ReLUParameter_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_caffe_ReLUParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ReLUParameter_descriptor, + new java.lang.String[] { "NegativeSlope", "Engine", }); + internal_static_caffe_ReshapeParameter_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_caffe_ReshapeParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ReshapeParameter_descriptor, + new java.lang.String[] { "Shape", "Axis", "NumAxes", }); + internal_static_caffe_ScaleParameter_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_caffe_ScaleParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ScaleParameter_descriptor, + new java.lang.String[] { "Axis", "NumAxes", "Filler", "BiasTerm", "BiasFiller", }); + internal_static_caffe_SigmoidParameter_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_caffe_SigmoidParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SigmoidParameter_descriptor, + new java.lang.String[] { "Engine", }); + internal_static_caffe_SliceParameter_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_caffe_SliceParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SliceParameter_descriptor, + new java.lang.String[] { "Axis", "SlicePoint", "SliceDim", }); + internal_static_caffe_SoftmaxParameter_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_caffe_SoftmaxParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SoftmaxParameter_descriptor, + new java.lang.String[] { "Engine", "Axis", }); + internal_static_caffe_TanHParameter_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_caffe_TanHParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_TanHParameter_descriptor, + new java.lang.String[] { "Engine", }); + internal_static_caffe_TileParameter_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_caffe_TileParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_TileParameter_descriptor, + new java.lang.String[] { "Axis", "Tiles", }); + internal_static_caffe_ThresholdParameter_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_caffe_ThresholdParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_ThresholdParameter_descriptor, + new java.lang.String[] { "Threshold", }); + internal_static_caffe_WindowDataParameter_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_caffe_WindowDataParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_WindowDataParameter_descriptor, + new java.lang.String[] { "Source", "Scale", "MeanFile", "BatchSize", "CropSize", "Mirror", "FgThreshold", "BgThreshold", "FgFraction", "ContextPad", "CropMode", "CacheImages", "RootFolder", }); + internal_static_caffe_SPPParameter_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_caffe_SPPParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_SPPParameter_descriptor, + new java.lang.String[] { "PyramidHeight", "Pool", "Engine", }); + internal_static_caffe_V1LayerParameter_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_caffe_V1LayerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_V1LayerParameter_descriptor, + new java.lang.String[] { "Bottom", "Top", "Name", "Include", "Exclude", "Type", "Blobs", "Param", "BlobShareMode", "BlobsLr", "WeightDecay", "LossWeight", "AccuracyParam", "ArgmaxParam", "ConcatParam", "ContrastiveLossParam", "ConvolutionParam", "DataParam", "DropoutParam", "DummyDataParam", "EltwiseParam", "ExpParam", "Hdf5DataParam", "Hdf5OutputParam", "HingeLossParam", "ImageDataParam", "InfogainLossParam", "InnerProductParam", "LrnParam", "MemoryDataParam", "MvnParam", "PoolingParam", "PowerParam", "ReluParam", "SigmoidParam", "SoftmaxParam", "SliceParam", "TanhParam", "ThresholdParam", "WindowDataParam", "TransformParam", "LossParam", "Layer", }); + internal_static_caffe_V0LayerParameter_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_caffe_V0LayerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_V0LayerParameter_descriptor, + new java.lang.String[] { "Name", "Type", "NumOutput", "Biasterm", "WeightFiller", "BiasFiller", "Pad", "Kernelsize", "Group", "Stride", "Pool", "DropoutRatio", "LocalSize", "Alpha", "Beta", "K", "Source", "Scale", "Meanfile", "Batchsize", "Cropsize", "Mirror", "Blobs", "BlobsLr", "WeightDecay", "RandSkip", "DetFgThreshold", "DetBgThreshold", "DetFgFraction", "DetContextPad", "DetCropMode", "NewNum", "NewChannels", "NewHeight", "NewWidth", "ShuffleImages", "ConcatDim", "Hdf5OutputParam", }); + internal_static_caffe_PReLUParameter_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_caffe_PReLUParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_caffe_PReLUParameter_descriptor, + new java.lang.String[] { "Filler", "ChannelShared", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/misc/PrintDeltaGradient.java b/src/main/java/misc/PrintDeltaGradient.java new file mode 100644 index 0000000..08b3548 --- /dev/null +++ b/src/main/java/misc/PrintDeltaGradient.java @@ -0,0 +1,42 @@ +package misc; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.List; + +import caffe.Caffe; +import caffe.Caffe.BlobProto; + +public class PrintDeltaGradient { + + public static void main(String[] args) throws FileNotFoundException, IOException { + // TODO Auto-generated method stub + String listname = args[0]; + BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(listname))); + + String filename; + while((filename = in.readLine()) != null) { + Caffe.SolverState solver = Caffe.SolverState.parseFrom(new FileInputStream(filename)); + + List data = solver.getHistoryList(); + int count = 0; + float sum = 0; + + for(BlobProto d : data) { + List g = d.getDataList(); + for(Float a : g) { + sum+= a.floatValue() * a.floatValue(); + } + count += g.size(); + } + + System.out.println(String.format("%d\t%f", count, sum)); + } + + in.close(); + } + +} diff --git a/src/main/java/misc/WeightConverter2.java b/src/main/java/misc/WeightConverter2.java new file mode 100644 index 0000000..16a1c35 --- /dev/null +++ b/src/main/java/misc/WeightConverter2.java @@ -0,0 +1,31 @@ +package misc; + +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.util.List; + +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; + +public class WeightConverter2 { + public static void convertCaffeModel(String inName, String output, String solverSpec1,String netSpec1) throws FileNotFoundException, IOException, ClassNotFoundException { + DistNet net = new DistNet(solverSpec1,netSpec1); + net.restore(inName); + List w = net.getWeights(); + + ObjectOutputStream objout = new ObjectOutputStream(new FileOutputStream(output)); + objout.writeObject(w); + objout.close(); + } + + public static void main(String[] args) throws FileNotFoundException, ClassNotFoundException, IOException { + String inName = args[0]; + String outName = args[1]; + String solSpec1 = args[2]; + String netSpec1 = args[3]; + + convertCaffeModel(inName, outName, solSpec1, netSpec1); + } +} diff --git a/src/main/java/org/acl/deepspark/caffe/CaffeWrapper.java b/src/main/java/org/acl/deepspark/caffe/CaffeWrapper.java index 443e5f9..99a181d 100644 --- a/src/main/java/org/acl/deepspark/caffe/CaffeWrapper.java +++ b/src/main/java/org/acl/deepspark/caffe/CaffeWrapper.java @@ -61,6 +61,11 @@ private interface CaffeInterface extends Library { public void set_mode(int data); public void snapshotNet(Pointer solver,String filename); + public void restoreNet(Pointer solver,String filename); + } + + public void restore(String filename) { + CaffeInterface.INSTANCE.restoreNet(ptrSolver, filename); } public void snapshot(String filename) { diff --git a/src/main/java/org/acl/deepspark/data/ByteRecord.java b/src/main/java/org/acl/deepspark/data/ByteRecord.java new file mode 100644 index 0000000..bea8420 --- /dev/null +++ b/src/main/java/org/acl/deepspark/data/ByteRecord.java @@ -0,0 +1,14 @@ +package org.acl.deepspark.data; + +import java.io.Serializable; + +public class ByteRecord implements Serializable { + /** + * + */ + private static final long serialVersionUID = 258491956070013844L; + + public byte[] data; + public float label; + public int[] dim; +} diff --git a/src/main/java/org/acl/deepspark/data/LMDBWriter.java b/src/main/java/org/acl/deepspark/data/LMDBWriter.java index 8ccbbf1..16059f5 100644 --- a/src/main/java/org/acl/deepspark/data/LMDBWriter.java +++ b/src/main/java/org/acl/deepspark/data/LMDBWriter.java @@ -1,124 +1,155 @@ -package org.acl.deepspark.data; - -import java.io.Serializable; - -import org.fusesource.lmdbjni.Constants; -import org.fusesource.lmdbjni.Cursor; -import org.fusesource.lmdbjni.Database; -import org.fusesource.lmdbjni.Entry; -import org.fusesource.lmdbjni.Env; -import org.fusesource.lmdbjni.GetOp; -import org.fusesource.lmdbjni.Transaction; - -import com.google.protobuf.ByteString; - -import caffe.Caffe.Datum; - -public class LMDBWriter implements Serializable { - /** - * - */ - private static final long serialVersionUID = 3966228856774805437L; - private Env env; - private Database dbInstance; - - private Transaction tx; - private int th; - private int count, totalCount; - - public LMDBWriter(String path) { - this(path,1000); - } - - public LMDBWriter(String path, int th) { - - boolean isOpen = false; - try { - env = new Env(); - env.setMapSize(1099511627776L); - env.open(path, Constants.NOLOCK); - - dbInstance = env.openDatabase(); - this.th = th; - isOpen = true; - - count = 0; - totalCount = 0; - } catch(Exception e) { - e.printStackTrace(); - } - finally { - if (isOpen) { - System.out.println("lmdb opened successfully"); - } - } - } - - - private Datum convert2Datum(Record sample) { - byte[] bytes = new byte[sample.data.length]; - for (int i = 0 ; i< bytes.length; i++) - bytes[i] = (byte) ((int) sample.data[i] & 0xff); - - Datum datum = Datum.newBuilder().setWidth(sample.dim[2]) - .setHeight(sample.dim[1]) - .setChannels(sample.dim[0]) - .setData(ByteString.copyFrom(bytes)) - .setLabel((int) sample.label) - .build(); - return datum; - } - - public void putSample(Record sample) { - if(count == th) { - tx.commit(); - count = 0; - } - - if(count == 0) - tx = env.createWriteTransaction(); - - Datum d = convert2Datum(sample); - - byte[] array =d.toByteArray(); - - dbInstance.put(tx,String.format("%08d",totalCount++).getBytes(), array); - count++; - } - - public void closeLMDB() { - if(count !=0) - tx.commit(); - /* - if (dbInstance != null && dbInstance.isAllocated()) - dbInstance.close(); - if (env != null && env.isAllocated()) - env.close(); - */ - System.out.println("DB successfully closed."); - } - - public void printAll() { - Transaction tx = env.createReadTransaction(); - try { - Cursor cursor = dbInstance.openCursor(tx); - try { - for (Entry entry = cursor.get(GetOp.FIRST); entry != null; entry = cursor.get(GetOp.NEXT)) { - String key = new String(entry.getKey()); - String value = new String(entry.getValue()); - //System.out.println(String.format("key:%s, val:%s", key, value)); - System.out.println(String.format("key:%s", key)); - } - } finally { - cursor.close(); - } - } finally { - tx.commit(); - } - } - - @Override - public void finalize() { - closeLMDB(); - } -} +package org.acl.deepspark.data; + +import java.io.Serializable; + +import org.fusesource.lmdbjni.Constants; +import org.fusesource.lmdbjni.Cursor; +import org.fusesource.lmdbjni.Database; +import org.fusesource.lmdbjni.Entry; +import org.fusesource.lmdbjni.Env; +import org.fusesource.lmdbjni.GetOp; +import org.fusesource.lmdbjni.Transaction; + +import com.google.protobuf.ByteString; + +import caffe.Caffe.Datum; + +public class LMDBWriter implements Serializable { + /** + * + */ + private static final long serialVersionUID = 3966228856774805437L; + private Env env; + private Database dbInstance; + + private Transaction tx; + private int th; + private int count, totalCount; + + public LMDBWriter(String path) { + this(path,1000); + } + + public LMDBWriter(String path, int th) { + + boolean isOpen = false; + try { + env = new Env(); + env.setMapSize(1099511627776L); + env.open(path, Constants.NOLOCK); + + dbInstance = env.openDatabase(); + this.th = th; + isOpen = true; + + count = 0; + totalCount = 0; + } catch(Exception e) { + e.printStackTrace(); + } + finally { + if (isOpen) { + System.out.println("lmdb opened successfully"); + } + } + } + + + private Datum convert2Datum(Record sample) { + byte[] bytes = new byte[sample.data.length]; + for (int i = 0 ; i< bytes.length; i++) + bytes[i] = (byte) ((int) sample.data[i] & 0xff); + + Datum datum = Datum.newBuilder().setWidth(sample.dim[2]) + .setHeight(sample.dim[1]) + .setChannels(sample.dim[0]) + .setData(ByteString.copyFrom(bytes)) + .setLabel((int) sample.label) + .build(); + return datum; + } + + private Datum convert2Datum(ByteRecord sample) { + byte[] bytes = new byte[sample.data.length]; + for (int i = 0 ; i< bytes.length; i++) + bytes[i] = (byte) ((int) sample.data[i] & 0xff); + + Datum datum = Datum.newBuilder().setWidth(sample.dim[2]) + .setHeight(sample.dim[1]) + .setChannels(sample.dim[0]) + .setData(ByteString.copyFrom(bytes)) + .setLabel((int) sample.label) + .build(); + return datum; + } + + public void putSample(Record sample) { + if(count == th) { + tx.commit(); + count = 0; + } + + if(count == 0) + tx = env.createWriteTransaction(); + + Datum d = convert2Datum(sample); + + byte[] array =d.toByteArray(); + + dbInstance.put(tx,String.format("%08d",totalCount++).getBytes(), array); + count++; + } + + public void putSample(ByteRecord sample) { + if(count == th) { + tx.commit(); + count = 0; + } + + if(count == 0) + tx = env.createWriteTransaction(); + + Datum d = convert2Datum(sample); + + byte[] array =d.toByteArray(); + + dbInstance.put(tx,String.format("%08d",totalCount++).getBytes(), array); + count++; + } + + public void closeLMDB() { + if(count !=0) + tx.commit(); + /* + if (dbInstance != null && dbInstance.isAllocated()) + dbInstance.close(); + if (env != null && env.isAllocated()) + env.close(); + */ + System.out.println("DB successfully closed."); + } + + public void printAll() { + Transaction tx = env.createReadTransaction(); + try { + Cursor cursor = dbInstance.openCursor(tx); + try { + for (Entry entry = cursor.get(GetOp.FIRST); entry != null; entry = cursor.get(GetOp.NEXT)) { + String key = new String(entry.getKey()); + String value = new String(entry.getValue()); + //System.out.println(String.format("key:%s, val:%s", key, value)); + System.out.println(String.format("key:%s", key)); + } + } finally { + cursor.close(); + } + } finally { + tx.commit(); + } + } + + @Override + public void finalize() { + closeLMDB(); + } +} diff --git a/src/main/java/org/acl/deepspark/data/Record.java b/src/main/java/org/acl/deepspark/data/Record.java index c29002a..88c6f53 100644 --- a/src/main/java/org/acl/deepspark/data/Record.java +++ b/src/main/java/org/acl/deepspark/data/Record.java @@ -1,14 +1,14 @@ -package org.acl.deepspark.data; - -import java.io.Serializable; - -public class Record implements Serializable { - /** - * - */ - private static final long serialVersionUID = 258491956070013844L; - - public float[] data; - public float label; - public int[] dim; -} +package org.acl.deepspark.data; + +import java.io.Serializable; + +public class Record implements Serializable { + /** + * + */ + private static final long serialVersionUID = 258491956070013844L; + + public float[] data; + public float label; + public int[] dim; +} diff --git a/src/main/java/org/acl/deepspark/data/Weight.java b/src/main/java/org/acl/deepspark/data/Weight.java index f24116b..89ae4f4 100644 --- a/src/main/java/org/acl/deepspark/data/Weight.java +++ b/src/main/java/org/acl/deepspark/data/Weight.java @@ -1,13 +1,13 @@ -package org.acl.deepspark.data; - -import java.io.Serializable; - -public class Weight implements Serializable { - /** - * - */ - private static final long serialVersionUID = 1L; - public float[] data; - public int offset; - public int layerIndex; -} +package org.acl.deepspark.data; + +import java.io.Serializable; + +public class Weight implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + public float[] data; + public int offset; + public int layerIndex; +} diff --git a/src/main/java/org/acl/deepspark/nn/DistNet.java b/src/main/java/org/acl/deepspark/nn/DistNet.java index 8c76142..05230a2 100644 --- a/src/main/java/org/acl/deepspark/nn/DistNet.java +++ b/src/main/java/org/acl/deepspark/nn/DistNet.java @@ -1,323 +1,331 @@ -package org.acl.deepspark.nn; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.acl.deepspark.caffe.CaffeWrapper; -import org.acl.deepspark.data.LMDBWriter; -import org.acl.deepspark.data.Record; -import org.acl.deepspark.data.RecordBatch; -import org.acl.deepspark.data.Weight; - -import com.google.protobuf.TextFormat; - -import caffe.Caffe.LayerParameter; -import caffe.Caffe.NetParameter; -import caffe.Caffe.NetStateRule; -import caffe.Caffe.Phase; -import caffe.Caffe.SolverParameter; - -public class DistNet implements Serializable { - /** - * - */ - private static final long serialVersionUID = -4406616544404720649L; - private CaffeWrapper netLearner; - private String trainingDataName; - private String testDataName; - private int[] inputDim; - - public DistNet(String solverSpec, String netSpec, int[] dummySize) { - makeDummy(netSpec,dummySize); - this.netLearner = new CaffeWrapper(solverSpec, netSpec); - initialize(); - } - - public DistNet(String solverSpec, String netSpec) { - this.netLearner = new CaffeWrapper(solverSpec, netSpec); - initialize(); - } - - private void makeDummy(String netSpec, int[] dummySize) { - // make missed dirs - FileReader reader; - try { - reader = new FileReader(netSpec); - NetParameter.Builder netBuilder = NetParameter.newBuilder(); - TextFormat.merge(reader, netBuilder); - NetParameter netparam = netBuilder.build(); - - List list = netparam.getLayerList(); - - - // for training layer - int idx = findDataLayer(list, Phase.TRAIN); - LayerParameter l = list.get(idx); - if(l.getType().equals("Data")) { - int batchsize = l.getDataParam().getBatchSize(); - String source = l.getDataParam().getSource(); - File dir = new File(source); - if(!dir.exists()) - dir.mkdirs(); - - LMDBWriter d = new LMDBWriter(source, batchsize); - Record s = new Record(); - s.data = new float[dummySize[0] * dummySize[1] * dummySize[2]]; - s.label = 0; - s.dim = new int[] {dummySize[0], dummySize[1], dummySize[2]}; - - for(int i = 0; i < batchsize; i++) { - d.putSample(s); - } - d.closeLMDB(); - } - - // for testing layer - idx = findDataLayer(list, Phase.TEST); - l = list.get(idx); - if(l.getType().equals("Data")) { - int batchsize = l.getDataParam().getBatchSize(); - String source = l.getDataParam().getSource(); - File dir = new File(source); - if(!dir.exists()) - dir.mkdirs(); - - LMDBWriter d = new LMDBWriter(source, batchsize); - Record s = new Record(); - s.data = new float[dummySize[0] * dummySize[1] * dummySize[2]]; - s.label = 0; - s.dim = new int[] {dummySize[0], dummySize[1], dummySize[2]}; - - for(int i = 0; i < batchsize; i++) { - d.putSample(s); - } - - d.closeLMDB(); - } - - - } catch (IOException e1) { - e1.printStackTrace(); - } - } - - public DistNet(byte[] solverSpec, byte[] netSpec) { - this.netLearner = new CaffeWrapper(solverSpec, netSpec); - initialize(); - } - - public int getTrainingBatchSize() { - List layers = netLearner.getNetParameter().getLayerList(); - int trainIdx = findDataLayer(layers, Phase.TRAIN); - LayerParameter trainingDataLayer = layers.get(trainIdx); - return trainingDataLayer.getMemoryDataParam().getBatchSize(); - } - - private void initialize() { - List layers = netLearner.getNetParameter().getLayerList(); - int trainIdx = findDataLayer(layers, Phase.TRAIN); - - if(trainIdx == -1) { - // error handling - - } else { - LayerParameter trainingDataLayer = layers.get(trainIdx); - trainingDataName = trainingDataLayer.getName(); - - String layerType = trainingDataLayer.getType(); - if(layerType.equals("MemoryData")) { - inputDim = new int[4]; // batchSize, channels, height, width; - inputDim[0] = trainingDataLayer.getMemoryDataParam().getBatchSize();// batchSize; - inputDim[1] = trainingDataLayer.getMemoryDataParam().getChannels();// channels; - inputDim[2] = trainingDataLayer.getMemoryDataParam().getHeight();// height; - inputDim[3] = trainingDataLayer.getMemoryDataParam().getWidth();// width; - - System.out.println("Iteration : " + netLearner.getSolverParameter().getMaxIter()); - System.out.println("Learning Rate : " + netLearner.getSolverParameter().getBaseLr()); - System.out.println(String.format("batchSize: %d", inputDim[0])); - System.out.println(String.format("channel: %d", inputDim[1])); - System.out.println(String.format("height: %d", inputDim[2])); - System.out.println(String.format("width: %d", inputDim[3])); - System.out.println(String.format("momentum: %4f", netLearner.getSolverParameter().getMomentum())); - System.out.println(String.format("decayLambda: %4f", netLearner.getSolverParameter().getWeightDecay())); - } else if(layerType.equals("Data")) { - inputDim = new int[1]; - inputDim[0] = trainingDataLayer.getDataParam().getBatchSize(); - - System.out.println("Iteration : " + netLearner.getSolverParameter().getMaxIter()); - System.out.println("Learning Rate : " + netLearner.getSolverParameter().getBaseLr()); - System.out.println(String.format("batchSize: %d", inputDim[0])); - System.out.println(String.format("momentum: %4f", netLearner.getSolverParameter().getMomentum())); - System.out.println(String.format("decayLambda: %4f", netLearner.getSolverParameter().getWeightDecay())); - System.out.println(String.format("Training Source: %s", trainingDataLayer.getDataParam().getSource())); - } - } - - int testIdx = findDataLayer(layers, Phase.TEST); - if(testIdx == -1 ) { - // error handling - } else { - - LayerParameter testingDataLayer = layers.get(testIdx); - testDataName = testingDataLayer.getName(); - } - } - - private int findDataLayer(List list, Phase phase) { - int res = -1; - for(int i = 0; i < list.size();i++) { - LayerParameter l = list.get(i); - List rule = l.getIncludeList(); - for(int j =0; j < rule.size(); j++) - if( l.getType().contains("Data") && - rule.get(j).hasPhase() && - rule.get(j).getPhase() == phase) { - res = i; - return res; - } - } - - return res; - } - - public int findDataLayer(Phase phase) { - return findDataLayer(netLearner.getNetParameter().getLayerList(), phase); - } - - public int getIteration() { - return netLearner.getSolverParameter().getMaxIter(); - } - - public void setTrainData(RecordBatch dataset) { - netLearner.setTrainBuffer(trainingDataName, dataset.data, dataset.label, dataset.size); - } - - public void setTestData(RecordBatch dataset) { - netLearner.setTestBuffer(testDataName, dataset.data, dataset.label, dataset.size); - } - - public float train() { - return netLearner.train(); - } - - public float trainWithLocal() { - return netLearner.trainWithLocal(); - } - - public float[] test() { - return netLearner.test(); - } - - public float[] testWithLMDB() { - return netLearner.testWithLMDB(); - } - - public void snapshot(String filename) { - netLearner.snapshot(filename); - } - - - public List getGradients() { - List list = netLearner.getGradients(); - List ret = new ArrayList(); - - for(int i = 0; i < list.size();i++) { - Weight w = new Weight(); - w.layerIndex = i; - w.offset = 0; - w.data = list.get(i); - ret.add(w); - } - - return ret; - } - - public void setGradients(List grads) { - for(int i =0; i < grads.size(); i++) { - Weight w = grads.get(i); - netLearner.setGradient(w.data, w.offset, i); - } - } - - public void manualUpdate() { - netLearner.manualUpdate(); - } - - public List getWeights() { - List list = netLearner.getWeights(); - List ret = new ArrayList(); - - for(int i = 0; i < list.size();i++) { - Weight w = new Weight(); - w.layerIndex = i; - w.offset = 0; - w.data = list.get(i); - ret.add(w); - } - - return ret; - } - - public void setWeights(List weights) { - for(int i =0; i < weights.size(); i++) { - Weight w = weights.get(i); - netLearner.setWeight(w.data, w.offset, i); - } - } - - public RecordBatch buildBlobs(List list) { - if(inputDim.length== 4) { - RecordBatch ret = new RecordBatch(list.size(), inputDim[1], inputDim[2], inputDim[3]); - - for(int i = 0; i < list.size(); i++) { - Record s = list.get(i); - for(int j = 0; j < s.data.length; j++) { - ret.data.putFloat((i* s.data.length + j) * Float.SIZE / Byte.SIZE, s.data[j]); - } - ret.label.putFloat(i*Float.SIZE / Byte.SIZE, s.label); - } - return ret; - } else return null; - } - - public RecordBatch buildBlobs(Iterator iter) { - List array = new ArrayList(); - while(iter.hasNext()) - array.add(iter.next()); - return buildBlobs(array); - } - - public SolverParameter getSolverSetting() { - return netLearner.getSolverParameter(); - } - - public NetParameter getNetConf() { - return netLearner.getNetParameter(); - } - - public void setCPU() { - netLearner.set_mode(CaffeWrapper.CAFFE_CPU); - } - - public void setGPU() { - netLearner.set_mode(CaffeWrapper.CAFFE_GPU); - } - - public int getBatchSize() { - return inputDim[0]; - } - - public void printLearnableWeightInfo() { - List list = getWeights(); - System.out.println(""); - for(int i =0; i < list.size(); i++) { - Weight w = list.get(i); - System.out.println(String.format("Layer%d, # of parameter: %d", i, w.data.length)); - } - } -} +package org.acl.deepspark.nn; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.acl.deepspark.caffe.CaffeWrapper; +import org.acl.deepspark.data.ByteRecord; +import org.acl.deepspark.data.LMDBWriter; +import org.acl.deepspark.data.Record; +import org.acl.deepspark.data.RecordBatch; +import org.acl.deepspark.data.Weight; + +import com.google.protobuf.TextFormat; + +import caffe.Caffe.LayerParameter; +import caffe.Caffe.NetParameter; +import caffe.Caffe.NetStateRule; +import caffe.Caffe.Phase; +import caffe.Caffe.SolverParameter; + +public class DistNet implements Serializable { + /** + * + */ + private static final long serialVersionUID = -4406616544404720649L; + private CaffeWrapper netLearner; + private String trainingDataName; + private String testDataName; + private int[] inputDim; + + public DistNet(String solverSpec, String netSpec, int[] dummySize) { + makeDummy(netSpec,dummySize); + this.netLearner = new CaffeWrapper(solverSpec, netSpec); + initialize(); + } + + public DistNet(String solverSpec, String netSpec) { + this.netLearner = new CaffeWrapper(solverSpec, netSpec); + initialize(); + } + + private void makeDummy(String netSpec, int[] dummySize) { + // make missed dirs + FileReader reader; + try { + reader = new FileReader(netSpec); + NetParameter.Builder netBuilder = NetParameter.newBuilder(); + TextFormat.merge(reader, netBuilder); + NetParameter netparam = netBuilder.build(); + + List list = netparam.getLayerList(); + + + // for training layer + int idx = findDataLayer(list, Phase.TRAIN); + LayerParameter l = list.get(idx); + if(l.getType().equals("Data")) { + int batchsize = l.getDataParam().getBatchSize(); + String source = l.getDataParam().getSource(); + File dir = new File(source); + if(!dir.exists()) + dir.mkdirs(); + + LMDBWriter d = new LMDBWriter(source, batchsize); + ByteRecord s = new ByteRecord(); + s.data = new byte[dummySize[0] * dummySize[1] * dummySize[2]]; + s.label = 0; + s.dim = new int[] {dummySize[0], dummySize[1], dummySize[2]}; + + for(int i = 0; i < batchsize; i++) { + d.putSample(s); + } + d.closeLMDB(); + } + + // for testing layer + idx = findDataLayer(list, Phase.TEST); + l = list.get(idx); + if(l.getType().equals("Data")) { + int batchsize = l.getDataParam().getBatchSize(); + String source = l.getDataParam().getSource(); + File dir = new File(source); + if(!dir.exists()) + dir.mkdirs(); + + LMDBWriter d = new LMDBWriter(source, batchsize); + Record s = new Record(); + s.data = new float[dummySize[0] * dummySize[1] * dummySize[2]]; + s.label = 0; + s.dim = new int[] {dummySize[0], dummySize[1], dummySize[2]}; + + for(int i = 0; i < batchsize; i++) { + d.putSample(s); + } + + d.closeLMDB(); + } + + + } catch (IOException e1) { + e1.printStackTrace(); + } + } + + public DistNet(byte[] solverSpec, byte[] netSpec) { + this.netLearner = new CaffeWrapper(solverSpec, netSpec); + initialize(); + } + + public int getTrainingBatchSize() { + List layers = netLearner.getNetParameter().getLayerList(); + int trainIdx = findDataLayer(layers, Phase.TRAIN); + LayerParameter trainingDataLayer = layers.get(trainIdx); + return trainingDataLayer.getMemoryDataParam().getBatchSize(); + } + + private void initialize() { + List layers = netLearner.getNetParameter().getLayerList(); + int trainIdx = findDataLayer(layers, Phase.TRAIN); + + if(trainIdx == -1) { + // error handling + System.out.println("cannot find training data layer..."); + } else { + LayerParameter trainingDataLayer = layers.get(trainIdx); + trainingDataName = trainingDataLayer.getName(); + + String layerType = trainingDataLayer.getType(); + if(layerType.equals("MemoryData")) { + inputDim = new int[4]; // batchSize, channels, height, width; + inputDim[0] = trainingDataLayer.getMemoryDataParam().getBatchSize();// batchSize; + inputDim[1] = trainingDataLayer.getMemoryDataParam().getChannels();// channels; + inputDim[2] = trainingDataLayer.getMemoryDataParam().getHeight();// height; + inputDim[3] = trainingDataLayer.getMemoryDataParam().getWidth();// width; + + System.out.println("Iteration : " + netLearner.getSolverParameter().getMaxIter()); + System.out.println("Learning Rate : " + netLearner.getSolverParameter().getBaseLr()); + System.out.println(String.format("batchSize: %d", inputDim[0])); + System.out.println(String.format("channel: %d", inputDim[1])); + System.out.println(String.format("height: %d", inputDim[2])); + System.out.println(String.format("width: %d", inputDim[3])); + System.out.println(String.format("momentum: %4f", netLearner.getSolverParameter().getMomentum())); + System.out.println(String.format("decayLambda: %4f", netLearner.getSolverParameter().getWeightDecay())); + } else if(layerType.equals("Data")) { + inputDim = new int[1]; + inputDim[0] = trainingDataLayer.getDataParam().getBatchSize(); + + System.out.println("Iteration : " + netLearner.getSolverParameter().getMaxIter()); + System.out.println("Learning Rate : " + netLearner.getSolverParameter().getBaseLr()); + System.out.println(String.format("batchSize: %d", inputDim[0])); + System.out.println(String.format("momentum: %4f", netLearner.getSolverParameter().getMomentum())); + System.out.println(String.format("decayLambda: %4f", netLearner.getSolverParameter().getWeightDecay())); + System.out.println(String.format("Training Source: %s", trainingDataLayer.getDataParam().getSource())); + } + } + + int testIdx = findDataLayer(layers, Phase.TEST); + if(testIdx == -1 ) { + // error handling + } else { + + LayerParameter testingDataLayer = layers.get(testIdx); + testDataName = testingDataLayer.getName(); + } + } + + private int findDataLayer(List list, Phase phase) { + int res = -1; + for(int i = 0; i < list.size();i++) { + LayerParameter l = list.get(i); + List rule = l.getIncludeList(); + for(int j =0; j < rule.size(); j++) + if( l.getType().contains("Data") && + rule.get(j).hasPhase() && + rule.get(j).getPhase() == phase) { + res = i; + return res; + } + } + + return res; + } + + public int findDataLayer(Phase phase) { + return findDataLayer(netLearner.getNetParameter().getLayerList(), phase); + } + + public int getIteration() { + return netLearner.getSolverParameter().getMaxIter(); + } + + public void setTrainData(RecordBatch dataset) { + netLearner.setTrainBuffer(trainingDataName, dataset.data, dataset.label, dataset.size); + } + + public void setTestData(RecordBatch dataset) { + netLearner.setTestBuffer(testDataName, dataset.data, dataset.label, dataset.size); + } + + public float train() { + return netLearner.train(); + } + + public float trainWithLocal() { + return netLearner.trainWithLocal(); + } + + public float[] test() { + return netLearner.test(); + } + + public float[] testWithLMDB() { + return netLearner.testWithLMDB(); + } + + public void snapshot(String filename) { + netLearner.snapshot(filename); + } + + public void restore(String filename) { + netLearner.restore(filename); + } + + public List getGradients() { + List list = netLearner.getGradients(); + List ret = new ArrayList(); + + for(int i = 0; i < list.size();i++) { + Weight w = new Weight(); + w.layerIndex = i; + w.offset = 0; + w.data = list.get(i); + ret.add(w); + } + + return ret; + } + + public void setGradients(List grads) { + for(int i =0; i < grads.size(); i++) { + Weight w = grads.get(i); + netLearner.setGradient(w.data, w.offset, i); + } + } + + public void manualUpdate() { + netLearner.manualUpdate(); + } + + public List getWeights() { + List list = netLearner.getWeights(); + List ret = new ArrayList(); + + for(int i = 0; i < list.size();i++) { + Weight w = new Weight(); + w.layerIndex = i; + w.offset = 0; + w.data = list.get(i); + ret.add(w); + } + + return ret; + } + + public void setWeights(List weights) { + for(int i =0; i < weights.size(); i++) { + Weight w = weights.get(i); + netLearner.setWeight(w.data, w.offset, i); + } + } + + public RecordBatch buildBlobs(List list) { + if(inputDim.length== 4) { + RecordBatch ret = new RecordBatch(list.size(), inputDim[1], inputDim[2], inputDim[3]); + + for(int i = 0; i < list.size(); i++) { + Record s = list.get(i); + for(int j = 0; j < s.data.length; j++) { + ret.data.putFloat((i* s.data.length + j) * Float.SIZE / Byte.SIZE, s.data[j]); + } + ret.label.putFloat(i*Float.SIZE / Byte.SIZE, s.label); + } + return ret; + } else return null; + } + + public RecordBatch buildBlobs(Iterator iter) { + List array = new ArrayList(); + while(iter.hasNext()) + array.add(iter.next()); + return buildBlobs(array); + } + + public SolverParameter getSolverSetting() { + return netLearner.getSolverParameter(); + } + + public NetParameter getNetConf() { + return netLearner.getNetParameter(); + } + + public void setCPU() { + netLearner.set_mode(CaffeWrapper.CAFFE_CPU); + } + + public void setGPU() { + netLearner.set_mode(CaffeWrapper.CAFFE_GPU); + } + + public int getBatchSize() { + return inputDim[0]; + } + + public void printLearnableWeightInfo() { + List list = getWeights(); + System.out.println(""); + for(int i =0; i < list.size(); i++) { + Weight w = list.get(i); + System.out.println(String.format("Layer%d, # of parameter: %d", i, w.data.length)); + } + } + + public void close() { + netLearner.clearSolver(); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/ParameterClient.java b/src/main/java/org/acl/deepspark/nn/async/ParameterClient.java index 2145b76..48cae04 100644 --- a/src/main/java/org/acl/deepspark/nn/async/ParameterClient.java +++ b/src/main/java/org/acl/deepspark/nn/async/ParameterClient.java @@ -1,30 +1,30 @@ -package org.acl.deepspark.nn.async; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.Socket; -import java.util.List; - -import org.acl.deepspark.data.Weight; - -public class ParameterClient { - public static void sendDelta(String host, int port, List d) throws IOException, ClassNotFoundException { - Socket s = new Socket(host, port); - s.setSoTimeout(15000); - ObjectOutputStream os = new ObjectOutputStream(s.getOutputStream()); - os.writeObject(d); - s.close(); - System.out.println("Gradients sent"); - } - - public static List getWeights(String host, int port) throws IOException, ClassNotFoundException { - Socket s = new Socket(host, port); - s.setSoTimeout(15000); - ObjectInputStream os = new ObjectInputStream(s.getInputStream()); - List w = (List) os.readObject(); - s.close(); - System.out.println("Weight received"); - return w; - } -} +package org.acl.deepspark.nn.async; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.Socket; +import java.util.List; + +import org.acl.deepspark.data.Weight; + +public class ParameterClient { + public static void sendDelta(String host, int port, List d) throws IOException, ClassNotFoundException { + Socket s = new Socket(host, port); + s.setSoTimeout(15000); + ObjectOutputStream os = new ObjectOutputStream(s.getOutputStream()); + os.writeObject(d); + s.close(); + System.out.println("Gradients sent"); + } + + public static List getWeights(String host, int port) throws IOException, ClassNotFoundException { + Socket s = new Socket(host, port); + s.setSoTimeout(15000); + ObjectInputStream os = new ObjectInputStream(s.getInputStream()); + List w = (List) os.readObject(); + s.close(); + System.out.println("Weight received"); + return w; + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/ParameterMasterServer.java b/src/main/java/org/acl/deepspark/nn/async/ParameterMasterServer.java index 485914e..251c4ef 100644 --- a/src/main/java/org/acl/deepspark/nn/async/ParameterMasterServer.java +++ b/src/main/java/org/acl/deepspark/nn/async/ParameterMasterServer.java @@ -1,100 +1,100 @@ -package org.acl.deepspark.nn.async; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.List; -import java.util.concurrent.BrokenBarrierException; -import java.util.concurrent.CyclicBarrier; - -import org.acl.deepspark.nn.DistNet; - -public class ParameterMasterServer { - private DistNet p; - private int port; - private CyclicBarrier barrier; - private ServerSocket serverSocket; - - private List threads; - private ParameterRange[] paramRanges; - private String[] hostnames; - - - private class RegisterThread extends Thread { - private Socket connect; - private int idx; - public RegisterThread(Socket s, int idx) { - connect = s; - this.idx= idx; - } - - @Override - public void run() { - try { - BufferedReader in = new BufferedReader(new InputStreamReader(connect.getInputStream())); - OutputStream out = connect.getOutputStream(); - - //setup hostname - String hostName = in.readLine(); - hostnames[idx] = hostName; - - // push map index - out.write(idx); - - // wait other workers - barrier.await(); - - // push map - ObjectOutputStream objOut = new ObjectOutputStream(out); - objOut.writeObject(paramRanges); - - // push hostnames - objOut.writeObject(hostnames); - - } catch (InterruptedException | BrokenBarrierException | IOException e) { - System.out.println("barrier failed....."); - e.printStackTrace(); - } - } - - } - - public ParameterMasterServer(DistNet net, int port, int barrierSize) { - p = net; - this.port = port; - this.barrier = new CyclicBarrier(barrierSize); - - } - - public void acceptRegister() throws IOException { - serverSocket = new ServerSocket(port); - - //prepare paramMap - paramRanges = new ParameterRange[barrier.getParties()]; - hostnames = new String[barrier.getParties()]; - p.getWeights(); - - - // - for(int i =0; i < barrier.getParties() ; i++) { - Socket s = serverSocket.accept(); - RegisterThread t = new RegisterThread(s, i); - t.start(); - threads.add(t); - } - - for(int i = 0; i < threads.size(); i++) { - try { - threads.get(i).join(); - } catch (InterruptedException e) { - System.err.println(String.format("Thread %d is interrupted..", i)); - e.printStackTrace(); - } - } - } -} +package org.acl.deepspark.nn.async; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.List; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; + +import org.acl.deepspark.nn.DistNet; + +public class ParameterMasterServer { + private DistNet p; + private int port; + private CyclicBarrier barrier; + private ServerSocket serverSocket; + + private List threads; + private ParameterRange[] paramRanges; + private String[] hostnames; + + + private class RegisterThread extends Thread { + private Socket connect; + private int idx; + public RegisterThread(Socket s, int idx) { + connect = s; + this.idx= idx; + } + + @Override + public void run() { + try { + BufferedReader in = new BufferedReader(new InputStreamReader(connect.getInputStream())); + OutputStream out = connect.getOutputStream(); + + //setup hostname + String hostName = in.readLine(); + hostnames[idx] = hostName; + + // push map index + out.write(idx); + + // wait other workers + barrier.await(); + + // push map + ObjectOutputStream objOut = new ObjectOutputStream(out); + objOut.writeObject(paramRanges); + + // push hostnames + objOut.writeObject(hostnames); + + } catch (InterruptedException | BrokenBarrierException | IOException e) { + System.out.println("barrier failed....."); + e.printStackTrace(); + } + } + + } + + public ParameterMasterServer(DistNet net, int port, int barrierSize) { + p = net; + this.port = port; + this.barrier = new CyclicBarrier(barrierSize); + + } + + public void acceptRegister() throws IOException { + serverSocket = new ServerSocket(port); + + //prepare paramMap + paramRanges = new ParameterRange[barrier.getParties()]; + hostnames = new String[barrier.getParties()]; + p.getWeights(); + + + // + for(int i =0; i < barrier.getParties() ; i++) { + Socket s = serverSocket.accept(); + RegisterThread t = new RegisterThread(s, i); + t.start(); + threads.add(t); + } + + for(int i = 0; i < threads.size(); i++) { + try { + threads.get(i).join(); + } catch (InterruptedException e) { + System.err.println(String.format("Thread %d is interrupted..", i)); + e.printStackTrace(); + } + } + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/ParameterServer.java b/src/main/java/org/acl/deepspark/nn/async/ParameterServer.java index f593c2e..afa1810 100644 --- a/src/main/java/org/acl/deepspark/nn/async/ParameterServer.java +++ b/src/main/java/org/acl/deepspark/nn/async/ParameterServer.java @@ -1,176 +1,176 @@ -package org.acl.deepspark.nn.async; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.List; -import java.util.Queue; - -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.nn.DistNet; - -public class ParameterServer { - private DistNet p; - private int listenPort; - private int castPort; - private ServerSocket updateSocket; - private ServerSocket castSocket; - - private boolean stopSign = false; - - private Thread[] threads; - - private class BroadcastThread extends Thread { - private Socket s; - - public BroadcastThread(Socket s) { - this.s = s; - } - - @Override - public void run() { - try { - ObjectOutputStream os = new ObjectOutputStream(s.getOutputStream()); - os.writeObject(p.getWeights()); - System.out.println("ParameterServer: sent!"); - s.close(); - } catch (IOException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[broadcast]: closed."); - } else { - System.out.println("ParameterServer[broadcast]: got Error!"); - e.printStackTrace(); - } - } - } - } - - private class UpdateThread extends Thread { - private Socket s; - - public UpdateThread(Socket s) { - this.s = s; - } - - @Override - public void run() { - try { - ObjectInputStream is = new ObjectInputStream(s.getInputStream()); - List w = (List) is.readObject(); - p.setGradients(w); - p.manualUpdate(); - System.out.println("ParameterServer: Updated!"); - - s.close(); - } catch (IOException | ClassNotFoundException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[update]: closed."); - } else { - System.out.println("ParameterServer[update]: got Error!"); - e.printStackTrace(); - } - } - } - } - - public ParameterServer(DistNet net, int listenPort, int castPort ) { - p = net; - this.listenPort = listenPort; - this.castPort = castPort; - threads = new Thread[2]; - } - - public void stopServer() { - stopSign = true; - try { - updateSocket.close(); - castSocket.close(); - threads[0].join(); - threads[1].join(); - } catch (IOException | InterruptedException e) { - e.printStackTrace(); - } - } - - public void startServer() throws IOException { - updateSocket = new ServerSocket(listenPort); - castSocket = new ServerSocket(castPort); - - // broadcast socket - threads[0] = new Thread(new Runnable() { - - @Override - public void run() { - while(!stopSign) { - try { - Socket a = castSocket.accept(); - new BroadcastThread(a).start(); - } catch (IOException e) { - e.printStackTrace(); - } - - - /* - try { - Socket a = castSocket.accept(); - synchronized (lock) { - ObjectOutputStream os = new ObjectOutputStream(a.getOutputStream()); - os.writeObject(p.getWeights()); - } - System.out.println("ParameterServer: sent!"); - a.close(); - } catch (IOException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[broadcast]: closed."); - } else { - System.out.println("ParameterServer[broadcast]: got Error!"); - e.printStackTrace(); - } - } - */ - } - } - }); - threads[0].start(); - - // update socket - threads[1] = new Thread(new Runnable() { - - @Override - public void run() { - // TODO Auto-generated method stub - while(!stopSign) { - try { - Socket a = updateSocket.accept(); - new UpdateThread(a).start(); - } catch (IOException e) { - e.printStackTrace(); - } - /* - try { - Socket a = updateSocket.accept(); - synchronized (lock) { - ObjectInputStream is = new ObjectInputStream(a.getInputStream()); - List w = (List) is.readObject(); - p.setGradients(w); - p.manualUpdate(); - System.out.println("ParameterServer: Updated!"); - } - a.close(); - } catch (IOException | ClassNotFoundException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[update]: closed."); - } else { - System.out.println("ParameterServer[update]: got Error!"); - e.printStackTrace(); - } - } - */ - } - } - }); - threads[1].start(); - } -} +package org.acl.deepspark.nn.async; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.List; +import java.util.Queue; + +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; + +public class ParameterServer { + private DistNet p; + private int listenPort; + private int castPort; + private ServerSocket updateSocket; + private ServerSocket castSocket; + + private boolean stopSign = false; + + private Thread[] threads; + + private class BroadcastThread extends Thread { + private Socket s; + + public BroadcastThread(Socket s) { + this.s = s; + } + + @Override + public void run() { + try { + ObjectOutputStream os = new ObjectOutputStream(s.getOutputStream()); + os.writeObject(p.getWeights()); + System.out.println("ParameterServer: sent!"); + s.close(); + } catch (IOException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[broadcast]: closed."); + } else { + System.out.println("ParameterServer[broadcast]: got Error!"); + e.printStackTrace(); + } + } + } + } + + private class UpdateThread extends Thread { + private Socket s; + + public UpdateThread(Socket s) { + this.s = s; + } + + @Override + public void run() { + try { + ObjectInputStream is = new ObjectInputStream(s.getInputStream()); + List w = (List) is.readObject(); + p.setGradients(w); + p.manualUpdate(); + System.out.println("ParameterServer: Updated!"); + + s.close(); + } catch (IOException | ClassNotFoundException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[update]: closed."); + } else { + System.out.println("ParameterServer[update]: got Error!"); + e.printStackTrace(); + } + } + } + } + + public ParameterServer(DistNet net, int listenPort, int castPort ) { + p = net; + this.listenPort = listenPort; + this.castPort = castPort; + threads = new Thread[2]; + } + + public void stopServer() { + stopSign = true; + try { + updateSocket.close(); + castSocket.close(); + threads[0].join(); + threads[1].join(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + } + + public void startServer() throws IOException { + updateSocket = new ServerSocket(listenPort); + castSocket = new ServerSocket(castPort); + + // broadcast socket + threads[0] = new Thread(new Runnable() { + + @Override + public void run() { + while(!stopSign) { + try { + Socket a = castSocket.accept(); + new BroadcastThread(a).start(); + } catch (IOException e) { + e.printStackTrace(); + } + + + /* + try { + Socket a = castSocket.accept(); + synchronized (lock) { + ObjectOutputStream os = new ObjectOutputStream(a.getOutputStream()); + os.writeObject(p.getWeights()); + } + System.out.println("ParameterServer: sent!"); + a.close(); + } catch (IOException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[broadcast]: closed."); + } else { + System.out.println("ParameterServer[broadcast]: got Error!"); + e.printStackTrace(); + } + } + */ + } + } + }); + threads[0].start(); + + // update socket + threads[1] = new Thread(new Runnable() { + + @Override + public void run() { + // TODO Auto-generated method stub + while(!stopSign) { + try { + Socket a = updateSocket.accept(); + new UpdateThread(a).start(); + } catch (IOException e) { + e.printStackTrace(); + } + /* + try { + Socket a = updateSocket.accept(); + synchronized (lock) { + ObjectInputStream is = new ObjectInputStream(a.getInputStream()); + List w = (List) is.readObject(); + p.setGradients(w); + p.manualUpdate(); + System.out.println("ParameterServer: Updated!"); + } + a.close(); + } catch (IOException | ClassNotFoundException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[update]: closed."); + } else { + System.out.println("ParameterServer[update]: got Error!"); + e.printStackTrace(); + } + } + */ + } + } + }); + threads[1].start(); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/ParameterWorkerServer.java b/src/main/java/org/acl/deepspark/nn/async/ParameterWorkerServer.java index ddc3225..216d916 100644 --- a/src/main/java/org/acl/deepspark/nn/async/ParameterWorkerServer.java +++ b/src/main/java/org/acl/deepspark/nn/async/ParameterWorkerServer.java @@ -1,105 +1,105 @@ -package org.acl.deepspark.nn.async; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.List; - -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.nn.DistNet; - -public class ParameterWorkerServer { - private DistNet p; - private int listenPort; - private int castPort; - private ServerSocket updateSocket; - private ServerSocket castSocket; - - private boolean stopSign = false; - private final Object lock = new Object(); - - private Thread[] threads; - - public ParameterWorkerServer(DistNet net, int listenPort, int castPort ) { - p = net; - this.listenPort = listenPort; - this.castPort = castPort; - threads = new Thread[2]; - } - - public void stopServer() { - stopSign = true; - try { - updateSocket.close(); - castSocket.close(); - threads[0].join(); - threads[1].join(); - } catch (IOException | InterruptedException e) { - e.printStackTrace(); - } - } - - public void startServer() throws IOException { - updateSocket = new ServerSocket(listenPort); - castSocket = new ServerSocket(castPort); - - // broadcast socket - threads[0] = new Thread(new Runnable() { - - @Override - public void run() { - while(!stopSign) { - try { - Socket a = castSocket.accept(); - synchronized (lock) { - ObjectOutputStream os = new ObjectOutputStream(a.getOutputStream()); - os.writeObject(p.getWeights()); - } - System.out.println("ParameterServer: sent!"); - a.close(); - } catch (IOException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[broadcast]: closed."); - } else { - System.out.println("ParameterServer[broadcast]: got Error!"); - e.printStackTrace(); - } - } - } - } - }); - threads[0].start(); - - // update socket - threads[1] = new Thread(new Runnable() { - - @Override - public void run() { - // TODO Auto-generated method stub - while(!stopSign) { - try { - Socket a = updateSocket.accept(); - synchronized (lock) { - ObjectInputStream is = new ObjectInputStream(a.getInputStream()); - List w = (List) is.readObject(); - p.setGradients(w); - p.manualUpdate(); - System.out.println("ParameterServer: Updated!"); - } - a.close(); - } catch (IOException | ClassNotFoundException | RuntimeException e) { - if(stopSign) { - System.out.println("ParameterServer[update]: closed."); - } else { - System.out.println("ParameterServer[update]: got Error!"); - e.printStackTrace(); - } - } - } - } - }); - threads[1].start(); - } -} +package org.acl.deepspark.nn.async; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.List; + +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; + +public class ParameterWorkerServer { + private DistNet p; + private int listenPort; + private int castPort; + private ServerSocket updateSocket; + private ServerSocket castSocket; + + private boolean stopSign = false; + private final Object lock = new Object(); + + private Thread[] threads; + + public ParameterWorkerServer(DistNet net, int listenPort, int castPort ) { + p = net; + this.listenPort = listenPort; + this.castPort = castPort; + threads = new Thread[2]; + } + + public void stopServer() { + stopSign = true; + try { + updateSocket.close(); + castSocket.close(); + threads[0].join(); + threads[1].join(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + } + + public void startServer() throws IOException { + updateSocket = new ServerSocket(listenPort); + castSocket = new ServerSocket(castPort); + + // broadcast socket + threads[0] = new Thread(new Runnable() { + + @Override + public void run() { + while(!stopSign) { + try { + Socket a = castSocket.accept(); + synchronized (lock) { + ObjectOutputStream os = new ObjectOutputStream(a.getOutputStream()); + os.writeObject(p.getWeights()); + } + System.out.println("ParameterServer: sent!"); + a.close(); + } catch (IOException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[broadcast]: closed."); + } else { + System.out.println("ParameterServer[broadcast]: got Error!"); + e.printStackTrace(); + } + } + } + } + }); + threads[0].start(); + + // update socket + threads[1] = new Thread(new Runnable() { + + @Override + public void run() { + // TODO Auto-generated method stub + while(!stopSign) { + try { + Socket a = updateSocket.accept(); + synchronized (lock) { + ObjectInputStream is = new ObjectInputStream(a.getInputStream()); + List w = (List) is.readObject(); + p.setGradients(w); + p.manualUpdate(); + System.out.println("ParameterServer: Updated!"); + } + a.close(); + } catch (IOException | ClassNotFoundException | RuntimeException e) { + if(stopSign) { + System.out.println("ParameterServer[update]: closed."); + } else { + System.out.println("ParameterServer[update]: got Error!"); + e.printStackTrace(); + } + } + } + } + }); + threads[1].start(); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/easgd/DistAsyncEASGDSolver.java b/src/main/java/org/acl/deepspark/nn/async/easgd/DistAsyncEASGDSolver.java index 7e01b3d..d2297c0 100644 --- a/src/main/java/org/acl/deepspark/nn/async/easgd/DistAsyncEASGDSolver.java +++ b/src/main/java/org/acl/deepspark/nn/async/easgd/DistAsyncEASGDSolver.java @@ -1,352 +1,525 @@ -package org.acl.deepspark.nn.async.easgd; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.acl.deepspark.data.LMDBWriter; -import org.acl.deepspark.data.Record; -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.utils.DeepSparkConf; -import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataOutputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.function.VoidFunction; - -import caffe.Caffe.SolverParameter.SolverMode; - - -/** - * Created by Jaehong on 2015-07-31. - */ -public class DistAsyncEASGDSolver implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -5070368428661536358L; - - private transient DistNet net; - - private String host; - private int port; - - private float movingRate; - private int decayStep = 0; - private float decayRate = 1; - private int decayLimit = 0; - - private DeepSparkParam param; - - public DistAsyncEASGDSolver(DistNet net, String host, int port, DeepSparkConf.DeepSparkParam param) { - this.net = net; - this.host = host; - this.port = port; - this.param = param; - - movingRate = param.getMovingRate(); - decayStep = param.getDecayStep() / param.getPeriod(); - decayRate = param.getDecayRate(); - decayLimit = param.getDecayLimit(); - } - - private long startTime; - - private void printLog(String mesg) { - System.out.println(String.format("[%s solver]: %s", new Timestamp(System.currentTimeMillis()),mesg)); - } - - private void printLogTime(String mesg) { - System.out.println(String.format("[%f solver]: %s", (float) (System.currentTimeMillis() - startTime ) / 1000, mesg)); - } - - public void train(JavaRDD data, final int numWorker) throws IOException{ - SolverMode mode = net.getSolverSetting().getSolverMode(); - if(mode == SolverMode.GPU) { - printLog("running on GPU..."); - net.setGPU(); - } else { - printLog("running on CPU..."); - net.setCPU(); - } - - net.printLearnableWeightInfo(); - - ParameterEASGDServer server = new ParameterEASGDServer(net, port, numWorker, param); - - server.startServer(); - - final byte[] solverParams = net.getSolverSetting().toByteArray(); - final byte[] netParams = net.getNetConf().toByteArray(); - - final List initialWeight = net.getWeights(); - - startTime = System.currentTimeMillis(); - server.setStartTime(startTime); - printLogTime("Training start..."); - - data.foreachPartition(new VoidFunction>() { - private static final long serialVersionUID = -4641037124928675165L; - - public void call(Iterator samples) throws Exception { - List sampleList = new ArrayList(); - while (samples.hasNext()) - sampleList.add(samples.next()); - - printLog("Local data size: " + sampleList.size()); - - startTime = System.currentTimeMillis(); - // init net - DistNet net = new DistNet(solverParams, netParams); - SolverMode mode = net.getSolverSetting().getSolverMode(); - if(mode == SolverMode.GPU) { - printLog("running on GPU..."); - net.setGPU(); - } else { - printLog("running on CPU..."); - net.setCPU(); - } - - // get initial weight - net.printLearnableWeightInfo(); - net.setWeights(initialWeight); - - int settingSize = sampleList.size(); - int iterLimit = sampleList.size() / net.getBatchSize(); - settingSize -= sampleList.size() % net.getBatchSize(); - - int iteration = net.getIteration(); - int localIter = Math.round((float)iteration / param.getPeriod()); - - printLogTime("iteration : " + localIter * param.getPeriod()); - - int counter = 0; - for (int i = 0; i < localIter; i++) { - if(decayStep > 0 && i !=0 && decayLimit != 0 && - i % decayStep == 0) { - decayLimit--; - movingRate *= decayRate; - printLogTime(String.format("moving rate: %f", movingRate)); - } - - float loss = 0; - long mean_train_time = 0; - - for(int k =0; k < param.getPeriod(); k++) { - if(counter % iterLimit == 0) { // iteration complete - Collections.shuffle(sampleList); - List subSample = sampleList.subList(0, settingSize); - net.setTrainData(net.buildBlobs(subSample)); - } - - long start_train = System.currentTimeMillis(); - float loss_per_iter = net.train(); - loss += loss_per_iter; - long end_tra = System.currentTimeMillis(); - mean_train_time += end_tra -start_train; - - ++counter; - - } - - printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms)", counter, loss / param.getPeriod(), mean_train_time / param.getPeriod())); - - - List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); - net.setWeights(new_weight); - } - } - }); - - printLogTime("Training complete..."); - server.stopServer(); - net.setGPU(); - } - - public void trainWithLMDB(JavaRDD dummydata, String path, final int numWorker) throws IOException{ - SolverMode mode = net.getSolverSetting().getSolverMode(); - if(mode == SolverMode.GPU) { - printLog("running on GPU..."); - net.setGPU(); - } else { - printLog("running on CPU..."); - net.setCPU(); - } - - net.printLearnableWeightInfo(); - - ParameterEASGDServer server = new ParameterEASGDServer(net, port, numWorker, param); - - server.startServer(); - - final byte[] solverParams = net.getSolverSetting().toByteArray(); - final byte[] netParams = net.getNetConf().toByteArray(); - - final List initialWeight = net.getWeights(); - - startTime = System.currentTimeMillis(); - server.setStartTime(startTime); - printLogTime("Training start..."); - - dummydata.foreachPartition(new VoidFunction>() { - private static final long serialVersionUID = -4641037124928675165L; - - public void call(Iterator samples) throws Exception { - System.gc(); - - int id = samples.next(); - printLogTime(String.format("I'm %d", id)); - - - startTime = System.currentTimeMillis(); - // init net - DistNet net = new DistNet(solverParams, netParams); - SolverMode mode = net.getSolverSetting().getSolverMode(); - if(mode == SolverMode.GPU) { - printLog("running on GPU..."); - net.setGPU(); - } else { - printLog("running on CPU..."); - net.setCPU(); - } - - // for represent worker node snapshot - String dirName = null; int tick = 0; - Configuration conf=null; FileSystem fs =null; - if(net.getSolverSetting().hasSnapshot() && id == 0) { - conf = new Configuration(); - fs = FileSystem.get(conf); - tick = net.getSolverSetting().getSnapshot(); - dirName = net.getSolverSetting().getSnapshotPrefix(); - } - - // get initial weight - net.printLearnableWeightInfo(); - net.setWeights(initialWeight); - - int iteration = net.getIteration(); - int localIter = Math.round((float)iteration / param.getPeriod()); - - printLogTime("iteration : " + localIter * param.getPeriod()); - - int counter = 0; - for (int i = 0; i < localIter; i++) { - if(decayStep > 0 && i !=0 && decayLimit != 0 && - i % decayStep == 0) { - decayLimit--; - movingRate *= decayRate; - printLogTime(String.format("moving rate: %f", movingRate)); - } - - float loss = 0; - long mean_train_time = 0; - for(int k =0; k < param.getPeriod(); k++) { - long start_train = System.currentTimeMillis(); - float loss_per_iter = net.trainWithLocal(); - loss += loss_per_iter; - long end_tra = System.currentTimeMillis(); - mean_train_time += end_tra -start_train; - - ++counter; - - // save weights - if(id == 0) { - if(tick != 0 && counter % tick == 0) { - String filename = String.format("%s/state_worker_iter_%d.weight", dirName, counter); - Path path = new Path(filename); - - FSDataOutputStream fin = fs.create(path); - ObjectOutputStream out = new ObjectOutputStream(fin); - out.writeObject(net.getWeights()); - out.close(); - printLogTime(String.format("%s saved..",filename)); - } - } - } - - printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms)", counter, loss / param.getPeriod(), mean_train_time / param.getPeriod())); - - - List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); - net.setWeights(new_weight); - } - } - }); - - printLogTime("Training complete..."); - server.stopServer(); - net.setGPU(); - } - - public float[] test(List data) { - net.setTestData(net.buildBlobs(data)); - return net.test(); - } - - public float[] testWithLMDB() { - return net.testWithLMDB(); - } - - public void saveWeight(String pathString) throws FileNotFoundException, IOException { - Configuration conf = new Configuration(); - FileSystem fs = FileSystem.get(conf); - Path path = new Path(pathString); - - FSDataOutputStream fin = fs.create(path); - ObjectOutputStream out = new ObjectOutputStream(fin); - out.writeObject(net.getWeights()); - out.close(); - } - - public void prepareLocal(JavaRDD data, final String output, int workerSize) { - JavaRDD reparted_data = data.repartition(workerSize); - - reparted_data.foreach(new VoidFunction() { - transient int count; - transient LMDBWriter dbWriter; - - private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { - System.gc(); - in.defaultReadObject(); - File dir = new File(output); - if(dir.mkdirs()) - printLog("mkdir successfully done..."); - - dbWriter = new LMDBWriter(output, 1000); - count = 0; - } - - @Override - public void call(Record arg0) throws Exception { - dbWriter.putSample(arg0); - - if((++count % 1000) == 0) { - printLog(String.format("%d images saved...", count)); - } - } - - @Override - public void finalize() { - try { - dbWriter.closeLMDB(); - } catch(Exception e) { - e.printStackTrace(); - } - - printLog(String.format("Total %d images saved...", count)); - } - }); - } -} +package org.acl.deepspark.nn.async.easgd; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.acl.deepspark.data.ByteRecord; +import org.acl.deepspark.data.LMDBWriter; +import org.acl.deepspark.data.Record; +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.utils.DeepSparkConf; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.function.VoidFunction; + +import caffe.Caffe.SolverParameter.SolverMode; + + +/** + * Created by Jaehong on 2015-07-31. + */ +public class DistAsyncEASGDSolver implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -5070368428661536358L; + + private transient DistNet net; + + private String host; + private int port; + + private float movingRate; + private int decayStep = 0; + private float decayRate = 1; + private int decayLimit = 0; + + private DeepSparkParam param; + + public DistAsyncEASGDSolver(DistNet net, String host, int port, DeepSparkConf.DeepSparkParam param) { + this.net = net; + this.host = host; + this.port = port; + this.param = param; + + movingRate = param.getMovingRate(); + decayStep = param.getDecayStep() / param.getPeriod(); + decayRate = param.getDecayRate(); + decayLimit = param.getDecayLimit(); + } + + private long startTime; + + private void printLog(String mesg) { + System.out.println(String.format("[%s solver]: %s", new Timestamp(System.currentTimeMillis()),mesg)); + } + + private void printLogTime(String mesg) { + System.out.println(String.format("[%f solver]: %s", (float) (System.currentTimeMillis() - startTime ) / 1000, mesg)); + } + + public void train(JavaRDD data, final int numWorker) throws IOException{ + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + net.printLearnableWeightInfo(); + + ParameterEASGDServer server = new ParameterEASGDServer(net, port, numWorker, param); + + server.startServer(); + + final byte[] solverParams = net.getSolverSetting().toByteArray(); + final byte[] netParams = net.getNetConf().toByteArray(); + + final List initialWeight = net.getWeights(); + + startTime = System.currentTimeMillis(); + server.setStartTime(startTime); + printLogTime("Training start..."); + + data.foreachPartition(new VoidFunction>() { + private static final long serialVersionUID = -4641037124928675165L; + + public void call(Iterator samples) throws Exception { + List sampleList = new ArrayList(); + while (samples.hasNext()) + sampleList.add(samples.next()); + + printLog("Local data size: " + sampleList.size()); + + startTime = System.currentTimeMillis(); + // init net + DistNet net = new DistNet(solverParams, netParams); + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + // get initial weight + net.printLearnableWeightInfo(); + net.setWeights(initialWeight); + + int settingSize = sampleList.size(); + int iterLimit = sampleList.size() / net.getBatchSize(); + settingSize -= sampleList.size() % net.getBatchSize(); + + int iteration = net.getIteration(); + int localIter = Math.round((float)iteration / param.getPeriod()); + + printLogTime("iteration : " + localIter * param.getPeriod()); + + int counter = 0; + for (int i = 0; i < localIter; i++) { + if(decayStep > 0 && i !=0 && decayLimit != 0 && + i % decayStep == 0) { + decayLimit--; + movingRate *= decayRate; + printLogTime(String.format("moving rate: %f", movingRate)); + } + + float loss = 0; + long mean_train_time = 0; + + for(int k =0; k < param.getPeriod(); k++) { + if(counter % iterLimit == 0) { // iteration complete + Collections.shuffle(sampleList); + List subSample = sampleList.subList(0, settingSize); + net.setTrainData(net.buildBlobs(subSample)); + } + + long start_train = System.currentTimeMillis(); + float loss_per_iter = net.train(); + loss += loss_per_iter; + long end_tra = System.currentTimeMillis(); + mean_train_time += end_tra -start_train; + + ++counter; + + } + + printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms)", counter, loss / param.getPeriod(), mean_train_time / param.getPeriod())); + + + List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); + net.setWeights(new_weight); + } + } + }); + + printLogTime("Training complete..."); + server.stopServer(); + net.setGPU(); + } + + public void trainWithLMDB(JavaRDD dummydata, String path, final int numWorker) throws IOException{ + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + net.printLearnableWeightInfo(); + + ParameterEASGDServer server = new ParameterEASGDServer(net, port, numWorker, param); + + server.startServer(); + + final byte[] solverParams = net.getSolverSetting().toByteArray(); + final byte[] netParams = net.getNetConf().toByteArray(); + + final List initialWeight = net.getWeights(); + + startTime = System.currentTimeMillis(); + server.setStartTime(startTime); + printLogTime("Training start..."); + + dummydata.foreachPartition(new VoidFunction>() { + private static final long serialVersionUID = -4641037124928675165L; + + public void call(Iterator samples) throws Exception { + System.gc(); + + int id = samples.next(); + printLogTime(String.format("I'm %d", id)); + + + startTime = System.currentTimeMillis(); + // init net + DistNet net = new DistNet(solverParams, netParams); + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + // for represent worker node snapshot + String dirName = null; int tick = 0; + Configuration conf=null; FileSystem fs =null; + if(net.getSolverSetting().hasSnapshot() && id == 0) { + conf = new Configuration(); + fs = FileSystem.get(conf); + tick = net.getSolverSetting().getSnapshot(); + dirName = net.getSolverSetting().getSnapshotPrefix(); + } + + // get initial weight + net.printLearnableWeightInfo(); + net.setWeights(initialWeight); + + int iteration = net.getIteration(); + int localIter = Math.round((float)iteration / param.getPeriod()); + + printLogTime("iteration : " + localIter * param.getPeriod()); + + int counter = 0; + for (int i = 0; i < localIter; i++) { + if(decayStep > 0 && i !=0 && decayLimit != 0 && + i % decayStep == 0) { + decayLimit--; + movingRate *= decayRate; + printLogTime(String.format("moving rate: %f", movingRate)); + } + + float loss = 0; + long mean_train_time = 0; + for(int k =0; k < param.getPeriod(); k++) { + long start_train = System.currentTimeMillis(); + float loss_per_iter = net.trainWithLocal(); + loss += loss_per_iter; + long end_tra = System.currentTimeMillis(); + mean_train_time += end_tra -start_train; + + ++counter; + + // save weights + if(id == 0) { + if(tick != 0 && counter % tick == 0) { + String filename = String.format("%s/state_worker_iter_%d.weight", dirName, counter); + Path path = new Path(filename); + + FSDataOutputStream fin = fs.create(path); + ObjectOutputStream out = new ObjectOutputStream(fin); + out.writeObject(net.getWeights()); + out.close(); + printLogTime(String.format("%s saved..",filename)); + } + } + } + + printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms)", counter, loss / param.getPeriod(), mean_train_time / param.getPeriod())); + + + List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); + net.setWeights(new_weight); + } + } + }); + + printLogTime("Training complete..."); + server.stopServer(); + net.setGPU(); + } + + public void trainWithLMDBVarTau(JavaRDD dummydata, String path, final int numWorker) throws IOException{ + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + net.printLearnableWeightInfo(); + + ParameterEASGDServer server = new ParameterEASGDServer(net, port, numWorker, param); + + server.startServer(); + + final byte[] solverParams = net.getSolverSetting().toByteArray(); + final byte[] netParams = net.getNetConf().toByteArray(); + + final List initialWeight = net.getWeights(); + + startTime = System.currentTimeMillis(); + server.setStartTime(startTime); + printLogTime("Training start..."); + + dummydata.foreachPartition(new VoidFunction>() { + private static final long serialVersionUID = -4641037124928675165L; + + public void call(Iterator samples) throws Exception { + System.gc(); + + int id = samples.next(); + printLogTime(String.format("I'm %d", id)); + + + startTime = System.currentTimeMillis(); + // init net + DistNet net = new DistNet(solverParams, netParams); + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + printLog("running on GPU..."); + net.setGPU(); + } else { + printLog("running on CPU..."); + net.setCPU(); + } + + // for represent worker node snapshot + String dirName = null; int tick = 0; + Configuration conf=null; FileSystem fs =null; + if(net.getSolverSetting().hasSnapshot() && id == 0) { + conf = new Configuration(); + fs = FileSystem.get(conf); + tick = net.getSolverSetting().getSnapshot(); + dirName = net.getSolverSetting().getSnapshotPrefix(); + } + + // get initial weight + net.printLearnableWeightInfo(); + net.setWeights(initialWeight); + + int iteration = net.getIteration(); + + float lossCut = -1.0f; + float lossCum = 0.0f; + long mean_train_time = 0; + int counter = 0, lastCounter = 0; + + for(int i =0; i < iteration; i++) { + if(decayStep > 0 && i !=0 && decayLimit != 0 && + i % decayStep == 0) { + decayLimit--; + movingRate *= decayRate; + printLogTime(String.format("moving rate: %f", movingRate)); + } + + counter++; + long start_train = System.currentTimeMillis(); + float loss_per_iter = net.trainWithLocal(); + long end_tra = System.currentTimeMillis(); + mean_train_time += end_tra -start_train; + lossCum += loss_per_iter; + + // save weights + if(id == 0) { + if(tick != 0 && counter % tick == 0) { + String filename = String.format("%s/state_worker_iter_%d.weight", dirName, counter); + Path path = new Path(filename); + + FSDataOutputStream fin = fs.create(path); + ObjectOutputStream out = new ObjectOutputStream(fin); + out.writeObject(net.getWeights()); + out.close(); + printLogTime(String.format("%s saved..",filename)); + } + } + + //initial lossCut set + if(counter == param.getPeriod() ) { + lossCut = lossCum; + printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms) for %d iterations", counter, lossCum / param.getPeriod(), mean_train_time / param.getPeriod(), param.getPeriod())); + List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); + net.setWeights(new_weight); + mean_train_time = 0; + lossCum = 0; + lastCounter = counter; + } + + // when lossCum meets lossCut + if(lossCut > 0 && lossCut < lossCum ) { + printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms) for %d iterations", counter, lossCum / (counter - lastCounter), mean_train_time / (counter - lastCounter),(counter - lastCounter))); + List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); + net.setWeights(new_weight); + mean_train_time = 0; + lossCum = 0; + lastCounter = counter; + } + } + + // final update + if(lastCounter != counter) { + printLogTime(String.format("%d th iteration, loss: %f (mean time: %d ms) for %d iterations", counter, lossCum / (counter - lastCounter), mean_train_time / (counter - lastCounter),(counter - lastCounter))); + List new_weight = ParameterEASGDClient.exchangeWeight(host, port, net.getWeights(), movingRate); + net.setWeights(new_weight); + } + } + }); + + printLogTime("Training complete..."); + server.stopServer(); + net.setGPU(); + } + public float[] test(List data) { + net.setTestData(net.buildBlobs(data)); + return net.test(); + } + + public float[] testWithLMDB() { + return net.testWithLMDB(); + } + + public void saveWeight(String pathString) throws FileNotFoundException, IOException { + Configuration conf = new Configuration(); + FileSystem fs = FileSystem.get(conf); + Path path = new Path(pathString); + + FSDataOutputStream fin = fs.create(path); + ObjectOutputStream out = new ObjectOutputStream(fin); + out.writeObject(net.getWeights()); + out.close(); + } + + public void prepareLocal(JavaRDD data, final String output, int workerSize) { + JavaRDD reparted_data = data.repartition(workerSize); + + reparted_data.foreach(new VoidFunction() { + transient int count; + transient LMDBWriter dbWriter; + + private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { + System.gc(); + in.defaultReadObject(); + File dir = new File(output); + if(dir.mkdirs()) + printLog("mkdir successfully done..."); + + dbWriter = new LMDBWriter(output, 1000); + count = 0; + } + + @Override + public void call(Record arg0) throws Exception { + dbWriter.putSample(arg0); + + if((++count % 1000) == 0) { + printLog(String.format("%d images saved...", count)); + } + } + + @Override + public void finalize() { + try { + dbWriter.closeLMDB(); + } catch(Exception e) { + e.printStackTrace(); + } + + printLog(String.format("Total %d images saved...", count)); + } + }); + } + + public void prepareLocalByte(JavaRDD data, final String output, int workerSize) { + JavaRDD reparted_data = data.repartition(workerSize); + + reparted_data.foreach(new VoidFunction() { + transient int count; + transient LMDBWriter dbWriter; + + private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { + System.gc(); + in.defaultReadObject(); + File dir = new File(output); + if(dir.mkdirs()) + printLog("mkdir successfully done..."); + + dbWriter = new LMDBWriter(output, 1000); + count = 0; + } + + @Override + public void call(ByteRecord arg0) throws Exception { + dbWriter.putSample(arg0); + + if((++count % 1000) == 0) { + printLog(String.format("%d images saved...", count)); + } + } + + @Override + public void finalize() { + try { + dbWriter.closeLMDB(); + } catch(Exception e) { + e.printStackTrace(); + } + + printLog(String.format("Total %d images saved...", count)); + } + }); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDClient.java b/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDClient.java index 6e86eb6..bf1487c 100644 --- a/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDClient.java +++ b/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDClient.java @@ -1,38 +1,38 @@ -package org.acl.deepspark.nn.async.easgd; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.Socket; -import java.util.List; - -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.utils.WeightUtil; - -public class ParameterEASGDClient { - public static List exchangeWeight(String host, int port, List client_w, float coeff) throws IOException, ClassNotFoundException { - long start = System.currentTimeMillis(); - Socket s = new Socket(host, port); - s.setSoTimeout(1500000); - - ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream()); - ObjectInputStream in = new ObjectInputStream(s.getInputStream()); - - @SuppressWarnings("unchecked") - List server_w = (List) in.readObject(); - System.out.println("client: weight recieved"); - - out.writeObject(client_w); - System.out.println("client: weight sent"); - s.close(); - - - WeightUtil.scalarMult(server_w, coeff); - WeightUtil.scalarMult(client_w, 1.0f-coeff); - WeightUtil.addFromTo(server_w, client_w); - - long end = System.currentTimeMillis(); - System.out.println(String.format("client: weight exchanged (%d ms)", end-start)); - return client_w; - } -} +package org.acl.deepspark.nn.async.easgd; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.Socket; +import java.util.List; + +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.utils.WeightUtil; + +public class ParameterEASGDClient { + public static List exchangeWeight(String host, int port, List client_w, float coeff) throws IOException, ClassNotFoundException { + long start = System.currentTimeMillis(); + Socket s = new Socket(host, port); + s.setSoTimeout(1500000); + + ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream()); + ObjectInputStream in = new ObjectInputStream(s.getInputStream()); + + @SuppressWarnings("unchecked") + List server_w = (List) in.readObject(); + System.out.println("client: weight recieved"); + + out.writeObject(client_w); + System.out.println("client: weight sent"); + s.close(); + + + WeightUtil.scalarMult(server_w, coeff); + WeightUtil.scalarMult(client_w, 1.0f-coeff); + WeightUtil.addFromTo(server_w, client_w); + + long end = System.currentTimeMillis(); + System.out.println(String.format("client: weight exchanged (%d ms)", end-start)); + return client_w; + } +} diff --git a/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDServer.java b/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDServer.java index d8f0b45..230514a 100644 --- a/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDServer.java +++ b/src/main/java/org/acl/deepspark/nn/async/easgd/ParameterEASGDServer.java @@ -1,231 +1,231 @@ -package org.acl.deepspark.nn.async.easgd; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.PrintStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; -import org.acl.deepspark.utils.WeightUtil; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataOutputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; - -public class ParameterEASGDServer { - private DistNet p; - private int listenPort; - private ServerSocket exchangeSocket; - - private boolean stopSign = false; - - private Thread thread; - - private int updateCount = 0; - - private int tick; - private String dirName; - - private long startTime; - - private int testStep; - - private float movingRate; - private float decayRate; - private int decayLimit; - private int decayStep; - - private float serverFactor; - private float factorDecayRate; - private int factorDecayLimit; - private int factorDecayStep; - private PrintStream logStream = null; - - - public void setStartTime(long time) { - startTime = time; - } - - private void printLogTime(String mesg) { - if(logStream == null) - System.out.println(String.format("[%f parameterserver]: %s", (float) (System.currentTimeMillis() - startTime) / 1000 ,mesg)); - else - logStream.println(String.format("[%f parameterserver]: %s", (float) (System.currentTimeMillis() - startTime) / 1000 ,mesg)); - } - - private class EASGDThread implements Runnable { - private Socket s; - - public EASGDThread(Socket s) { - this.s = s; - } - - @Override - public void run() { - try { - ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream()); - ObjectInputStream in = new ObjectInputStream(s.getInputStream()); - - out.writeObject(p.getWeights()); - @SuppressWarnings("unchecked") - List client_w = (List) in.readObject(); - - float eff_rate = movingRate * serverFactor; - printLogTime(String.format("parameter exchanged with coeff %f", eff_rate)); - - // EASGD update - List server_w = p.getWeights(); - - WeightUtil.scalarMult(client_w, eff_rate); - WeightUtil.scalarMult(server_w, 1.0f-eff_rate); - WeightUtil.addFromTo(client_w, server_w); - - p.setWeights(server_w); - - s.close(); - } catch (IOException | RuntimeException e) { - if(stopSign) { - printLogTime("closed."); - } else { - printLogTime("got Error!"); - e.printStackTrace(); - } - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - public ParameterEASGDServer(DistNet net, int listenPort, int numWorker, DeepSparkParam param) { - p = net; - - this.listenPort = listenPort; - this.startTime = System.currentTimeMillis(); - - // snapshot - if(net.getSolverSetting().hasSnapshot()) { - tick = net.getSolverSetting().getSnapshot() * numWorker / param.getPeriod(); - dirName = net.getSolverSetting().getSnapshotPrefix(); - } else { - tick = 0; - } - - // intermediate test - if(p.getSolverSetting().hasTestInterval()) - testStep = p.getSolverSetting().getTestInterval(); - else - testStep = 0; - - // moving rate, alpha - movingRate = param.getMovingRate(); - decayLimit = param.getDecayLimit(); - decayRate = param.getDecayRate(); - decayStep = param.getDecayStep() * numWorker / param.getPeriod(); - - // server factor - serverFactor = param.getServerFactor(); - factorDecayLimit = param.getFactorDecayLimit(); - factorDecayRate = param.getFactorDecayRate(); - factorDecayStep = param.getFactorDecayStep() * numWorker / param.getPeriod(); - } - - public void stopServer() { - stopSign = true; - try { - exchangeSocket.close(); - thread.join(); - logStream.close(); - } catch (IOException | InterruptedException e) { - e.printStackTrace(); - } - - } - - public void startServer() throws IOException { - exchangeSocket = new ServerSocket(listenPort); - - // exchange Thread - thread = new Thread(new Runnable() { - ExecutorService connectionService; - - @Override - public void run() { - connectionService = Executors.newFixedThreadPool(8); - try { - Configuration conf = new Configuration(); - FileSystem fs; - fs = FileSystem.get(conf); - - // param log init - if(dirName != null) { - String logfile = String.format("%s/log.txt", dirName); - Path path = new Path(logfile); - FSDataOutputStream fin = fs.create(path); - logStream = new PrintStream(fin); - } - - while(!stopSign) { - Socket a = exchangeSocket.accept(); - connectionService.execute(new EASGDThread(a)); - - updateCount++; - - // intermediate test - if(testStep != 0 && updateCount % testStep == 0) { - float[] acc = p.testWithLMDB(); - for(int i = 0;i < acc.length;i++) { - printLogTime(String.format("test at iteration %d, acc[%d] = %f", updateCount, i, acc[i])); - } - } - - - // decay moving rate - if(decayStep > 0 && decayLimit != 0 && updateCount % decayStep == 0 ) { - decayLimit--; - movingRate *= decayRate; - printLogTime(String.format("moving rate: %f", movingRate)); - } - - // decay server factor - if(factorDecayStep > 0 && factorDecayLimit != 0 && updateCount % factorDecayStep == 0 ) { - factorDecayLimit--; - serverFactor *= factorDecayRate; - printLogTime(String.format("server factor : %f", serverFactor)); - } - - if(tick != 0 && updateCount % tick == 0) { - String filename = String.format("%s/state_iter_%d.weight", dirName, updateCount); - Path path = new Path(filename); - - FSDataOutputStream fin = fs.create(path); - ObjectOutputStream out = new ObjectOutputStream(fin); - out.writeObject(p.getWeights()); - out.close(); - printLogTime(String.format("%s saved..",filename)); - } - } - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - - connectionService.shutdown(); - while (!connectionService.isTerminated()) { - } - } - }); - thread.start(); - } - - public int getUpdateCount() { - return updateCount; - } -} +package org.acl.deepspark.nn.async.easgd; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.PrintStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.acl.deepspark.utils.WeightUtil; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +public class ParameterEASGDServer { + private DistNet p; + private int listenPort; + private ServerSocket exchangeSocket; + + private boolean stopSign = false; + + private Thread thread; + + private int updateCount = 0; + + private int tick; + private String dirName; + + private long startTime; + + private int testStep; + + private float movingRate; + private float decayRate; + private int decayLimit; + private int decayStep; + + private float serverFactor; + private float factorDecayRate; + private int factorDecayLimit; + private int factorDecayStep; + private PrintStream logStream = null; + + + public void setStartTime(long time) { + startTime = time; + } + + private void printLogTime(String mesg) { + if(logStream == null) + System.out.println(String.format("[%f parameterserver]: %s", (float) (System.currentTimeMillis() - startTime) / 1000 ,mesg)); + else + logStream.println(String.format("[%f parameterserver]: %s", (float) (System.currentTimeMillis() - startTime) / 1000 ,mesg)); + } + + private class EASGDThread implements Runnable { + private Socket s; + + public EASGDThread(Socket s) { + this.s = s; + } + + @Override + public void run() { + try { + ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream()); + ObjectInputStream in = new ObjectInputStream(s.getInputStream()); + + out.writeObject(p.getWeights()); + @SuppressWarnings("unchecked") + List client_w = (List) in.readObject(); + + float eff_rate = movingRate * serverFactor; + printLogTime(String.format("parameter exchanged with coeff %f", eff_rate)); + + // EASGD update + List server_w = p.getWeights(); + + WeightUtil.scalarMult(client_w, eff_rate); + WeightUtil.scalarMult(server_w, 1.0f-eff_rate); + WeightUtil.addFromTo(client_w, server_w); + + p.setWeights(server_w); + + s.close(); + } catch (IOException | RuntimeException e) { + if(stopSign) { + printLogTime("closed."); + } else { + printLogTime("got Error!"); + e.printStackTrace(); + } + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public ParameterEASGDServer(DistNet net, int listenPort, int numWorker, DeepSparkParam param) { + p = net; + + this.listenPort = listenPort; + this.startTime = System.currentTimeMillis(); + + // snapshot + if(net.getSolverSetting().hasSnapshot()) { + tick = net.getSolverSetting().getSnapshot() * numWorker / param.getPeriod(); + dirName = net.getSolverSetting().getSnapshotPrefix(); + } else { + tick = 0; + } + + // intermediate test + if(p.getSolverSetting().hasTestInterval()) + testStep = p.getSolverSetting().getTestInterval(); + else + testStep = 0; + + // moving rate, alpha + movingRate = param.getMovingRate(); + decayLimit = param.getDecayLimit(); + decayRate = param.getDecayRate(); + decayStep = param.getDecayStep() * numWorker / param.getPeriod(); + + // server factor + serverFactor = param.getServerFactor(); + factorDecayLimit = param.getFactorDecayLimit(); + factorDecayRate = param.getFactorDecayRate(); + factorDecayStep = param.getFactorDecayStep() * numWorker / param.getPeriod(); + } + + public void stopServer() { + stopSign = true; + try { + exchangeSocket.close(); + thread.join(); + logStream.close(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + + } + + public void startServer() throws IOException { + exchangeSocket = new ServerSocket(listenPort); + + // exchange Thread + thread = new Thread(new Runnable() { + ExecutorService connectionService; + + @Override + public void run() { + connectionService = Executors.newFixedThreadPool(8); + try { + Configuration conf = new Configuration(); + FileSystem fs; + fs = FileSystem.get(conf); + + // param log init + if(dirName != null) { + String logfile = String.format("%s/log.txt", dirName); + Path path = new Path(logfile); + FSDataOutputStream fin = fs.create(path); + logStream = new PrintStream(fin); + } + + while(!stopSign) { + Socket a = exchangeSocket.accept(); + connectionService.execute(new EASGDThread(a)); + + updateCount++; + + // intermediate test + if(testStep != 0 && updateCount % testStep == 0) { + float[] acc = p.testWithLMDB(); + for(int i = 0;i < acc.length;i++) { + printLogTime(String.format("test at iteration %d, acc[%d] = %f", updateCount, i, acc[i])); + } + } + + + // decay moving rate + if(decayStep > 0 && decayLimit != 0 && updateCount % decayStep == 0 ) { + decayLimit--; + movingRate *= decayRate; + printLogTime(String.format("moving rate: %f", movingRate)); + } + + // decay server factor + if(factorDecayStep > 0 && factorDecayLimit != 0 && updateCount % factorDecayStep == 0 ) { + factorDecayLimit--; + serverFactor *= factorDecayRate; + printLogTime(String.format("server factor : %f", serverFactor)); + } + + if(tick != 0 && updateCount % tick == 0) { + String filename = String.format("%s/state_iter_%d.weight", dirName, updateCount); + Path path = new Path(filename); + + FSDataOutputStream fin = fs.create(path); + ObjectOutputStream out = new ObjectOutputStream(fin); + out.writeObject(p.getWeights()); + out.close(); + printLogTime(String.format("%s saved..",filename)); + } + } + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + connectionService.shutdown(); + while (!connectionService.isTerminated()) { + } + } + }); + thread.start(); + } + + public int getUpdateCount() { + return updateCount; + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncCIFARTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncCIFARTest.java index a0c60cc..75cb234 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/AsyncCIFARTest.java +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncCIFARTest.java @@ -1,56 +1,56 @@ -package org.acl.deepspark.nn.driver; - -import java.net.InetAddress; -import java.util.Arrays; -import java.util.Date; - -import org.acl.deepspark.data.Record; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.utils.CIFARLoader; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; - -/** - * Created by Jaehong on 2015-09-08. - */ -public class AsyncCIFARTest { - public static void main(String[] args) throws Exception { - SparkConf conf = new SparkConf().setAppName("AsyncCIFARTest") - .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - - JavaSparkContext sc = new JavaSparkContext(conf); - - System.out.println("Data Loading..."); - Record[] train_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/train_batch.txt", true); - Record[] test_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/test_batch.txt", true); - - int numExecutors = conf.getInt("spark.executor.instances", -1); - System.out.println("number of executors = " + numExecutors); - JavaRDD train_data; - if(numExecutors != -1) - train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); - else - train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); - - DistNet net = new DistNet(args[0], args[1]); - - String serverHost = InetAddress.getLocalHost().getHostAddress(); - final int[] port = new int[] {10020, 10021}; - System.out.println("ParameterServer host: " + serverHost); - DistAsyncNeuralNetRunner driver = new DistAsyncNeuralNetRunner(net, serverHost, port, Integer.parseInt(args[2])); - driver.test(Arrays.asList(test_sample)); - - System.out.println("Start Learning..."); - Date startTime = new Date(); - driver.train(train_data); - sc.close(); - - Date endTime = new Date(); - float[] res = driver.test(Arrays.asList(test_sample)); - - long time = endTime.getTime() - startTime.getTime(); - System.out.println(String.format("Training time: %f secs", (double) time / 1000)); - System.out.println(String.format("Accuracy: %f ", res[0])); - } -} +package org.acl.deepspark.nn.driver; + +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.Record; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.utils.CIFARLoader; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; + +/** + * Created by Jaehong on 2015-09-08. + */ +public class AsyncCIFARTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncCIFARTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + System.out.println("Data Loading..."); + Record[] train_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/train_batch.txt", true); + Record[] test_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/test_batch.txt", true); + + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + JavaRDD train_data; + if(numExecutors != -1) + train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); + else + train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); + + DistNet net = new DistNet(args[0], args[1]); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int[] port = new int[] {10020, 10021}; + System.out.println("ParameterServer host: " + serverHost); + DistAsyncNeuralNetRunner driver = new DistAsyncNeuralNetRunner(net, serverHost, port, Integer.parseInt(args[2])); + driver.test(Arrays.asList(test_sample)); + + System.out.println("Start Learning..."); + Date startTime = new Date(); + driver.train(train_data); + sc.close(); + + Date endTime = new Date(); + float[] res = driver.test(Arrays.asList(test_sample)); + + long time = endTime.getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + System.out.println(String.format("Accuracy: %f ", res[0])); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDCIFARLocalTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDCIFARLocalTest.java index d8de128..4ca647d 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDCIFARLocalTest.java +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDCIFARLocalTest.java @@ -1,91 +1,91 @@ -package org.acl.deepspark.nn.driver; - -import java.io.File; -import java.net.InetAddress; -import java.util.Arrays; -import java.util.Date; - -import org.acl.deepspark.data.LMDBWriter; -import org.acl.deepspark.data.Record; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; -import org.acl.deepspark.utils.CIFARLoader; -import org.acl.deepspark.utils.DeepSparkParamLoader; -import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; - -/** - * Created by Hanjoo on 2016-01-13. - */ -public class AsyncEASGDCIFARLocalTest { - public static void main(String[] args) throws Exception { - SparkConf conf = new SparkConf().setAppName("AsyncCIFARTest") - .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - - JavaSparkContext sc = new JavaSparkContext(conf); - - DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); - System.out.println("Data Loading..."); - Record[] train_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/train_batch.txt", false); - Record[] test_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/test_batch.txt", false); - - int numExecutors = conf.getInt("spark.executor.instances", -1); - System.out.println("number of executors = " + numExecutors); - JavaRDD train_data,test_data; - if(numExecutors != -1) { - train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); - test_data= sc.parallelize(Arrays.asList(test_sample), numExecutors).cache(); - } else { - train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); - test_data= sc.parallelize(Arrays.asList(test_sample)).cache(); - } - - File trainFile = new File("cifar10_train_lmdb"); - trainFile.mkdirs(); - File testFile = new File("cifar10_test_lmdb"); - testFile.mkdirs(); - - LMDBWriter trainWriter = new LMDBWriter("cifar10_train_lmdb"); - for(int i = 0; i < train_sample.length; i++) { - trainWriter.putSample(train_sample[i]); - } - trainWriter.closeLMDB(); - - LMDBWriter testWriter = new LMDBWriter("cifar10_test_lmdb"); - for(int i = 0; i < test_sample.length; i++) { - testWriter.putSample(test_sample[i]); - } - testWriter.closeLMDB(); - - Integer[] tempkey = new Integer[numExecutors]; - for(int i = 0; i < tempkey.length; i++) - tempkey[i] = i; - - JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors).cache(); - - DistNet net = new DistNet(args[0], args[1]); - - String serverHost = InetAddress.getLocalHost().getHostAddress(); - final int port = 10020; - System.out.println("ParameterServer host: " + serverHost); - DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); - - driver.prepareLocal(train_data, "cifar10_train_lmdb", numExecutors); - driver.prepareLocal(test_data, "cifar10_test_lmdb", numExecutors); - - System.out.println("Start Learning..."); - Date startTime = new Date(); - - driver.trainWithLMDB(rddkey, null, numExecutors); - sc.close(); - Date endTime = new Date(); - - driver.saveWeight("final_cifar.weight"); - float[] a = driver.testWithLMDB(); - long time = endTime.getTime() - startTime.getTime(); - System.out.println(String.format("Training time: %f secs", (double) time / 1000)); - System.out.println(String.format("Accuracy: %f ", a[0])); - } -} +package org.acl.deepspark.nn.driver; + +import java.io.File; +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.LMDBWriter; +import org.acl.deepspark.data.Record; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; +import org.acl.deepspark.utils.CIFARLoader; +import org.acl.deepspark.utils.DeepSparkParamLoader; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; + +/** + * Created by Hanjoo on 2016-01-13. + */ +public class AsyncEASGDCIFARLocalTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncCIFARTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); + System.out.println("Data Loading..."); + Record[] train_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/train_batch.txt", false); + Record[] test_sample = CIFARLoader.loadFromHDFSText("/data/CIFAR-10/test_batch.txt", false); + + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + JavaRDD train_data,test_data; + if(numExecutors != -1) { + train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); + test_data= sc.parallelize(Arrays.asList(test_sample), numExecutors).cache(); + } else { + train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); + test_data= sc.parallelize(Arrays.asList(test_sample)).cache(); + } + + File trainFile = new File("cifar10_train_lmdb"); + trainFile.mkdirs(); + File testFile = new File("cifar10_test_lmdb"); + testFile.mkdirs(); + + LMDBWriter trainWriter = new LMDBWriter("cifar10_train_lmdb"); + for(int i = 0; i < train_sample.length; i++) { + trainWriter.putSample(train_sample[i]); + } + trainWriter.closeLMDB(); + + LMDBWriter testWriter = new LMDBWriter("cifar10_test_lmdb"); + for(int i = 0; i < test_sample.length; i++) { + testWriter.putSample(test_sample[i]); + } + testWriter.closeLMDB(); + + Integer[] tempkey = new Integer[numExecutors]; + for(int i = 0; i < tempkey.length; i++) + tempkey[i] = i; + + JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors).cache(); + + DistNet net = new DistNet(args[0], args[1]); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int port = 10020; + System.out.println("ParameterServer host: " + serverHost); + DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); + + driver.prepareLocal(train_data, "cifar10_train_lmdb", numExecutors); + driver.prepareLocal(test_data, "cifar10_test_lmdb", numExecutors); + + System.out.println("Start Learning..."); + Date startTime = new Date(); + + driver.trainWithLMDB(rddkey, null, numExecutors); + sc.close(); + Date endTime = new Date(); + + driver.saveWeight("final_cifar.weight"); + // float[] a = driver.testWithLMDB(); + long time = endTime.getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + //System.out.println(String.format("Accuracy: %f ", a[0])); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetTest.java index dcd96c9..bc7a80f 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetTest.java +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetTest.java @@ -1,80 +1,80 @@ -package org.acl.deepspark.nn.driver; - -import java.net.InetAddress; -import java.util.Arrays; -import java.util.Date; - -import org.acl.deepspark.data.Record; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; -import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; -import org.acl.deepspark.utils.DeepSparkParamLoader; -import org.apache.hadoop.io.ArrayPrimitiveWritable; -import org.apache.hadoop.io.FloatWritable; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaPairRDD; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; - -import scala.Tuple2; - -/** - * Created by Hanjoo on 2016-01-18. - */ -public class AsyncEASGDImageNetTest { - public static void main(String[] args) throws Exception { - SparkConf conf = new SparkConf().setAppName("AsyncImageNetTest") - .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - - JavaSparkContext sc = new JavaSparkContext(conf); - - DistNet net = new DistNet(args[0], args[1], new int[]{3, 256, 256}); - DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); - - String serverHost = InetAddress.getLocalHost().getHostAddress(); - final int port = 10020; - System.out.println("ParameterServer host: " + serverHost); - DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); - int numExecutors = conf.getInt("spark.executor.instances", -1); - System.out.println("number of executors = " + numExecutors); - - System.out.println("Data Loading..."); - JavaPairRDD train_seq = - sc.sequenceFile("imagenet_sampled.hsf", FloatWritable.class, ArrayPrimitiveWritable.class); - - Integer[] tempkey = new Integer[numExecutors]; - for(int i = 0; i < tempkey.length; i++) - tempkey[i] = i; - - JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors); - - JavaRDD train_samples = train_seq.map(new Function, Record>() { - @Override - public Record call(Tuple2 arg0) throws Exception { - Record d = new Record(); - d.label = arg0._1.get(); - d.data = (float[]) arg0._2.get(); - d.dim = new int[]{3,256,256}; - return d; - } - }); - - // spill to local - driver.prepareLocal(train_samples, "tmp_data", numExecutors); - - train_samples.unpersist(); - System.out.println("Start Learning..."); - Date startTime = new Date(); - - //train local - driver.trainWithLMDB(rddkey, "tmp_image", numExecutors); - - Date endTime = new Date(); - - long time = endTime.getTime() - startTime.getTime(); - System.out.println(String.format("Training time: %f secs", (double) time / 1000)); - - sc.close(); - } -} +package org.acl.deepspark.nn.driver; + +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.ByteRecord; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.acl.deepspark.utils.DeepSparkParamLoader; +import org.apache.hadoop.io.ArrayPrimitiveWritable; +import org.apache.hadoop.io.FloatWritable; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaPairRDD; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.api.java.function.Function; + +import scala.Tuple2; + +/** + * Created by Hanjoo on 2016-01-18. + */ +public class AsyncEASGDImageNetTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncImageNetTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + DistNet net = new DistNet(args[0], args[1], new int[]{3, 256, 256}); + DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int port = 10020; + System.out.println("ParameterServer host: " + serverHost); + DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + + System.out.println("Data Loading..."); + JavaPairRDD train_seq = + sc.sequenceFile("/imagenet_train.hsf", FloatWritable.class, ArrayPrimitiveWritable.class); + + Integer[] tempkey = new Integer[numExecutors]; + for(int i = 0; i < tempkey.length; i++) + tempkey[i] = i; + + JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors); + + JavaRDD train_samples = train_seq.map(new Function, ByteRecord>() { + @Override + public ByteRecord call(Tuple2 arg0) throws Exception { + ByteRecord d = new ByteRecord(); + d.label = arg0._1.get(); + d.data = (byte[]) arg0._2.get(); + d.dim = new int[]{3,256,256}; + return d; + } + }); + + // spill to local + driver.prepareLocalByte(train_samples, "tmp_data", numExecutors); + + train_samples.unpersist(); + System.out.println("Start Learning..."); + Date startTime = new Date(); + + //train local + driver.trainWithLMDB(rddkey, "tmp_image", numExecutors); + + Date endTime = new Date(); + + long time = endTime.getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + + sc.close(); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetVarTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetVarTest.java new file mode 100644 index 0000000..9d707a2 --- /dev/null +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDImageNetVarTest.java @@ -0,0 +1,80 @@ +package org.acl.deepspark.nn.driver; + +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.ByteRecord; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.acl.deepspark.utils.DeepSparkParamLoader; +import org.apache.hadoop.io.ArrayPrimitiveWritable; +import org.apache.hadoop.io.FloatWritable; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaPairRDD; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.api.java.function.Function; + +import scala.Tuple2; + +/** + * Created by Hanjoo on 2016-01-18. + */ +public class AsyncEASGDImageNetVarTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncImageNetTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + DistNet net = new DistNet(args[0], args[1], new int[]{3, 256, 256}); + DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int port = 10020; + System.out.println("ParameterServer host: " + serverHost); + DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + + System.out.println("Data Loading..."); + JavaPairRDD train_seq = + sc.sequenceFile("/imagenet_train.hsf", FloatWritable.class, ArrayPrimitiveWritable.class); + + Integer[] tempkey = new Integer[numExecutors]; + for(int i = 0; i < tempkey.length; i++) + tempkey[i] = i; + + JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors); + + JavaRDD train_samples = train_seq.map(new Function, ByteRecord>() { + @Override + public ByteRecord call(Tuple2 arg0) throws Exception { + ByteRecord d = new ByteRecord(); + d.label = arg0._1.get(); + d.data = (byte[]) arg0._2.get(); + d.dim = new int[]{3,256,256}; + return d; + } + }); + + // spill to local + driver.prepareLocalByte(train_samples, "tmp_data", numExecutors); + + train_samples.unpersist(); + System.out.println("Start Learning..."); + Date startTime = new Date(); + + //train local + driver.trainWithLMDBVarTau(rddkey, "tmp_image", numExecutors); + + Date endTime = new Date(); + + long time = endTime.getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + + sc.close(); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDMnistLocalTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDMnistLocalTest.java index 0619f7e..72f55dc 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDMnistLocalTest.java +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncEASGDMnistLocalTest.java @@ -1,123 +1,123 @@ -package org.acl.deepspark.nn.driver; - -import java.io.File; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.net.InetAddress; -import java.util.Arrays; -import java.util.Date; - -import org.acl.deepspark.data.LMDBWriter; -import org.acl.deepspark.data.Record; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; -import org.acl.deepspark.utils.DeepSparkParamLoader; -import org.acl.deepspark.utils.MnistLoader; -import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; -import org.apache.spark.Accumulator; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.VoidFunction; - -/** - * Created by Hanjoo on 2016-01-18. - */ -public class AsyncEASGDMnistLocalTest { - public static void main(String[] args) throws Exception { - SparkConf conf = new SparkConf().setAppName("AsyncMnistTest") - .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - - JavaSparkContext sc = new JavaSparkContext(conf); - - DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); - System.out.println("Data Loading..."); - Record[] train_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_train.txt", true); - Record[] test_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_test.txt", true); - - int numExecutors = conf.getInt("spark.executor.instances", -1); - System.out.println("number of executors = " + numExecutors); - JavaRDD train_data; - if(numExecutors != -1) - train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); - else - train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); - - - Integer[] tempkey = new Integer[numExecutors]; - for(int i = 0; i < tempkey.length; i++) - tempkey[i] = i; - - JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors).cache(); - rddkey.foreach(new VoidFunction() { - - @Override - public void call(Integer arg0) throws Exception { - File f = new File("tmp_image"); - f.mkdir(); - System.out.println("tmp_dir: " + f.getAbsolutePath()); - } - }); - - final Accumulator totalCount = sc.accumulator(0); - - train_data.foreach(new VoidFunction() { - transient int count; - transient LMDBWriter dbWriter; - - private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { - in.defaultReadObject(); - dbWriter = new LMDBWriter("tmp_image", 1000); - count = 0; - } - - @Override - public void call(Record arg0) throws Exception { - dbWriter.putSample(arg0); - - if((++count % 1000) == 0) { - System.out.println(String.format("%d images saved...", count)); - } - - totalCount.add(1); - } - - @Override - public void finalize() { - try { - dbWriter.closeLMDB(); - } catch(Exception e) { - e.printStackTrace(); - } - - System.out.println(String.format("Total %d images saved...", count)); - } - }); - - System.out.println(String.format("%d data records found...", totalCount.value())); - - String serverHost = InetAddress.getLocalHost().getHostAddress(); - final int port = 10020; - System.out.println("ParameterServer host: " + serverHost); - - DistNet net = new DistNet(args[0], args[1]); - DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); - - System.out.println("Start Learning..."); - Date startTime = new Date(); - - - driver.trainWithLMDB(rddkey, "tmp_image", numExecutors); - driver.saveWeight("final_weight.bin"); - - sc.close(); - - float[] ret = driver.test(Arrays.asList(test_sample)); - - Date endTime = new Date(); - long time = endTime .getTime() - startTime.getTime(); - System.out.println(String.format("Training time: %f secs", (double) time / 1000)); - System.out.println(String.format("Accuracy: %f ", ret[0])); - - } -} +package org.acl.deepspark.nn.driver; + +import java.io.File; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.LMDBWriter; +import org.acl.deepspark.data.Record; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.nn.async.easgd.DistAsyncEASGDSolver; +import org.acl.deepspark.utils.DeepSparkParamLoader; +import org.acl.deepspark.utils.MnistLoader; +import org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam; +import org.apache.spark.Accumulator; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.api.java.function.VoidFunction; + +/** + * Created by Hanjoo on 2016-01-18. + */ +public class AsyncEASGDMnistLocalTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncMnistTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + DeepSparkParam param = DeepSparkParamLoader.readConf(args[2]); + System.out.println("Data Loading..."); + Record[] train_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_train.txt", true); + Record[] test_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_test.txt", true); + + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + JavaRDD train_data; + if(numExecutors != -1) + train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); + else + train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); + + + Integer[] tempkey = new Integer[numExecutors]; + for(int i = 0; i < tempkey.length; i++) + tempkey[i] = i; + + JavaRDD rddkey = sc.parallelize(Arrays.asList(tempkey), numExecutors).cache(); + rddkey.foreach(new VoidFunction() { + + @Override + public void call(Integer arg0) throws Exception { + File f = new File("tmp_image"); + f.mkdir(); + System.out.println("tmp_dir: " + f.getAbsolutePath()); + } + }); + + final Accumulator totalCount = sc.accumulator(0); + + train_data.foreach(new VoidFunction() { + transient int count; + transient LMDBWriter dbWriter; + + private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { + in.defaultReadObject(); + dbWriter = new LMDBWriter("tmp_image", 1000); + count = 0; + } + + @Override + public void call(Record arg0) throws Exception { + dbWriter.putSample(arg0); + + if((++count % 1000) == 0) { + System.out.println(String.format("%d images saved...", count)); + } + + totalCount.add(1); + } + + @Override + public void finalize() { + try { + dbWriter.closeLMDB(); + } catch(Exception e) { + e.printStackTrace(); + } + + System.out.println(String.format("Total %d images saved...", count)); + } + }); + + System.out.println(String.format("%d data records found...", totalCount.value())); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int port = 10020; + System.out.println("ParameterServer host: " + serverHost); + + DistNet net = new DistNet(args[0], args[1]); + DistAsyncEASGDSolver driver = new DistAsyncEASGDSolver(net, serverHost, port, param); + + System.out.println("Start Learning..."); + Date startTime = new Date(); + + + driver.trainWithLMDB(rddkey, "tmp_image", numExecutors); + driver.saveWeight("final_weight.bin"); + + sc.close(); + + float[] ret = driver.test(Arrays.asList(test_sample)); + + Date endTime = new Date(); + long time = endTime .getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + System.out.println(String.format("Accuracy: %f ", ret[0])); + + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/AsyncMnistTest.java b/src/main/java/org/acl/deepspark/nn/driver/AsyncMnistTest.java index b5f21a3..29d90f6 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/AsyncMnistTest.java +++ b/src/main/java/org/acl/deepspark/nn/driver/AsyncMnistTest.java @@ -1,56 +1,56 @@ -package org.acl.deepspark.nn.driver; - -import java.net.InetAddress; -import java.util.Arrays; -import java.util.Date; - -import org.acl.deepspark.data.Record; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.utils.MnistLoader; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; - -/** - * Created by Jaehong on 2015-10-05. - */ -public class AsyncMnistTest { - public static void main(String[] args) throws Exception { - SparkConf conf = new SparkConf().setAppName("AsyncMnistTest") - .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - - JavaSparkContext sc = new JavaSparkContext(conf); - - System.out.println("Data Loading..."); - Record[] train_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_train.txt", true); - Record[] test_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_test.txt", true); - - int numExecutors = conf.getInt("spark.executor.instances", -1); - System.out.println("number of executors = " + numExecutors); - JavaRDD train_data; - if(numExecutors != -1) - train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); - else - train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); - - DistNet net = new DistNet(args[0], args[1]); - - String serverHost = InetAddress.getLocalHost().getHostAddress(); - final int[] port = new int[] {10020, 10021}; - System.out.println("ParameterServer host: " + serverHost); - DistAsyncNeuralNetRunner driver = new DistAsyncNeuralNetRunner(net, serverHost, port, 10); - driver.test(Arrays.asList(test_sample)); - - System.out.println("Start Learning..."); - Date startTime = new Date(); - driver.train(train_data); - sc.close(); - - Date endTime = new Date(); - float[] ret = driver.test(Arrays.asList(test_sample)); - - long time = endTime.getTime() - startTime.getTime(); - System.out.println(String.format("Training time: %f secs", (double) time / 1000)); - System.out.println(String.format("Accuracy: %f ", ret[0])); - } -} +package org.acl.deepspark.nn.driver; + +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Date; + +import org.acl.deepspark.data.Record; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.utils.MnistLoader; +import org.apache.spark.SparkConf; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; + +/** + * Created by Jaehong on 2015-10-05. + */ +public class AsyncMnistTest { + public static void main(String[] args) throws Exception { + SparkConf conf = new SparkConf().setAppName("AsyncMnistTest") + .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); + + JavaSparkContext sc = new JavaSparkContext(conf); + + System.out.println("Data Loading..."); + Record[] train_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_train.txt", true); + Record[] test_sample = MnistLoader.loadFromHDFS("/data/MNIST/mnist_test.txt", true); + + int numExecutors = conf.getInt("spark.executor.instances", -1); + System.out.println("number of executors = " + numExecutors); + JavaRDD train_data; + if(numExecutors != -1) + train_data = sc.parallelize(Arrays.asList(train_sample), numExecutors).cache(); + else + train_data = sc.parallelize(Arrays.asList(train_sample)).cache(); + + DistNet net = new DistNet(args[0], args[1]); + + String serverHost = InetAddress.getLocalHost().getHostAddress(); + final int[] port = new int[] {10020, 10021}; + System.out.println("ParameterServer host: " + serverHost); + DistAsyncNeuralNetRunner driver = new DistAsyncNeuralNetRunner(net, serverHost, port, 10); + driver.test(Arrays.asList(test_sample)); + + System.out.println("Start Learning..."); + Date startTime = new Date(); + driver.train(train_data); + sc.close(); + + Date endTime = new Date(); + float[] ret = driver.test(Arrays.asList(test_sample)); + + long time = endTime.getTime() - startTime.getTime(); + System.out.println(String.format("Training time: %f secs", (double) time / 1000)); + System.out.println(String.format("Accuracy: %f ", ret[0])); + } +} diff --git a/src/main/java/org/acl/deepspark/nn/driver/DistAsyncNeuralNetRunner.java b/src/main/java/org/acl/deepspark/nn/driver/DistAsyncNeuralNetRunner.java index e796d79..633a459 100644 --- a/src/main/java/org/acl/deepspark/nn/driver/DistAsyncNeuralNetRunner.java +++ b/src/main/java/org/acl/deepspark/nn/driver/DistAsyncNeuralNetRunner.java @@ -1,119 +1,119 @@ -package org.acl.deepspark.nn.driver; - -import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.acl.deepspark.data.Record; -import org.acl.deepspark.data.Weight; -import org.acl.deepspark.nn.DistNet; -import org.acl.deepspark.nn.async.ParameterClient; -import org.acl.deepspark.nn.async.ParameterServer; -import org.acl.deepspark.utils.WeightUtil; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.function.VoidFunction; - -import caffe.Caffe.SolverParameter.SolverMode; - - -/** - * Created by Jaehong on 2015-07-31. - */ -public class DistAsyncNeuralNetRunner implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -5070368428661536358L; - - private transient DistNet net; - - private String host; - private int[] port; - private int innerLoopSize; - - public DistAsyncNeuralNetRunner(DistNet net, String host, int[] port, int k) { - this.net = net; - this.host = host; - this.port = port; - this.innerLoopSize = k; - } - - public void train(JavaRDD data) throws IOException{ - final int dataSize = (int) data.cache().count(); - net.setCPU(); - ParameterServer server = new ParameterServer(net, port[0], port[1]); - server.startServer(); - - final byte[] solverParams = net.getSolverSetting().toByteArray(); - final byte[] netParams = net.getNetConf().toByteArray(); - - System.out.println("Training start..."); - data.foreachPartition(new VoidFunction>() { - private static final long serialVersionUID = -4641037124928675165L; - - public void call(Iterator samples) throws Exception { - List sampleList = new ArrayList(); - while (samples.hasNext()) - sampleList.add(samples.next()); - - System.out.println("Local data size: " + sampleList.size()); - // init net - DistNet net = new DistNet(solverParams, netParams); - SolverMode mode = net.getSolverSetting().getSolverMode(); - if(mode == SolverMode.GPU) { - System.out.println("running on GPU..."); - net.setGPU(); - } else { - System.out.println("running on CPU..."); - net.setCPU(); - } - - int settingSize = sampleList.size(); - int iterLimit = sampleList.size() / net.getBatchSize(); - settingSize -= sampleList.size() % net.getBatchSize(); - - // get initial weight - net.setWeights(ParameterClient.getWeights(host, port[1])); - List cumulativeGrads = net.getGradients(); - - int listSize = sampleList.size(); - int iteration = net.getIteration(); - int localIter = iteration * listSize / dataSize / innerLoopSize; - - System.out.println("iteration : " + localIter * innerLoopSize); - - int counter = 0; - for (int i = 0; i < localIter; i++) { - WeightUtil.clear(cumulativeGrads); - for(int k =0; k < innerLoopSize; k++) { - if(counter % iterLimit == 0) { // iteration complete - Collections.shuffle(sampleList); - List subSample = sampleList.subList(0, settingSize); - net.setTrainData(net.buildBlobs(subSample)); - } - - System.out.println(String.format("%d th iteration", ++counter)); - net.train(); - WeightUtil.addFromTo(net.getGradients(), cumulativeGrads); - } - ParameterClient.sendDelta(host, port[0], cumulativeGrads); - net.setWeights(ParameterClient.getWeights(host, port[1])); - } - } - }); - - System.out.println("Training complete..."); - server.stopServer(); - net.setGPU(); - } - - - public float[] test(List data) { - net.setTestData(net.buildBlobs(data)); - return net.test(); - } -} +package org.acl.deepspark.nn.driver; + +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.acl.deepspark.data.Record; +import org.acl.deepspark.data.Weight; +import org.acl.deepspark.nn.DistNet; +import org.acl.deepspark.nn.async.ParameterClient; +import org.acl.deepspark.nn.async.ParameterServer; +import org.acl.deepspark.utils.WeightUtil; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.function.VoidFunction; + +import caffe.Caffe.SolverParameter.SolverMode; + + +/** + * Created by Jaehong on 2015-07-31. + */ +public class DistAsyncNeuralNetRunner implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -5070368428661536358L; + + private transient DistNet net; + + private String host; + private int[] port; + private int innerLoopSize; + + public DistAsyncNeuralNetRunner(DistNet net, String host, int[] port, int k) { + this.net = net; + this.host = host; + this.port = port; + this.innerLoopSize = k; + } + + public void train(JavaRDD data) throws IOException{ + final int dataSize = (int) data.cache().count(); + net.setCPU(); + ParameterServer server = new ParameterServer(net, port[0], port[1]); + server.startServer(); + + final byte[] solverParams = net.getSolverSetting().toByteArray(); + final byte[] netParams = net.getNetConf().toByteArray(); + + System.out.println("Training start..."); + data.foreachPartition(new VoidFunction>() { + private static final long serialVersionUID = -4641037124928675165L; + + public void call(Iterator samples) throws Exception { + List sampleList = new ArrayList(); + while (samples.hasNext()) + sampleList.add(samples.next()); + + System.out.println("Local data size: " + sampleList.size()); + // init net + DistNet net = new DistNet(solverParams, netParams); + SolverMode mode = net.getSolverSetting().getSolverMode(); + if(mode == SolverMode.GPU) { + System.out.println("running on GPU..."); + net.setGPU(); + } else { + System.out.println("running on CPU..."); + net.setCPU(); + } + + int settingSize = sampleList.size(); + int iterLimit = sampleList.size() / net.getBatchSize(); + settingSize -= sampleList.size() % net.getBatchSize(); + + // get initial weight + net.setWeights(ParameterClient.getWeights(host, port[1])); + List cumulativeGrads = net.getGradients(); + + int listSize = sampleList.size(); + int iteration = net.getIteration(); + int localIter = iteration * listSize / dataSize / innerLoopSize; + + System.out.println("iteration : " + localIter * innerLoopSize); + + int counter = 0; + for (int i = 0; i < localIter; i++) { + WeightUtil.clear(cumulativeGrads); + for(int k =0; k < innerLoopSize; k++) { + if(counter % iterLimit == 0) { // iteration complete + Collections.shuffle(sampleList); + List subSample = sampleList.subList(0, settingSize); + net.setTrainData(net.buildBlobs(subSample)); + } + + System.out.println(String.format("%d th iteration", ++counter)); + net.train(); + WeightUtil.addFromTo(net.getGradients(), cumulativeGrads); + } + ParameterClient.sendDelta(host, port[0], cumulativeGrads); + net.setWeights(ParameterClient.getWeights(host, port[1])); + } + } + }); + + System.out.println("Training complete..."); + server.stopServer(); + net.setGPU(); + } + + + public float[] test(List data) { + net.setTestData(net.buildBlobs(data)); + return net.test(); + } +} diff --git a/src/main/java/org/acl/deepspark/utils/CIFARLoader.java b/src/main/java/org/acl/deepspark/utils/CIFARLoader.java index b76324d..bef4614 100644 --- a/src/main/java/org/acl/deepspark/utils/CIFARLoader.java +++ b/src/main/java/org/acl/deepspark/utils/CIFARLoader.java @@ -1,191 +1,191 @@ -package org.acl.deepspark.utils; - -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Serializable; -import java.util.ArrayList; - -import org.acl.deepspark.data.Record; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataInputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; - -public class CIFARLoader implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 2453031569679527445L; - - private static final int dimRows = 32; - private static final int dimCols = 32; - private static final int channel = 3; - - public static Record[] loadIntoSamples(String path, boolean normalize) { - int label; - byte[] data = new byte[channel * dimRows * dimCols]; - ArrayList samples = new ArrayList(); - - FileInputStream in = null; - try { - in = new FileInputStream(path); - while ((label = in.read()) != -1) { - float[] featureVec = new float [channel * dimRows * dimCols]; - - int value; - int length = featureVec.length; - - in.read(data); - float mean = 0; - for (int i = 0 ; i < length; i++) { - value = (int) data[i]&0xff; - featureVec[i] = (float) value; - mean += value; - } - - mean /= length; - - Record s = new Record(); - s.data = featureVec; - if (normalize) { - for(int i =0; i < length; i++ ) { - s.data[i] -= mean; - } - } - s.label = label; - s.dim = new int[]{channel, dimRows, dimCols}; - samples.add(s); - } - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) {} - } - } - - Record[] arr = new Record[samples.size()]; - arr = samples.toArray(arr); - - System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); - return arr; - } - - public static Record[] loadFromHDFS(String path, boolean normalize) { - int label; - byte[] data = new byte[channel * dimRows * dimCols]; - ArrayList samples = new ArrayList(); - - FSDataInputStream in = null; - try { - Path p = new Path(path); - FileSystem fs = FileSystem.get(new Configuration()); - in = fs.open(p); - - while ((label = in.read()) != -1) { - float[] featureVec = new float [channel * dimRows * dimCols]; - - int value; - int length = featureVec.length; - - in.read(data); - - float mean = 0; - for (int i = 0 ; i < length; i++) { - value = (int) data[i]&0xff; - featureVec[i] = (float) value; - mean += value; - } - - mean /= length; - - Record s = new Record(); - s.data = featureVec; - if (normalize) { - for(int i =0; i < length; i++ ) { - s.data[i] -= mean; - } - } - s.label = label; - s.dim = new int[]{channel, dimRows, dimCols}; - samples.add(s); - } - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) {} - } - } - - Record[] arr = new Record[samples.size()]; - arr = samples.toArray(arr); - - System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); - return arr; - } - - public static Record[] loadFromHDFSText(String path, boolean normalize) { - System.out.println("Data Loading..."); - float label; - BufferedReader reader = null; - ArrayList samples = new ArrayList(); - - - try { - Path p = new Path(path); - FileSystem fs = FileSystem.get(new Configuration()); - reader = new BufferedReader(new InputStreamReader(fs.open(p))); - String line = null; - String[] feature = null; - - while ((line = reader.readLine()) != null) { - feature = line.split("\t"); - label = Float.parseFloat(feature[channel*dimRows*dimRows]); - - float[] featureVec = new float[channel*dimRows*dimCols]; - - float mean = 0; - for (int i = 0; i < feature.length -1; i++) { - featureVec[i] = Float.parseFloat(feature[i]); - mean += featureVec[i]; - } - - mean /= feature.length; - - Record s = new Record(); - s.data = featureVec; - if (normalize) { - for(int i =0; i < feature.length -1; i++ ) { - s.data[i] -= mean; - } - } - s.label = label; - s.dim = new int[]{channel, dimRows, dimCols}; - samples.add(s); - } - - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) {} - } - } - - Record[] arr = new Record[samples.size()]; - arr = samples.toArray(arr); - - System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); - return arr; - } +package org.acl.deepspark.utils; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Serializable; +import java.util.ArrayList; + +import org.acl.deepspark.data.Record; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +public class CIFARLoader implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 2453031569679527445L; + + private static final int dimRows = 32; + private static final int dimCols = 32; + private static final int channel = 3; + + public static Record[] loadIntoSamples(String path, boolean normalize) { + int label; + byte[] data = new byte[channel * dimRows * dimCols]; + ArrayList samples = new ArrayList(); + + FileInputStream in = null; + try { + in = new FileInputStream(path); + while ((label = in.read()) != -1) { + float[] featureVec = new float [channel * dimRows * dimCols]; + + int value; + int length = featureVec.length; + + in.read(data); + float mean = 0; + for (int i = 0 ; i < length; i++) { + value = (int) data[i]&0xff; + featureVec[i] = (float) value; + mean += value; + } + + mean /= length; + + Record s = new Record(); + s.data = featureVec; + if (normalize) { + for(int i =0; i < length; i++ ) { + s.data[i] -= mean; + } + } + s.label = label; + s.dim = new int[]{channel, dimRows, dimCols}; + samples.add(s); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) {} + } + } + + Record[] arr = new Record[samples.size()]; + arr = samples.toArray(arr); + + System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); + return arr; + } + + public static Record[] loadFromHDFS(String path, boolean normalize) { + int label; + byte[] data = new byte[channel * dimRows * dimCols]; + ArrayList samples = new ArrayList(); + + FSDataInputStream in = null; + try { + Path p = new Path(path); + FileSystem fs = FileSystem.get(new Configuration()); + in = fs.open(p); + + while ((label = in.read()) != -1) { + float[] featureVec = new float [channel * dimRows * dimCols]; + + int value; + int length = featureVec.length; + + in.read(data); + + float mean = 0; + for (int i = 0 ; i < length; i++) { + value = (int) data[i]&0xff; + featureVec[i] = (float) value; + mean += value; + } + + mean /= length; + + Record s = new Record(); + s.data = featureVec; + if (normalize) { + for(int i =0; i < length; i++ ) { + s.data[i] -= mean; + } + } + s.label = label; + s.dim = new int[]{channel, dimRows, dimCols}; + samples.add(s); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) {} + } + } + + Record[] arr = new Record[samples.size()]; + arr = samples.toArray(arr); + + System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); + return arr; + } + + public static Record[] loadFromHDFSText(String path, boolean normalize) { + System.out.println("Data Loading..."); + float label; + BufferedReader reader = null; + ArrayList samples = new ArrayList(); + + + try { + Path p = new Path(path); + FileSystem fs = FileSystem.get(new Configuration()); + reader = new BufferedReader(new InputStreamReader(fs.open(p))); + String line = null; + String[] feature = null; + + while ((line = reader.readLine()) != null) { + feature = line.split("\t"); + label = Float.parseFloat(feature[channel*dimRows*dimRows]); + + float[] featureVec = new float[channel*dimRows*dimCols]; + + float mean = 0; + for (int i = 0; i < feature.length -1; i++) { + featureVec[i] = Float.parseFloat(feature[i]); + mean += featureVec[i]; + } + + mean /= feature.length; + + Record s = new Record(); + s.data = featureVec; + if (normalize) { + for(int i =0; i < feature.length -1; i++ ) { + s.data[i] -= mean; + } + } + s.label = label; + s.dim = new int[]{channel, dimRows, dimCols}; + samples.add(s); + } + + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) {} + } + } + + Record[] arr = new Record[samples.size()]; + arr = samples.toArray(arr); + + System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); + return arr; + } } \ No newline at end of file diff --git a/src/main/java/org/acl/deepspark/utils/DeepSparkConf.java b/src/main/java/org/acl/deepspark/utils/DeepSparkConf.java index 1eb8da6..55acae7 100644 --- a/src/main/java/org/acl/deepspark/utils/DeepSparkConf.java +++ b/src/main/java/org/acl/deepspark/utils/DeepSparkConf.java @@ -1,1089 +1,1089 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: DeepSparkConf.proto - -package org.acl.deepspark.utils; - -public final class DeepSparkConf { - private DeepSparkConf() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface DeepSparkParamOrBuilder extends - // @@protoc_insertion_point(interface_extends:DeepSparkParam) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 period = 1; - */ - boolean hasPeriod(); - /** - * required int32 period = 1; - */ - int getPeriod(); - - /** - * required float moving_rate = 2; - */ - boolean hasMovingRate(); - /** - * required float moving_rate = 2; - */ - float getMovingRate(); - - /** - * optional float decay_rate = 3 [default = 1]; - */ - boolean hasDecayRate(); - /** - * optional float decay_rate = 3 [default = 1]; - */ - float getDecayRate(); - - /** - * optional int32 decay_step = 4 [default = -1]; - */ - boolean hasDecayStep(); - /** - * optional int32 decay_step = 4 [default = -1]; - */ - int getDecayStep(); - - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - boolean hasDecayLimit(); - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - int getDecayLimit(); - - /** - * optional float server_factor = 6 [default = 1]; - */ - boolean hasServerFactor(); - /** - * optional float server_factor = 6 [default = 1]; - */ - float getServerFactor(); - - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - boolean hasFactorDecayRate(); - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - float getFactorDecayRate(); - - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - boolean hasFactorDecayStep(); - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - int getFactorDecayStep(); - - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - boolean hasFactorDecayLimit(); - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - int getFactorDecayLimit(); - } - /** - * Protobuf type {@code DeepSparkParam} - */ - public static final class DeepSparkParam extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:DeepSparkParam) - DeepSparkParamOrBuilder { - // Use DeepSparkParam.newBuilder() to construct. - private DeepSparkParam(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeepSparkParam() { - period_ = 0; - movingRate_ = 0F; - decayRate_ = 1F; - decayStep_ = -1; - decayLimit_ = -1; - serverFactor_ = 1F; - factorDecayRate_ = 1F; - factorDecayStep_ = -1; - factorDecayLimit_ = -1; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeepSparkParam( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - period_ = input.readInt32(); - break; - } - case 21: { - bitField0_ |= 0x00000002; - movingRate_ = input.readFloat(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - decayRate_ = input.readFloat(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - decayStep_ = input.readInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - decayLimit_ = input.readInt32(); - break; - } - case 53: { - bitField0_ |= 0x00000020; - serverFactor_ = input.readFloat(); - break; - } - case 61: { - bitField0_ |= 0x00000040; - factorDecayRate_ = input.readFloat(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - factorDecayStep_ = input.readInt32(); - break; - } - case 72: { - bitField0_ |= 0x00000100; - factorDecayLimit_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - 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 org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.class, org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.Builder.class); - } - - private int bitField0_; - public static final int PERIOD_FIELD_NUMBER = 1; - private int period_; - /** - * required int32 period = 1; - */ - public boolean hasPeriod() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 period = 1; - */ - public int getPeriod() { - return period_; - } - - public static final int MOVING_RATE_FIELD_NUMBER = 2; - private float movingRate_; - /** - * required float moving_rate = 2; - */ - public boolean hasMovingRate() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required float moving_rate = 2; - */ - public float getMovingRate() { - return movingRate_; - } - - public static final int DECAY_RATE_FIELD_NUMBER = 3; - private float decayRate_; - /** - * optional float decay_rate = 3 [default = 1]; - */ - public boolean hasDecayRate() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float decay_rate = 3 [default = 1]; - */ - public float getDecayRate() { - return decayRate_; - } - - public static final int DECAY_STEP_FIELD_NUMBER = 4; - private int decayStep_; - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public boolean hasDecayStep() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public int getDecayStep() { - return decayStep_; - } - - public static final int DECAY_LIMIT_FIELD_NUMBER = 5; - private int decayLimit_; - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public boolean hasDecayLimit() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public int getDecayLimit() { - return decayLimit_; - } - - public static final int SERVER_FACTOR_FIELD_NUMBER = 6; - private float serverFactor_; - /** - * optional float server_factor = 6 [default = 1]; - */ - public boolean hasServerFactor() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional float server_factor = 6 [default = 1]; - */ - public float getServerFactor() { - return serverFactor_; - } - - public static final int FACTOR_DECAY_RATE_FIELD_NUMBER = 7; - private float factorDecayRate_; - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public boolean hasFactorDecayRate() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public float getFactorDecayRate() { - return factorDecayRate_; - } - - public static final int FACTOR_DECAY_STEP_FIELD_NUMBER = 8; - private int factorDecayStep_; - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public boolean hasFactorDecayStep() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public int getFactorDecayStep() { - return factorDecayStep_; - } - - public static final int FACTOR_DECAY_LIMIT_FIELD_NUMBER = 9; - private int factorDecayLimit_; - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public boolean hasFactorDecayLimit() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public int getFactorDecayLimit() { - return factorDecayLimit_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasPeriod()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasMovingRate()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, period_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeFloat(2, movingRate_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeFloat(3, decayRate_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(4, decayStep_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(5, decayLimit_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeFloat(6, serverFactor_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeFloat(7, factorDecayRate_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeInt32(8, factorDecayStep_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeInt32(9, factorDecayLimit_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, period_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, movingRate_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, decayRate_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, decayStep_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, decayLimit_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, serverFactor_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, factorDecayRate_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(8, factorDecayStep_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(9, factorDecayLimit_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code DeepSparkParam} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:DeepSparkParam) - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParamOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.class, org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.Builder.class); - } - - // Construct using org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - period_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - movingRate_ = 0F; - bitField0_ = (bitField0_ & ~0x00000002); - decayRate_ = 1F; - bitField0_ = (bitField0_ & ~0x00000004); - decayStep_ = -1; - bitField0_ = (bitField0_ & ~0x00000008); - decayLimit_ = -1; - bitField0_ = (bitField0_ & ~0x00000010); - serverFactor_ = 1F; - bitField0_ = (bitField0_ & ~0x00000020); - factorDecayRate_ = 1F; - bitField0_ = (bitField0_ & ~0x00000040); - factorDecayStep_ = -1; - bitField0_ = (bitField0_ & ~0x00000080); - factorDecayLimit_ = -1; - bitField0_ = (bitField0_ & ~0x00000100); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; - } - - public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstanceForType() { - return org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.getDefaultInstance(); - } - - public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam build() { - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam buildPartial() { - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam result = new org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.period_ = period_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.movingRate_ = movingRate_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.decayRate_ = decayRate_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.decayStep_ = decayStep_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.decayLimit_ = decayLimit_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.serverFactor_ = serverFactor_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.factorDecayRate_ = factorDecayRate_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.factorDecayStep_ = factorDecayStep_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.factorDecayLimit_ = factorDecayLimit_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam) { - return mergeFrom((org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam other) { - if (other == org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.getDefaultInstance()) return this; - if (other.hasPeriod()) { - setPeriod(other.getPeriod()); - } - if (other.hasMovingRate()) { - setMovingRate(other.getMovingRate()); - } - if (other.hasDecayRate()) { - setDecayRate(other.getDecayRate()); - } - if (other.hasDecayStep()) { - setDecayStep(other.getDecayStep()); - } - if (other.hasDecayLimit()) { - setDecayLimit(other.getDecayLimit()); - } - if (other.hasServerFactor()) { - setServerFactor(other.getServerFactor()); - } - if (other.hasFactorDecayRate()) { - setFactorDecayRate(other.getFactorDecayRate()); - } - if (other.hasFactorDecayStep()) { - setFactorDecayStep(other.getFactorDecayStep()); - } - if (other.hasFactorDecayLimit()) { - setFactorDecayLimit(other.getFactorDecayLimit()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - if (!hasPeriod()) { - return false; - } - if (!hasMovingRate()) { - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int period_ ; - /** - * required int32 period = 1; - */ - public boolean hasPeriod() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 period = 1; - */ - public int getPeriod() { - return period_; - } - /** - * required int32 period = 1; - */ - public Builder setPeriod(int value) { - bitField0_ |= 0x00000001; - period_ = value; - onChanged(); - return this; - } - /** - * required int32 period = 1; - */ - public Builder clearPeriod() { - bitField0_ = (bitField0_ & ~0x00000001); - period_ = 0; - onChanged(); - return this; - } - - private float movingRate_ ; - /** - * required float moving_rate = 2; - */ - public boolean hasMovingRate() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required float moving_rate = 2; - */ - public float getMovingRate() { - return movingRate_; - } - /** - * required float moving_rate = 2; - */ - public Builder setMovingRate(float value) { - bitField0_ |= 0x00000002; - movingRate_ = value; - onChanged(); - return this; - } - /** - * required float moving_rate = 2; - */ - public Builder clearMovingRate() { - bitField0_ = (bitField0_ & ~0x00000002); - movingRate_ = 0F; - onChanged(); - return this; - } - - private float decayRate_ = 1F; - /** - * optional float decay_rate = 3 [default = 1]; - */ - public boolean hasDecayRate() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional float decay_rate = 3 [default = 1]; - */ - public float getDecayRate() { - return decayRate_; - } - /** - * optional float decay_rate = 3 [default = 1]; - */ - public Builder setDecayRate(float value) { - bitField0_ |= 0x00000004; - decayRate_ = value; - onChanged(); - return this; - } - /** - * optional float decay_rate = 3 [default = 1]; - */ - public Builder clearDecayRate() { - bitField0_ = (bitField0_ & ~0x00000004); - decayRate_ = 1F; - onChanged(); - return this; - } - - private int decayStep_ = -1; - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public boolean hasDecayStep() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public int getDecayStep() { - return decayStep_; - } - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public Builder setDecayStep(int value) { - bitField0_ |= 0x00000008; - decayStep_ = value; - onChanged(); - return this; - } - /** - * optional int32 decay_step = 4 [default = -1]; - */ - public Builder clearDecayStep() { - bitField0_ = (bitField0_ & ~0x00000008); - decayStep_ = -1; - onChanged(); - return this; - } - - private int decayLimit_ = -1; - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public boolean hasDecayLimit() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public int getDecayLimit() { - return decayLimit_; - } - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public Builder setDecayLimit(int value) { - bitField0_ |= 0x00000010; - decayLimit_ = value; - onChanged(); - return this; - } - /** - * optional int32 decay_limit = 5 [default = -1]; - */ - public Builder clearDecayLimit() { - bitField0_ = (bitField0_ & ~0x00000010); - decayLimit_ = -1; - onChanged(); - return this; - } - - private float serverFactor_ = 1F; - /** - * optional float server_factor = 6 [default = 1]; - */ - public boolean hasServerFactor() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional float server_factor = 6 [default = 1]; - */ - public float getServerFactor() { - return serverFactor_; - } - /** - * optional float server_factor = 6 [default = 1]; - */ - public Builder setServerFactor(float value) { - bitField0_ |= 0x00000020; - serverFactor_ = value; - onChanged(); - return this; - } - /** - * optional float server_factor = 6 [default = 1]; - */ - public Builder clearServerFactor() { - bitField0_ = (bitField0_ & ~0x00000020); - serverFactor_ = 1F; - onChanged(); - return this; - } - - private float factorDecayRate_ = 1F; - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public boolean hasFactorDecayRate() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public float getFactorDecayRate() { - return factorDecayRate_; - } - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public Builder setFactorDecayRate(float value) { - bitField0_ |= 0x00000040; - factorDecayRate_ = value; - onChanged(); - return this; - } - /** - * optional float factor_decay_rate = 7 [default = 1]; - */ - public Builder clearFactorDecayRate() { - bitField0_ = (bitField0_ & ~0x00000040); - factorDecayRate_ = 1F; - onChanged(); - return this; - } - - private int factorDecayStep_ = -1; - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public boolean hasFactorDecayStep() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public int getFactorDecayStep() { - return factorDecayStep_; - } - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public Builder setFactorDecayStep(int value) { - bitField0_ |= 0x00000080; - factorDecayStep_ = value; - onChanged(); - return this; - } - /** - * optional int32 factor_decay_step = 8 [default = -1]; - */ - public Builder clearFactorDecayStep() { - bitField0_ = (bitField0_ & ~0x00000080); - factorDecayStep_ = -1; - onChanged(); - return this; - } - - private int factorDecayLimit_ = -1; - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public boolean hasFactorDecayLimit() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public int getFactorDecayLimit() { - return factorDecayLimit_; - } - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public Builder setFactorDecayLimit(int value) { - bitField0_ |= 0x00000100; - factorDecayLimit_ = value; - onChanged(); - return this; - } - /** - * optional int32 factor_decay_limit = 9 [default = -1]; - */ - public Builder clearFactorDecayLimit() { - bitField0_ = (bitField0_ & ~0x00000100); - factorDecayLimit_ = -1; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:DeepSparkParam) - } - - // @@protoc_insertion_point(class_scope:DeepSparkParam) - private static final org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam(); - } - - public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeepSparkParam parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeepSparkParam(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_DeepSparkParam_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_DeepSparkParam_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\023DeepSparkConf.proto\"\364\001\n\016DeepSparkParam" + - "\022\016\n\006period\030\001 \002(\005\022\023\n\013moving_rate\030\002 \002(\002\022\025\n" + - "\ndecay_rate\030\003 \001(\002:\0011\022\026\n\ndecay_step\030\004 \001(\005" + - ":\002-1\022\027\n\013decay_limit\030\005 \001(\005:\002-1\022\030\n\rserver_" + - "factor\030\006 \001(\002:\0011\022\034\n\021factor_decay_rate\030\007 \001" + - "(\002:\0011\022\035\n\021factor_decay_step\030\010 \001(\005:\002-1\022\036\n\022" + - "factor_decay_limit\030\t \001(\005:\002-1B\031\n\027org.acl." + - "deepspark.utils" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_DeepSparkParam_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_DeepSparkParam_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_DeepSparkParam_descriptor, - new java.lang.String[] { "Period", "MovingRate", "DecayRate", "DecayStep", "DecayLimit", "ServerFactor", "FactorDecayRate", "FactorDecayStep", "FactorDecayLimit", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DeepSparkConf.proto + +package org.acl.deepspark.utils; + +public final class DeepSparkConf { + private DeepSparkConf() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface DeepSparkParamOrBuilder extends + // @@protoc_insertion_point(interface_extends:DeepSparkParam) + com.google.protobuf.MessageOrBuilder { + + /** + * required int32 period = 1; + */ + boolean hasPeriod(); + /** + * required int32 period = 1; + */ + int getPeriod(); + + /** + * required float moving_rate = 2; + */ + boolean hasMovingRate(); + /** + * required float moving_rate = 2; + */ + float getMovingRate(); + + /** + * optional float decay_rate = 3 [default = 1]; + */ + boolean hasDecayRate(); + /** + * optional float decay_rate = 3 [default = 1]; + */ + float getDecayRate(); + + /** + * optional int32 decay_step = 4 [default = -1]; + */ + boolean hasDecayStep(); + /** + * optional int32 decay_step = 4 [default = -1]; + */ + int getDecayStep(); + + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + boolean hasDecayLimit(); + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + int getDecayLimit(); + + /** + * optional float server_factor = 6 [default = 1]; + */ + boolean hasServerFactor(); + /** + * optional float server_factor = 6 [default = 1]; + */ + float getServerFactor(); + + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + boolean hasFactorDecayRate(); + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + float getFactorDecayRate(); + + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + boolean hasFactorDecayStep(); + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + int getFactorDecayStep(); + + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + boolean hasFactorDecayLimit(); + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + int getFactorDecayLimit(); + } + /** + * Protobuf type {@code DeepSparkParam} + */ + public static final class DeepSparkParam extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:DeepSparkParam) + DeepSparkParamOrBuilder { + // Use DeepSparkParam.newBuilder() to construct. + private DeepSparkParam(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeepSparkParam() { + period_ = 0; + movingRate_ = 0F; + decayRate_ = 1F; + decayStep_ = -1; + decayLimit_ = -1; + serverFactor_ = 1F; + factorDecayRate_ = 1F; + factorDecayStep_ = -1; + factorDecayLimit_ = -1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeepSparkParam( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + period_ = input.readInt32(); + break; + } + case 21: { + bitField0_ |= 0x00000002; + movingRate_ = input.readFloat(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + decayRate_ = input.readFloat(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + decayStep_ = input.readInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + decayLimit_ = input.readInt32(); + break; + } + case 53: { + bitField0_ |= 0x00000020; + serverFactor_ = input.readFloat(); + break; + } + case 61: { + bitField0_ |= 0x00000040; + factorDecayRate_ = input.readFloat(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + factorDecayStep_ = input.readInt32(); + break; + } + case 72: { + bitField0_ |= 0x00000100; + factorDecayLimit_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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 org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.class, org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.Builder.class); + } + + private int bitField0_; + public static final int PERIOD_FIELD_NUMBER = 1; + private int period_; + /** + * required int32 period = 1; + */ + public boolean hasPeriod() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int32 period = 1; + */ + public int getPeriod() { + return period_; + } + + public static final int MOVING_RATE_FIELD_NUMBER = 2; + private float movingRate_; + /** + * required float moving_rate = 2; + */ + public boolean hasMovingRate() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required float moving_rate = 2; + */ + public float getMovingRate() { + return movingRate_; + } + + public static final int DECAY_RATE_FIELD_NUMBER = 3; + private float decayRate_; + /** + * optional float decay_rate = 3 [default = 1]; + */ + public boolean hasDecayRate() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float decay_rate = 3 [default = 1]; + */ + public float getDecayRate() { + return decayRate_; + } + + public static final int DECAY_STEP_FIELD_NUMBER = 4; + private int decayStep_; + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public boolean hasDecayStep() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public int getDecayStep() { + return decayStep_; + } + + public static final int DECAY_LIMIT_FIELD_NUMBER = 5; + private int decayLimit_; + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public boolean hasDecayLimit() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public int getDecayLimit() { + return decayLimit_; + } + + public static final int SERVER_FACTOR_FIELD_NUMBER = 6; + private float serverFactor_; + /** + * optional float server_factor = 6 [default = 1]; + */ + public boolean hasServerFactor() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional float server_factor = 6 [default = 1]; + */ + public float getServerFactor() { + return serverFactor_; + } + + public static final int FACTOR_DECAY_RATE_FIELD_NUMBER = 7; + private float factorDecayRate_; + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public boolean hasFactorDecayRate() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public float getFactorDecayRate() { + return factorDecayRate_; + } + + public static final int FACTOR_DECAY_STEP_FIELD_NUMBER = 8; + private int factorDecayStep_; + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public boolean hasFactorDecayStep() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public int getFactorDecayStep() { + return factorDecayStep_; + } + + public static final int FACTOR_DECAY_LIMIT_FIELD_NUMBER = 9; + private int factorDecayLimit_; + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public boolean hasFactorDecayLimit() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public int getFactorDecayLimit() { + return factorDecayLimit_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasPeriod()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasMovingRate()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, period_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(2, movingRate_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, decayRate_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, decayStep_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, decayLimit_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeFloat(6, serverFactor_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeFloat(7, factorDecayRate_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeInt32(8, factorDecayStep_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt32(9, factorDecayLimit_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, period_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, movingRate_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, decayRate_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, decayStep_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, decayLimit_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, serverFactor_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, factorDecayRate_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, factorDecayStep_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, factorDecayLimit_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code DeepSparkParam} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:DeepSparkParam) + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.class, org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.Builder.class); + } + + // Construct using org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + period_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + movingRate_ = 0F; + bitField0_ = (bitField0_ & ~0x00000002); + decayRate_ = 1F; + bitField0_ = (bitField0_ & ~0x00000004); + decayStep_ = -1; + bitField0_ = (bitField0_ & ~0x00000008); + decayLimit_ = -1; + bitField0_ = (bitField0_ & ~0x00000010); + serverFactor_ = 1F; + bitField0_ = (bitField0_ & ~0x00000020); + factorDecayRate_ = 1F; + bitField0_ = (bitField0_ & ~0x00000040); + factorDecayStep_ = -1; + bitField0_ = (bitField0_ & ~0x00000080); + factorDecayLimit_ = -1; + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.acl.deepspark.utils.DeepSparkConf.internal_static_DeepSparkParam_descriptor; + } + + public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstanceForType() { + return org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.getDefaultInstance(); + } + + public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam build() { + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam buildPartial() { + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam result = new org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.period_ = period_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.movingRate_ = movingRate_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.decayRate_ = decayRate_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.decayStep_ = decayStep_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.decayLimit_ = decayLimit_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.serverFactor_ = serverFactor_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.factorDecayRate_ = factorDecayRate_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.factorDecayStep_ = factorDecayStep_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.factorDecayLimit_ = factorDecayLimit_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam) { + return mergeFrom((org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam other) { + if (other == org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam.getDefaultInstance()) return this; + if (other.hasPeriod()) { + setPeriod(other.getPeriod()); + } + if (other.hasMovingRate()) { + setMovingRate(other.getMovingRate()); + } + if (other.hasDecayRate()) { + setDecayRate(other.getDecayRate()); + } + if (other.hasDecayStep()) { + setDecayStep(other.getDecayStep()); + } + if (other.hasDecayLimit()) { + setDecayLimit(other.getDecayLimit()); + } + if (other.hasServerFactor()) { + setServerFactor(other.getServerFactor()); + } + if (other.hasFactorDecayRate()) { + setFactorDecayRate(other.getFactorDecayRate()); + } + if (other.hasFactorDecayStep()) { + setFactorDecayStep(other.getFactorDecayStep()); + } + if (other.hasFactorDecayLimit()) { + setFactorDecayLimit(other.getFactorDecayLimit()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasPeriod()) { + return false; + } + if (!hasMovingRate()) { + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int period_ ; + /** + * required int32 period = 1; + */ + public boolean hasPeriod() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int32 period = 1; + */ + public int getPeriod() { + return period_; + } + /** + * required int32 period = 1; + */ + public Builder setPeriod(int value) { + bitField0_ |= 0x00000001; + period_ = value; + onChanged(); + return this; + } + /** + * required int32 period = 1; + */ + public Builder clearPeriod() { + bitField0_ = (bitField0_ & ~0x00000001); + period_ = 0; + onChanged(); + return this; + } + + private float movingRate_ ; + /** + * required float moving_rate = 2; + */ + public boolean hasMovingRate() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required float moving_rate = 2; + */ + public float getMovingRate() { + return movingRate_; + } + /** + * required float moving_rate = 2; + */ + public Builder setMovingRate(float value) { + bitField0_ |= 0x00000002; + movingRate_ = value; + onChanged(); + return this; + } + /** + * required float moving_rate = 2; + */ + public Builder clearMovingRate() { + bitField0_ = (bitField0_ & ~0x00000002); + movingRate_ = 0F; + onChanged(); + return this; + } + + private float decayRate_ = 1F; + /** + * optional float decay_rate = 3 [default = 1]; + */ + public boolean hasDecayRate() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional float decay_rate = 3 [default = 1]; + */ + public float getDecayRate() { + return decayRate_; + } + /** + * optional float decay_rate = 3 [default = 1]; + */ + public Builder setDecayRate(float value) { + bitField0_ |= 0x00000004; + decayRate_ = value; + onChanged(); + return this; + } + /** + * optional float decay_rate = 3 [default = 1]; + */ + public Builder clearDecayRate() { + bitField0_ = (bitField0_ & ~0x00000004); + decayRate_ = 1F; + onChanged(); + return this; + } + + private int decayStep_ = -1; + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public boolean hasDecayStep() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public int getDecayStep() { + return decayStep_; + } + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public Builder setDecayStep(int value) { + bitField0_ |= 0x00000008; + decayStep_ = value; + onChanged(); + return this; + } + /** + * optional int32 decay_step = 4 [default = -1]; + */ + public Builder clearDecayStep() { + bitField0_ = (bitField0_ & ~0x00000008); + decayStep_ = -1; + onChanged(); + return this; + } + + private int decayLimit_ = -1; + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public boolean hasDecayLimit() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public int getDecayLimit() { + return decayLimit_; + } + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public Builder setDecayLimit(int value) { + bitField0_ |= 0x00000010; + decayLimit_ = value; + onChanged(); + return this; + } + /** + * optional int32 decay_limit = 5 [default = -1]; + */ + public Builder clearDecayLimit() { + bitField0_ = (bitField0_ & ~0x00000010); + decayLimit_ = -1; + onChanged(); + return this; + } + + private float serverFactor_ = 1F; + /** + * optional float server_factor = 6 [default = 1]; + */ + public boolean hasServerFactor() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional float server_factor = 6 [default = 1]; + */ + public float getServerFactor() { + return serverFactor_; + } + /** + * optional float server_factor = 6 [default = 1]; + */ + public Builder setServerFactor(float value) { + bitField0_ |= 0x00000020; + serverFactor_ = value; + onChanged(); + return this; + } + /** + * optional float server_factor = 6 [default = 1]; + */ + public Builder clearServerFactor() { + bitField0_ = (bitField0_ & ~0x00000020); + serverFactor_ = 1F; + onChanged(); + return this; + } + + private float factorDecayRate_ = 1F; + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public boolean hasFactorDecayRate() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public float getFactorDecayRate() { + return factorDecayRate_; + } + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public Builder setFactorDecayRate(float value) { + bitField0_ |= 0x00000040; + factorDecayRate_ = value; + onChanged(); + return this; + } + /** + * optional float factor_decay_rate = 7 [default = 1]; + */ + public Builder clearFactorDecayRate() { + bitField0_ = (bitField0_ & ~0x00000040); + factorDecayRate_ = 1F; + onChanged(); + return this; + } + + private int factorDecayStep_ = -1; + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public boolean hasFactorDecayStep() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public int getFactorDecayStep() { + return factorDecayStep_; + } + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public Builder setFactorDecayStep(int value) { + bitField0_ |= 0x00000080; + factorDecayStep_ = value; + onChanged(); + return this; + } + /** + * optional int32 factor_decay_step = 8 [default = -1]; + */ + public Builder clearFactorDecayStep() { + bitField0_ = (bitField0_ & ~0x00000080); + factorDecayStep_ = -1; + onChanged(); + return this; + } + + private int factorDecayLimit_ = -1; + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public boolean hasFactorDecayLimit() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public int getFactorDecayLimit() { + return factorDecayLimit_; + } + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public Builder setFactorDecayLimit(int value) { + bitField0_ |= 0x00000100; + factorDecayLimit_ = value; + onChanged(); + return this; + } + /** + * optional int32 factor_decay_limit = 9 [default = -1]; + */ + public Builder clearFactorDecayLimit() { + bitField0_ = (bitField0_ & ~0x00000100); + factorDecayLimit_ = -1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:DeepSparkParam) + } + + // @@protoc_insertion_point(class_scope:DeepSparkParam) + private static final org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam(); + } + + public static org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeepSparkParam parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DeepSparkParam(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.acl.deepspark.utils.DeepSparkConf.DeepSparkParam getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_DeepSparkParam_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_DeepSparkParam_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023DeepSparkConf.proto\"\364\001\n\016DeepSparkParam" + + "\022\016\n\006period\030\001 \002(\005\022\023\n\013moving_rate\030\002 \002(\002\022\025\n" + + "\ndecay_rate\030\003 \001(\002:\0011\022\026\n\ndecay_step\030\004 \001(\005" + + ":\002-1\022\027\n\013decay_limit\030\005 \001(\005:\002-1\022\030\n\rserver_" + + "factor\030\006 \001(\002:\0011\022\034\n\021factor_decay_rate\030\007 \001" + + "(\002:\0011\022\035\n\021factor_decay_step\030\010 \001(\005:\002-1\022\036\n\022" + + "factor_decay_limit\030\t \001(\005:\002-1B\031\n\027org.acl." + + "deepspark.utils" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_DeepSparkParam_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_DeepSparkParam_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_DeepSparkParam_descriptor, + new java.lang.String[] { "Period", "MovingRate", "DecayRate", "DecayStep", "DecayLimit", "ServerFactor", "FactorDecayRate", "FactorDecayStep", "FactorDecayLimit", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/org/acl/deepspark/utils/ImagenetSampler.java b/src/main/java/org/acl/deepspark/utils/ImagenetSampler.java index dc1b976..b48cd78 100644 --- a/src/main/java/org/acl/deepspark/utils/ImagenetSampler.java +++ b/src/main/java/org/acl/deepspark/utils/ImagenetSampler.java @@ -29,7 +29,7 @@ public static void main(String[] args) { System.out.println("number of executors = " + numExecutors); System.out.println("Data Loading..."); JavaPairRDD train_seq = - sc.sequenceFile(args[2], FloatWritable.class, ArrayPrimitiveWritable.class); + sc.sequenceFile(args[1], FloatWritable.class, ArrayPrimitiveWritable.class); JavaRDD train_samples = train_seq.map(new Function, Record>() { @Override @@ -60,7 +60,7 @@ public Tuple2 call(Record arg0) throws Exception { } }); - JavaRDD shuffled_data = shuffled.repartition(numExecutors).sortByKey().values(); + JavaRDD shuffled_data = shuffled.sortByKey().values(); JavaPairRDD toSave = shuffled_data.mapToPair(new PairFunction() { @@ -73,7 +73,7 @@ public Tuple2 call(Record arg0) throws Ex } }); - toSave.saveAsHadoopFile("imagenet_sampled.hsf", FloatWritable.class, ArrayPrimitiveWritable.class, SequenceFileOutputFormat.class); + toSave.saveAsHadoopFile(args[2], FloatWritable.class, ArrayPrimitiveWritable.class, SequenceFileOutputFormat.class); sc.close(); } diff --git a/src/main/java/org/acl/deepspark/utils/MnistLoader.java b/src/main/java/org/acl/deepspark/utils/MnistLoader.java index 88144c1..66f7b85 100644 --- a/src/main/java/org/acl/deepspark/utils/MnistLoader.java +++ b/src/main/java/org/acl/deepspark/utils/MnistLoader.java @@ -1,153 +1,153 @@ -package org.acl.deepspark.utils; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Serializable; -import java.util.ArrayList; - -import org.acl.deepspark.data.Record; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; - -public class MnistLoader implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 4845357475294611873L; - private static final int dimRows = 28; - - public static Record[] loadIntoSamples(String path, boolean normalize) { - System.out.println("Data Loading..."); - float label; - BufferedReader reader = null; - ArrayList samples = new ArrayList(); - - try { - reader = new BufferedReader(new FileReader(path)); - String line = null; - String[] feature = null; - while((line = reader.readLine()) != null) { - feature = line.split("\t"); - label = Float.parseFloat(feature[dimRows * dimRows]); - - float[] featureVec = new float[dimRows * dimRows]; - - for(int i = 0; i < feature.length - 1;i++) - featureVec[i] = Float.parseFloat(feature[i]); - - Record s = new Record(); - s.data = featureVec; - if (normalize) { - for(int i = 0; i < s.data.length; i++) - s.data[i] /= 255; - } - - s.label = label; - samples.add(s); - } - - } catch(IOException e) { - e.printStackTrace(); - } finally { - if (reader != null) { - try { - reader.close(); - } catch(IOException e) {} - } - } - - Record[] arr = new Record[samples.size()]; - arr = samples.toArray(arr); - - System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); - return arr; - } - - public static JavaRDD loadRDDFromHDFS(String path, final boolean normalize, JavaSparkContext sc) { - JavaRDD lines = sc.textFile(path); - JavaRDD ret = lines.map(new Function() { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public Record call(String v1) throws Exception { - String[] feature = v1.split("\t"); - float label = Float.parseFloat(feature[dimRows * dimRows]); - float[] featureVec = new float[dimRows * dimRows]; - - for (int i = 0; i < feature.length -1; i++) - featureVec[i] = Float.parseFloat(feature[i]); - - Record s = new Record(); - - s.data = featureVec; - if (normalize) { - for(int i = 0; i < s.data.length; i++) - s.data[i] /= 255; - } - s.label = label; - s.dim = new int[]{1, dimRows, dimRows}; - return s; - } - }); - return ret; - } - - public static Record[] loadFromHDFS(String path, boolean normalize) { - System.out.println("Data Loading..."); - float label; - BufferedReader reader = null; - ArrayList samples = new ArrayList(); - - try { - Path p = new Path(path); - FileSystem fs = FileSystem.get(new Configuration()); - reader = new BufferedReader(new InputStreamReader(fs.open(p))); - - String line = null; - String[] feature = null; - - while ((line = reader.readLine()) != null) { - feature = line.split("\t"); - label = Float.parseFloat(feature[dimRows * dimRows]); - float[] featureVec = new float[dimRows * dimRows]; - for (int i = 0; i < feature.length -1; i++) - featureVec[i] = Float.parseFloat(feature[i]); - - Record s = new Record(); - s.data = featureVec; - if (normalize) { - for(int i = 0; i < s.data.length; i++) - s.data[i] /= 255; - } - s.label = label; - s.dim = new int[]{1, dimRows, dimRows}; - samples.add(s); - } - - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) {} - } - } - - Record[] arr = new Record[samples.size()]; - arr = samples.toArray(arr); - - System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); - return arr; - } -} +package org.acl.deepspark.utils; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Serializable; +import java.util.ArrayList; + +import org.acl.deepspark.data.Record; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.spark.api.java.JavaRDD; +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.api.java.function.Function; + +public class MnistLoader implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 4845357475294611873L; + private static final int dimRows = 28; + + public static Record[] loadIntoSamples(String path, boolean normalize) { + System.out.println("Data Loading..."); + float label; + BufferedReader reader = null; + ArrayList samples = new ArrayList(); + + try { + reader = new BufferedReader(new FileReader(path)); + String line = null; + String[] feature = null; + while((line = reader.readLine()) != null) { + feature = line.split("\t"); + label = Float.parseFloat(feature[dimRows * dimRows]); + + float[] featureVec = new float[dimRows * dimRows]; + + for(int i = 0; i < feature.length - 1;i++) + featureVec[i] = Float.parseFloat(feature[i]); + + Record s = new Record(); + s.data = featureVec; + if (normalize) { + for(int i = 0; i < s.data.length; i++) + s.data[i] /= 255; + } + + s.label = label; + samples.add(s); + } + + } catch(IOException e) { + e.printStackTrace(); + } finally { + if (reader != null) { + try { + reader.close(); + } catch(IOException e) {} + } + } + + Record[] arr = new Record[samples.size()]; + arr = samples.toArray(arr); + + System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); + return arr; + } + + public static JavaRDD loadRDDFromHDFS(String path, final boolean normalize, JavaSparkContext sc) { + JavaRDD lines = sc.textFile(path); + JavaRDD ret = lines.map(new Function() { + + /** + * + */ + private static final long serialVersionUID = 1L; + + public Record call(String v1) throws Exception { + String[] feature = v1.split("\t"); + float label = Float.parseFloat(feature[dimRows * dimRows]); + float[] featureVec = new float[dimRows * dimRows]; + + for (int i = 0; i < feature.length -1; i++) + featureVec[i] = Float.parseFloat(feature[i]); + + Record s = new Record(); + + s.data = featureVec; + if (normalize) { + for(int i = 0; i < s.data.length; i++) + s.data[i] /= 255; + } + s.label = label; + s.dim = new int[]{1, dimRows, dimRows}; + return s; + } + }); + return ret; + } + + public static Record[] loadFromHDFS(String path, boolean normalize) { + System.out.println("Data Loading..."); + float label; + BufferedReader reader = null; + ArrayList samples = new ArrayList(); + + try { + Path p = new Path(path); + FileSystem fs = FileSystem.get(new Configuration()); + reader = new BufferedReader(new InputStreamReader(fs.open(p))); + + String line = null; + String[] feature = null; + + while ((line = reader.readLine()) != null) { + feature = line.split("\t"); + label = Float.parseFloat(feature[dimRows * dimRows]); + float[] featureVec = new float[dimRows * dimRows]; + for (int i = 0; i < feature.length -1; i++) + featureVec[i] = Float.parseFloat(feature[i]); + + Record s = new Record(); + s.data = featureVec; + if (normalize) { + for(int i = 0; i < s.data.length; i++) + s.data[i] /= 255; + } + s.label = label; + s.dim = new int[]{1, dimRows, dimRows}; + samples.add(s); + } + + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) {} + } + } + + Record[] arr = new Record[samples.size()]; + arr = samples.toArray(arr); + + System.out.println(String.format("Loaded %d samples from %s", samples.size(), path)); + return arr; + } +}