singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [04/12] incubator-singa git commit: Transfer code from nusinga repo to singa apache repo. New commuinication framework is implemented to unify the frameworks of existing distributed deep learning systems. Communication is now implmented using ZeroMQ. API
Date Sun, 03 May 2015 14:04:09 GMT
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/b2dc51d2/src/proto/model.pb.h
----------------------------------------------------------------------
diff --git a/src/proto/model.pb.h b/src/proto/model.pb.h
new file mode 100644
index 0000000..bc4d952
--- /dev/null
+++ b/src/proto/model.pb.h
@@ -0,0 +1,8167 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: model.proto
+
+#ifndef PROTOBUF_model_2eproto__INCLUDED
+#define PROTOBUF_model_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace singa {
+
+// Internal implementation detail -- do not call these.
+void  protobuf_AddDesc_model_2eproto();
+void protobuf_AssignDesc_model_2eproto();
+void protobuf_ShutdownFile_model_2eproto();
+
+class ModelProto;
+class NetProto;
+class ParamProto;
+class BlobProtos;
+class LayerProto;
+class RGBImage;
+class SplitProto;
+class TanhProto;
+class SoftmaxLossProto;
+class ConvolutionProto;
+class ConcateProto;
+class DataProto;
+class MnistProto;
+class DropoutProto;
+class InnerProductProto;
+class LRNProto;
+class PoolingProto;
+class SliceProto;
+class ReLUProto;
+class Record;
+class Datum;
+class SingleLabelImageRecord;
+class UpdaterProto;
+class BlobProto;
+
+enum ModelProto_GradCalcAlg {
+  ModelProto_GradCalcAlg_kBackPropagation = 1,
+  ModelProto_GradCalcAlg_kContrastiveDivergence = 2
+};
+bool ModelProto_GradCalcAlg_IsValid(int value);
+const ModelProto_GradCalcAlg ModelProto_GradCalcAlg_GradCalcAlg_MIN = ModelProto_GradCalcAlg_kBackPropagation;
+const ModelProto_GradCalcAlg ModelProto_GradCalcAlg_GradCalcAlg_MAX = ModelProto_GradCalcAlg_kContrastiveDivergence;
+const int ModelProto_GradCalcAlg_GradCalcAlg_ARRAYSIZE = ModelProto_GradCalcAlg_GradCalcAlg_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ModelProto_GradCalcAlg_descriptor();
+inline const ::std::string& ModelProto_GradCalcAlg_Name(ModelProto_GradCalcAlg value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    ModelProto_GradCalcAlg_descriptor(), value);
+}
+inline bool ModelProto_GradCalcAlg_Parse(
+    const ::std::string& name, ModelProto_GradCalcAlg* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<ModelProto_GradCalcAlg>(
+    ModelProto_GradCalcAlg_descriptor(), name, value);
+}
+enum ParamProto_InitMethod {
+  ParamProto_InitMethod_kConstant = 0,
+  ParamProto_InitMethod_kGaussian = 1,
+  ParamProto_InitMethod_kUniform = 2,
+  ParamProto_InitMethod_kPretrained = 3,
+  ParamProto_InitMethod_kGaussainSqrtFanIn = 4,
+  ParamProto_InitMethod_kUniformSqrtFanIn = 5,
+  ParamProto_InitMethod_kUniformSqrtFanInOut = 6
+};
+bool ParamProto_InitMethod_IsValid(int value);
+const ParamProto_InitMethod ParamProto_InitMethod_InitMethod_MIN = ParamProto_InitMethod_kConstant;
+const ParamProto_InitMethod ParamProto_InitMethod_InitMethod_MAX = ParamProto_InitMethod_kUniformSqrtFanInOut;
+const int ParamProto_InitMethod_InitMethod_ARRAYSIZE = ParamProto_InitMethod_InitMethod_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ParamProto_InitMethod_descriptor();
+inline const ::std::string& ParamProto_InitMethod_Name(ParamProto_InitMethod value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    ParamProto_InitMethod_descriptor(), value);
+}
+inline bool ParamProto_InitMethod_Parse(
+    const ::std::string& name, ParamProto_InitMethod* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<ParamProto_InitMethod>(
+    ParamProto_InitMethod_descriptor(), name, value);
+}
+enum LRNProto_NormRegion {
+  LRNProto_NormRegion_ACROSS_CHANNELS = 0,
+  LRNProto_NormRegion_WITHIN_CHANNEL = 1
+};
+bool LRNProto_NormRegion_IsValid(int value);
+const LRNProto_NormRegion LRNProto_NormRegion_NormRegion_MIN = LRNProto_NormRegion_ACROSS_CHANNELS;
+const LRNProto_NormRegion LRNProto_NormRegion_NormRegion_MAX = LRNProto_NormRegion_WITHIN_CHANNEL;
+const int LRNProto_NormRegion_NormRegion_ARRAYSIZE = LRNProto_NormRegion_NormRegion_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* LRNProto_NormRegion_descriptor();
+inline const ::std::string& LRNProto_NormRegion_Name(LRNProto_NormRegion value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    LRNProto_NormRegion_descriptor(), value);
+}
+inline bool LRNProto_NormRegion_Parse(
+    const ::std::string& name, LRNProto_NormRegion* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<LRNProto_NormRegion>(
+    LRNProto_NormRegion_descriptor(), name, value);
+}
+enum PoolingProto_PoolMethod {
+  PoolingProto_PoolMethod_MAX = 0,
+  PoolingProto_PoolMethod_AVE = 1
+};
+bool PoolingProto_PoolMethod_IsValid(int value);
+const PoolingProto_PoolMethod PoolingProto_PoolMethod_PoolMethod_MIN = PoolingProto_PoolMethod_MAX;
+const PoolingProto_PoolMethod PoolingProto_PoolMethod_PoolMethod_MAX = PoolingProto_PoolMethod_AVE;
+const int PoolingProto_PoolMethod_PoolMethod_ARRAYSIZE = PoolingProto_PoolMethod_PoolMethod_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PoolingProto_PoolMethod_descriptor();
+inline const ::std::string& PoolingProto_PoolMethod_Name(PoolingProto_PoolMethod value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PoolingProto_PoolMethod_descriptor(), value);
+}
+inline bool PoolingProto_PoolMethod_Parse(
+    const ::std::string& name, PoolingProto_PoolMethod* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PoolingProto_PoolMethod>(
+    PoolingProto_PoolMethod_descriptor(), name, value);
+}
+enum Record_Type {
+  Record_Type_kSingleLabelImage = 0
+};
+bool Record_Type_IsValid(int value);
+const Record_Type Record_Type_Type_MIN = Record_Type_kSingleLabelImage;
+const Record_Type Record_Type_Type_MAX = Record_Type_kSingleLabelImage;
+const int Record_Type_Type_ARRAYSIZE = Record_Type_Type_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Record_Type_descriptor();
+inline const ::std::string& Record_Type_Name(Record_Type value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Record_Type_descriptor(), value);
+}
+inline bool Record_Type_Parse(
+    const ::std::string& name, Record_Type* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Record_Type>(
+    Record_Type_descriptor(), name, value);
+}
+enum UpdaterProto_ChangeProto {
+  UpdaterProto_ChangeProto_kFixed = 0,
+  UpdaterProto_ChangeProto_kInverse_t = 1,
+  UpdaterProto_ChangeProto_kInverse = 2,
+  UpdaterProto_ChangeProto_kExponential = 3,
+  UpdaterProto_ChangeProto_kLinear = 4,
+  UpdaterProto_ChangeProto_kStep = 5,
+  UpdaterProto_ChangeProto_kFixedStep = 6
+};
+bool UpdaterProto_ChangeProto_IsValid(int value);
+const UpdaterProto_ChangeProto UpdaterProto_ChangeProto_ChangeProto_MIN = UpdaterProto_ChangeProto_kFixed;
+const UpdaterProto_ChangeProto UpdaterProto_ChangeProto_ChangeProto_MAX = UpdaterProto_ChangeProto_kFixedStep;
+const int UpdaterProto_ChangeProto_ChangeProto_ARRAYSIZE = UpdaterProto_ChangeProto_ChangeProto_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* UpdaterProto_ChangeProto_descriptor();
+inline const ::std::string& UpdaterProto_ChangeProto_Name(UpdaterProto_ChangeProto value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    UpdaterProto_ChangeProto_descriptor(), value);
+}
+inline bool UpdaterProto_ChangeProto_Parse(
+    const ::std::string& name, UpdaterProto_ChangeProto* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<UpdaterProto_ChangeProto>(
+    UpdaterProto_ChangeProto_descriptor(), name, value);
+}
+enum MsgType {
+  kGet = 0,
+  kPut = 1,
+  kSync = 2,
+  kUpdate = 3,
+  kSyncRequest = 4,
+  kSyncResponse = 5,
+  kStop = 6,
+  kData = 7,
+  kRGet = 8,
+  kRUpdate = 9,
+  kConnect = 10
+};
+bool MsgType_IsValid(int value);
+const MsgType MsgType_MIN = kGet;
+const MsgType MsgType_MAX = kConnect;
+const int MsgType_ARRAYSIZE = MsgType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* MsgType_descriptor();
+inline const ::std::string& MsgType_Name(MsgType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    MsgType_descriptor(), value);
+}
+inline bool MsgType_Parse(
+    const ::std::string& name, MsgType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<MsgType>(
+    MsgType_descriptor(), name, value);
+}
+enum EntityType {
+  kWorkerParam = 0,
+  kWorkerLayer = 1,
+  kServer = 2,
+  kStub = 3
+};
+bool EntityType_IsValid(int value);
+const EntityType EntityType_MIN = kWorkerParam;
+const EntityType EntityType_MAX = kStub;
+const int EntityType_ARRAYSIZE = EntityType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* EntityType_descriptor();
+inline const ::std::string& EntityType_Name(EntityType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    EntityType_descriptor(), value);
+}
+inline bool EntityType_Parse(
+    const ::std::string& name, EntityType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<EntityType>(
+    EntityType_descriptor(), name, value);
+}
+enum Phase {
+  kTrain = 0,
+  kValidation = 1,
+  kTest = 2
+};
+bool Phase_IsValid(int value);
+const Phase Phase_MIN = kTrain;
+const Phase Phase_MAX = kTest;
+const int Phase_ARRAYSIZE = Phase_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Phase_descriptor();
+inline const ::std::string& Phase_Name(Phase value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Phase_descriptor(), value);
+}
+inline bool Phase_Parse(
+    const ::std::string& name, Phase* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Phase>(
+    Phase_descriptor(), name, value);
+}
+enum ShareOption {
+  kValueOnly = 0,
+  kWhole = 1
+};
+bool ShareOption_IsValid(int value);
+const ShareOption ShareOption_MIN = kValueOnly;
+const ShareOption ShareOption_MAX = kWhole;
+const int ShareOption_ARRAYSIZE = ShareOption_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ShareOption_descriptor();
+inline const ::std::string& ShareOption_Name(ShareOption value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    ShareOption_descriptor(), value);
+}
+inline bool ShareOption_Parse(
+    const ::std::string& name, ShareOption* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<ShareOption>(
+    ShareOption_descriptor(), name, value);
+}
+enum PartitionType {
+  kDataPartition = 0,
+  kLayerPartition = 1,
+  kNone = 2
+};
+bool PartitionType_IsValid(int value);
+const PartitionType PartitionType_MIN = kDataPartition;
+const PartitionType PartitionType_MAX = kNone;
+const int PartitionType_ARRAYSIZE = PartitionType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PartitionType_descriptor();
+inline const ::std::string& PartitionType_Name(PartitionType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PartitionType_descriptor(), value);
+}
+inline bool PartitionType_Parse(
+    const ::std::string& name, PartitionType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PartitionType>(
+    PartitionType_descriptor(), name, value);
+}
+enum ConnectionType {
+  kOneToOne = 0,
+  kOneToAll = 1
+};
+bool ConnectionType_IsValid(int value);
+const ConnectionType ConnectionType_MIN = kOneToOne;
+const ConnectionType ConnectionType_MAX = kOneToAll;
+const int ConnectionType_ARRAYSIZE = ConnectionType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ConnectionType_descriptor();
+inline const ::std::string& ConnectionType_Name(ConnectionType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    ConnectionType_descriptor(), value);
+}
+inline bool ConnectionType_Parse(
+    const ::std::string& name, ConnectionType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<ConnectionType>(
+    ConnectionType_descriptor(), name, value);
+}
+// ===================================================================
+
+class ModelProto : public ::google::protobuf::Message {
+ public:
+  ModelProto();
+  virtual ~ModelProto();
+
+  ModelProto(const ModelProto& from);
+
+  inline ModelProto& operator=(const ModelProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const ModelProto& default_instance();
+
+  void Swap(ModelProto* other);
+
+  // implements Message ----------------------------------------------
+
+  ModelProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const ModelProto& from);
+  void MergeFrom(const ModelProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  typedef ModelProto_GradCalcAlg GradCalcAlg;
+  static const GradCalcAlg kBackPropagation = ModelProto_GradCalcAlg_kBackPropagation;
+  static const GradCalcAlg kContrastiveDivergence = ModelProto_GradCalcAlg_kContrastiveDivergence;
+  static inline bool GradCalcAlg_IsValid(int value) {
+    return ModelProto_GradCalcAlg_IsValid(value);
+  }
+  static const GradCalcAlg GradCalcAlg_MIN =
+    ModelProto_GradCalcAlg_GradCalcAlg_MIN;
+  static const GradCalcAlg GradCalcAlg_MAX =
+    ModelProto_GradCalcAlg_GradCalcAlg_MAX;
+  static const int GradCalcAlg_ARRAYSIZE =
+    ModelProto_GradCalcAlg_GradCalcAlg_ARRAYSIZE;
+  static inline const ::google::protobuf::EnumDescriptor*
+  GradCalcAlg_descriptor() {
+    return ModelProto_GradCalcAlg_descriptor();
+  }
+  static inline const ::std::string& GradCalcAlg_Name(GradCalcAlg value) {
+    return ModelProto_GradCalcAlg_Name(value);
+  }
+  static inline bool GradCalcAlg_Parse(const ::std::string& name,
+      GradCalcAlg* value) {
+    return ModelProto_GradCalcAlg_Parse(name, value);
+  }
+
+  // accessors -------------------------------------------------------
+
+  // optional string name = 1;
+  inline bool has_name() const;
+  inline void clear_name();
+  static const int kNameFieldNumber = 1;
+  inline const ::std::string& name() const;
+  inline void set_name(const ::std::string& value);
+  inline void set_name(const char* value);
+  inline void set_name(const char* value, size_t size);
+  inline ::std::string* mutable_name();
+  inline ::std::string* release_name();
+  inline void set_allocated_name(::std::string* name);
+
+  // optional string train_folder = 2 [default = "train"];
+  inline bool has_train_folder() const;
+  inline void clear_train_folder();
+  static const int kTrainFolderFieldNumber = 2;
+  inline const ::std::string& train_folder() const;
+  inline void set_train_folder(const ::std::string& value);
+  inline void set_train_folder(const char* value);
+  inline void set_train_folder(const char* value, size_t size);
+  inline ::std::string* mutable_train_folder();
+  inline ::std::string* release_train_folder();
+  inline void set_allocated_train_folder(::std::string* train_folder);
+
+  // optional string test_folder = 3 [default = "test"];
+  inline bool has_test_folder() const;
+  inline void clear_test_folder();
+  static const int kTestFolderFieldNumber = 3;
+  inline const ::std::string& test_folder() const;
+  inline void set_test_folder(const ::std::string& value);
+  inline void set_test_folder(const char* value);
+  inline void set_test_folder(const char* value, size_t size);
+  inline ::std::string* mutable_test_folder();
+  inline ::std::string* release_test_folder();
+  inline void set_allocated_test_folder(::std::string* test_folder);
+
+  // optional string validation_folder = 4 [default = "validation"];
+  inline bool has_validation_folder() const;
+  inline void clear_validation_folder();
+  static const int kValidationFolderFieldNumber = 4;
+  inline const ::std::string& validation_folder() const;
+  inline void set_validation_folder(const ::std::string& value);
+  inline void set_validation_folder(const char* value);
+  inline void set_validation_folder(const char* value, size_t size);
+  inline ::std::string* mutable_validation_folder();
+  inline ::std::string* release_validation_folder();
+  inline void set_allocated_validation_folder(::std::string* validation_folder);
+
+  // optional int32 display_after_steps = 6 [default = 0];
+  inline bool has_display_after_steps() const;
+  inline void clear_display_after_steps();
+  static const int kDisplayAfterStepsFieldNumber = 6;
+  inline ::google::protobuf::int32 display_after_steps() const;
+  inline void set_display_after_steps(::google::protobuf::int32 value);
+
+  // optional int32 display_frequency = 7 [default = 0];
+  inline bool has_display_frequency() const;
+  inline void clear_display_frequency();
+  static const int kDisplayFrequencyFieldNumber = 7;
+  inline ::google::protobuf::int32 display_frequency() const;
+  inline void set_display_frequency(::google::protobuf::int32 value);
+
+  // optional int32 validation_after_steps = 10 [default = 0];
+  inline bool has_validation_after_steps() const;
+  inline void clear_validation_after_steps();
+  static const int kValidationAfterStepsFieldNumber = 10;
+  inline ::google::protobuf::int32 validation_after_steps() const;
+  inline void set_validation_after_steps(::google::protobuf::int32 value);
+
+  // optional int32 validation_frequency = 11 [default = 0];
+  inline bool has_validation_frequency() const;
+  inline void clear_validation_frequency();
+  static const int kValidationFrequencyFieldNumber = 11;
+  inline ::google::protobuf::int32 validation_frequency() const;
+  inline void set_validation_frequency(::google::protobuf::int32 value);
+
+  // optional int32 test_after_steps = 13 [default = 0];
+  inline bool has_test_after_steps() const;
+  inline void clear_test_after_steps();
+  static const int kTestAfterStepsFieldNumber = 13;
+  inline ::google::protobuf::int32 test_after_steps() const;
+  inline void set_test_after_steps(::google::protobuf::int32 value);
+
+  // optional int32 test_frequency = 14 [default = 0];
+  inline bool has_test_frequency() const;
+  inline void clear_test_frequency();
+  static const int kTestFrequencyFieldNumber = 14;
+  inline ::google::protobuf::int32 test_frequency() const;
+  inline void set_test_frequency(::google::protobuf::int32 value);
+
+  // optional int32 checkpoint_after_steps = 15 [default = 0];
+  inline bool has_checkpoint_after_steps() const;
+  inline void clear_checkpoint_after_steps();
+  static const int kCheckpointAfterStepsFieldNumber = 15;
+  inline ::google::protobuf::int32 checkpoint_after_steps() const;
+  inline void set_checkpoint_after_steps(::google::protobuf::int32 value);
+
+  // optional int32 checkpoint_frequency = 16 [default = 0];
+  inline bool has_checkpoint_frequency() const;
+  inline void clear_checkpoint_frequency();
+  static const int kCheckpointFrequencyFieldNumber = 16;
+  inline ::google::protobuf::int32 checkpoint_frequency() const;
+  inline void set_checkpoint_frequency(::google::protobuf::int32 value);
+
+  // optional bool prefetch = 18 [default = true];
+  inline bool has_prefetch() const;
+  inline void clear_prefetch();
+  static const int kPrefetchFieldNumber = 18;
+  inline bool prefetch() const;
+  inline void set_prefetch(bool value);
+
+  // optional int32 train_steps = 20;
+  inline bool has_train_steps() const;
+  inline void clear_train_steps();
+  static const int kTrainStepsFieldNumber = 20;
+  inline ::google::protobuf::int32 train_steps() const;
+  inline void set_train_steps(::google::protobuf::int32 value);
+
+  // optional int32 validation_steps = 21;
+  inline bool has_validation_steps() const;
+  inline void clear_validation_steps();
+  static const int kValidationStepsFieldNumber = 21;
+  inline ::google::protobuf::int32 validation_steps() const;
+  inline void set_validation_steps(::google::protobuf::int32 value);
+
+  // optional int32 test_steps = 22;
+  inline bool has_test_steps() const;
+  inline void clear_test_steps();
+  static const int kTestStepsFieldNumber = 22;
+  inline ::google::protobuf::int32 test_steps() const;
+  inline void set_test_steps(::google::protobuf::int32 value);
+
+  // optional int32 step = 29 [default = 0];
+  inline bool has_step() const;
+  inline void clear_step();
+  static const int kStepFieldNumber = 29;
+  inline ::google::protobuf::int32 step() const;
+  inline void set_step(::google::protobuf::int32 value);
+
+  // optional .singa.UpdaterProto updater = 31;
+  inline bool has_updater() const;
+  inline void clear_updater();
+  static const int kUpdaterFieldNumber = 31;
+  inline const ::singa::UpdaterProto& updater() const;
+  inline ::singa::UpdaterProto* mutable_updater();
+  inline ::singa::UpdaterProto* release_updater();
+  inline void set_allocated_updater(::singa::UpdaterProto* updater);
+
+  // optional .singa.ModelProto.GradCalcAlg alg = 32 [default = kBackPropagation];
+  inline bool has_alg() const;
+  inline void clear_alg();
+  static const int kAlgFieldNumber = 32;
+  inline ::singa::ModelProto_GradCalcAlg alg() const;
+  inline void set_alg(::singa::ModelProto_GradCalcAlg value);
+
+  // optional bool hogwild = 33 [default = false];
+  inline bool has_hogwild() const;
+  inline void clear_hogwild();
+  static const int kHogwildFieldNumber = 33;
+  inline bool hogwild() const;
+  inline void set_hogwild(bool value);
+
+  // optional .singa.NetProto neuralnet = 40;
+  inline bool has_neuralnet() const;
+  inline void clear_neuralnet();
+  static const int kNeuralnetFieldNumber = 40;
+  inline const ::singa::NetProto& neuralnet() const;
+  inline ::singa::NetProto* mutable_neuralnet();
+  inline ::singa::NetProto* release_neuralnet();
+  inline void set_allocated_neuralnet(::singa::NetProto* neuralnet);
+
+  // optional bool debug = 41 [default = false];
+  inline bool has_debug() const;
+  inline void clear_debug();
+  static const int kDebugFieldNumber = 41;
+  inline bool debug() const;
+  inline void set_debug(bool value);
+
+  // @@protoc_insertion_point(class_scope:singa.ModelProto)
+ private:
+  inline void set_has_name();
+  inline void clear_has_name();
+  inline void set_has_train_folder();
+  inline void clear_has_train_folder();
+  inline void set_has_test_folder();
+  inline void clear_has_test_folder();
+  inline void set_has_validation_folder();
+  inline void clear_has_validation_folder();
+  inline void set_has_display_after_steps();
+  inline void clear_has_display_after_steps();
+  inline void set_has_display_frequency();
+  inline void clear_has_display_frequency();
+  inline void set_has_validation_after_steps();
+  inline void clear_has_validation_after_steps();
+  inline void set_has_validation_frequency();
+  inline void clear_has_validation_frequency();
+  inline void set_has_test_after_steps();
+  inline void clear_has_test_after_steps();
+  inline void set_has_test_frequency();
+  inline void clear_has_test_frequency();
+  inline void set_has_checkpoint_after_steps();
+  inline void clear_has_checkpoint_after_steps();
+  inline void set_has_checkpoint_frequency();
+  inline void clear_has_checkpoint_frequency();
+  inline void set_has_prefetch();
+  inline void clear_has_prefetch();
+  inline void set_has_train_steps();
+  inline void clear_has_train_steps();
+  inline void set_has_validation_steps();
+  inline void clear_has_validation_steps();
+  inline void set_has_test_steps();
+  inline void clear_has_test_steps();
+  inline void set_has_step();
+  inline void clear_has_step();
+  inline void set_has_updater();
+  inline void clear_has_updater();
+  inline void set_has_alg();
+  inline void clear_has_alg();
+  inline void set_has_hogwild();
+  inline void clear_has_hogwild();
+  inline void set_has_neuralnet();
+  inline void clear_has_neuralnet();
+  inline void set_has_debug();
+  inline void clear_has_debug();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::std::string* name_;
+  ::std::string* train_folder_;
+  static ::std::string* _default_train_folder_;
+  ::std::string* test_folder_;
+  static ::std::string* _default_test_folder_;
+  ::std::string* validation_folder_;
+  static ::std::string* _default_validation_folder_;
+  ::google::protobuf::int32 display_after_steps_;
+  ::google::protobuf::int32 display_frequency_;
+  ::google::protobuf::int32 validation_after_steps_;
+  ::google::protobuf::int32 validation_frequency_;
+  ::google::protobuf::int32 test_after_steps_;
+  ::google::protobuf::int32 test_frequency_;
+  ::google::protobuf::int32 checkpoint_after_steps_;
+  ::google::protobuf::int32 checkpoint_frequency_;
+  ::google::protobuf::int32 train_steps_;
+  ::google::protobuf::int32 validation_steps_;
+  ::google::protobuf::int32 test_steps_;
+  ::google::protobuf::int32 step_;
+  ::singa::UpdaterProto* updater_;
+  bool prefetch_;
+  bool hogwild_;
+  bool debug_;
+  int alg_;
+  ::singa::NetProto* neuralnet_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(22 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static ModelProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class NetProto : public ::google::protobuf::Message {
+ public:
+  NetProto();
+  virtual ~NetProto();
+
+  NetProto(const NetProto& from);
+
+  inline NetProto& operator=(const NetProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const NetProto& default_instance();
+
+  void Swap(NetProto* other);
+
+  // implements Message ----------------------------------------------
+
+  NetProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const NetProto& from);
+  void MergeFrom(const NetProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .singa.LayerProto layer = 1;
+  inline int layer_size() const;
+  inline void clear_layer();
+  static const int kLayerFieldNumber = 1;
+  inline const ::singa::LayerProto& layer(int index) const;
+  inline ::singa::LayerProto* mutable_layer(int index);
+  inline ::singa::LayerProto* add_layer();
+  inline const ::google::protobuf::RepeatedPtrField< ::singa::LayerProto >&
+      layer() const;
+  inline ::google::protobuf::RepeatedPtrField< ::singa::LayerProto >*
+      mutable_layer();
+
+  // optional .singa.PartitionType partition_type = 3 [default = kNone];
+  inline bool has_partition_type() const;
+  inline void clear_partition_type();
+  static const int kPartitionTypeFieldNumber = 3;
+  inline ::singa::PartitionType partition_type() const;
+  inline void set_partition_type(::singa::PartitionType value);
+
+  // @@protoc_insertion_point(class_scope:singa.NetProto)
+ private:
+  inline void set_has_partition_type();
+  inline void clear_has_partition_type();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::RepeatedPtrField< ::singa::LayerProto > layer_;
+  int partition_type_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static NetProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class ParamProto : public ::google::protobuf::Message {
+ public:
+  ParamProto();
+  virtual ~ParamProto();
+
+  ParamProto(const ParamProto& from);
+
+  inline ParamProto& operator=(const ParamProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const ParamProto& default_instance();
+
+  void Swap(ParamProto* other);
+
+  // implements Message ----------------------------------------------
+
+  ParamProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const ParamProto& from);
+  void MergeFrom(const ParamProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  typedef ParamProto_InitMethod InitMethod;
+  static const InitMethod kConstant = ParamProto_InitMethod_kConstant;
+  static const InitMethod kGaussian = ParamProto_InitMethod_kGaussian;
+  static const InitMethod kUniform = ParamProto_InitMethod_kUniform;
+  static const InitMethod kPretrained = ParamProto_InitMethod_kPretrained;
+  static const InitMethod kGaussainSqrtFanIn = ParamProto_InitMethod_kGaussainSqrtFanIn;
+  static const InitMethod kUniformSqrtFanIn = ParamProto_InitMethod_kUniformSqrtFanIn;
+  static const InitMethod kUniformSqrtFanInOut = ParamProto_InitMethod_kUniformSqrtFanInOut;
+  static inline bool InitMethod_IsValid(int value) {
+    return ParamProto_InitMethod_IsValid(value);
+  }
+  static const InitMethod InitMethod_MIN =
+    ParamProto_InitMethod_InitMethod_MIN;
+  static const InitMethod InitMethod_MAX =
+    ParamProto_InitMethod_InitMethod_MAX;
+  static const int InitMethod_ARRAYSIZE =
+    ParamProto_InitMethod_InitMethod_ARRAYSIZE;
+  static inline const ::google::protobuf::EnumDescriptor*
+  InitMethod_descriptor() {
+    return ParamProto_InitMethod_descriptor();
+  }
+  static inline const ::std::string& InitMethod_Name(InitMethod value) {
+    return ParamProto_InitMethod_Name(value);
+  }
+  static inline bool InitMethod_Parse(const ::std::string& name,
+      InitMethod* value) {
+    return ParamProto_InitMethod_Parse(name, value);
+  }
+
+  // accessors -------------------------------------------------------
+
+  // optional string name = 1;
+  inline bool has_name() const;
+  inline void clear_name();
+  static const int kNameFieldNumber = 1;
+  inline const ::std::string& name() const;
+  inline void set_name(const ::std::string& value);
+  inline void set_name(const char* value);
+  inline void set_name(const char* value, size_t size);
+  inline ::std::string* mutable_name();
+  inline ::std::string* release_name();
+  inline void set_allocated_name(::std::string* name);
+
+  // optional int32 id = 2;
+  inline bool has_id() const;
+  inline void clear_id();
+  static const int kIdFieldNumber = 2;
+  inline ::google::protobuf::int32 id() const;
+  inline void set_id(::google::protobuf::int32 value);
+
+  // repeated int32 shape = 3;
+  inline int shape_size() const;
+  inline void clear_shape();
+  static const int kShapeFieldNumber = 3;
+  inline ::google::protobuf::int32 shape(int index) const;
+  inline void set_shape(int index, ::google::protobuf::int32 value);
+  inline void add_shape(::google::protobuf::int32 value);
+  inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+      shape() const;
+  inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+      mutable_shape();
+
+  // optional int32 split_threshold = 4 [default = 5000000];
+  inline bool has_split_threshold() const;
+  inline void clear_split_threshold();
+  static const int kSplitThresholdFieldNumber = 4;
+  inline ::google::protobuf::int32 split_threshold() const;
+  inline void set_split_threshold(::google::protobuf::int32 value);
+
+  // optional int32 partition_dim = 5 [default = -1];
+  inline bool has_partition_dim() const;
+  inline void clear_partition_dim();
+  static const int kPartitionDimFieldNumber = 5;
+  inline ::google::protobuf::int32 partition_dim() const;
+  inline void set_partition_dim(::google::protobuf::int32 value);
+
+  // optional int32 version = 6;
+  inline bool has_version() const;
+  inline void clear_version();
+  static const int kVersionFieldNumber = 6;
+  inline ::google::protobuf::int32 version() const;
+  inline void set_version(::google::protobuf::int32 value);
+
+  // optional .singa.ParamProto.InitMethod init_method = 7 [default = kConstant];
+  inline bool has_init_method() const;
+  inline void clear_init_method();
+  static const int kInitMethodFieldNumber = 7;
+  inline ::singa::ParamProto_InitMethod init_method() const;
+  inline void set_init_method(::singa::ParamProto_InitMethod value);
+
+  // optional float value = 8 [default = 1];
+  inline bool has_value() const;
+  inline void clear_value();
+  static const int kValueFieldNumber = 8;
+  inline float value() const;
+  inline void set_value(float value);
+
+  // optional float low = 9 [default = -1];
+  inline bool has_low() const;
+  inline void clear_low();
+  static const int kLowFieldNumber = 9;
+  inline float low() const;
+  inline void set_low(float value);
+
+  // optional float high = 10 [default = 1];
+  inline bool has_high() const;
+  inline void clear_high();
+  static const int kHighFieldNumber = 10;
+  inline float high() const;
+  inline void set_high(float value);
+
+  // optional float mean = 11 [default = 0];
+  inline bool has_mean() const;
+  inline void clear_mean();
+  static const int kMeanFieldNumber = 11;
+  inline float mean() const;
+  inline void set_mean(float value);
+
+  // optional float std = 12 [default = 1];
+  inline bool has_std() const;
+  inline void clear_std();
+  static const int kStdFieldNumber = 12;
+  inline float std() const;
+  inline void set_std(float value);
+
+  // optional float learning_rate_multiplier = 13 [default = 1];
+  inline bool has_learning_rate_multiplier() const;
+  inline void clear_learning_rate_multiplier();
+  static const int kLearningRateMultiplierFieldNumber = 13;
+  inline float learning_rate_multiplier() const;
+  inline void set_learning_rate_multiplier(float value);
+
+  // optional float weight_decay_multiplier = 14 [default = 1];
+  inline bool has_weight_decay_multiplier() const;
+  inline void clear_weight_decay_multiplier();
+  static const int kWeightDecayMultiplierFieldNumber = 14;
+  inline float weight_decay_multiplier() const;
+  inline void set_weight_decay_multiplier(float value);
+
+  // @@protoc_insertion_point(class_scope:singa.ParamProto)
+ private:
+  inline void set_has_name();
+  inline void clear_has_name();
+  inline void set_has_id();
+  inline void clear_has_id();
+  inline void set_has_split_threshold();
+  inline void clear_has_split_threshold();
+  inline void set_has_partition_dim();
+  inline void clear_has_partition_dim();
+  inline void set_has_version();
+  inline void clear_has_version();
+  inline void set_has_init_method();
+  inline void clear_has_init_method();
+  inline void set_has_value();
+  inline void clear_has_value();
+  inline void set_has_low();
+  inline void clear_has_low();
+  inline void set_has_high();
+  inline void clear_has_high();
+  inline void set_has_mean();
+  inline void clear_has_mean();
+  inline void set_has_std();
+  inline void clear_has_std();
+  inline void set_has_learning_rate_multiplier();
+  inline void clear_has_learning_rate_multiplier();
+  inline void set_has_weight_decay_multiplier();
+  inline void clear_has_weight_decay_multiplier();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::std::string* name_;
+  ::google::protobuf::RepeatedField< ::google::protobuf::int32 > shape_;
+  ::google::protobuf::int32 id_;
+  ::google::protobuf::int32 split_threshold_;
+  ::google::protobuf::int32 partition_dim_;
+  ::google::protobuf::int32 version_;
+  int init_method_;
+  float value_;
+  float low_;
+  float high_;
+  float mean_;
+  float std_;
+  float learning_rate_multiplier_;
+  float weight_decay_multiplier_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(14 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static ParamProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class BlobProtos : public ::google::protobuf::Message {
+ public:
+  BlobProtos();
+  virtual ~BlobProtos();
+
+  BlobProtos(const BlobProtos& from);
+
+  inline BlobProtos& operator=(const BlobProtos& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const BlobProtos& default_instance();
+
+  void Swap(BlobProtos* other);
+
+  // implements Message ----------------------------------------------
+
+  BlobProtos* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const BlobProtos& from);
+  void MergeFrom(const BlobProtos& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .singa.BlobProto blobs = 1;
+  inline int blobs_size() const;
+  inline void clear_blobs();
+  static const int kBlobsFieldNumber = 1;
+  inline const ::singa::BlobProto& blobs(int index) const;
+  inline ::singa::BlobProto* mutable_blobs(int index);
+  inline ::singa::BlobProto* add_blobs();
+  inline const ::google::protobuf::RepeatedPtrField< ::singa::BlobProto >&
+      blobs() const;
+  inline ::google::protobuf::RepeatedPtrField< ::singa::BlobProto >*
+      mutable_blobs();
+
+  // repeated int32 ids = 2;
+  inline int ids_size() const;
+  inline void clear_ids();
+  static const int kIdsFieldNumber = 2;
+  inline ::google::protobuf::int32 ids(int index) const;
+  inline void set_ids(int index, ::google::protobuf::int32 value);
+  inline void add_ids(::google::protobuf::int32 value);
+  inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+      ids() const;
+  inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+      mutable_ids();
+
+  // repeated string names = 3;
+  inline int names_size() const;
+  inline void clear_names();
+  static const int kNamesFieldNumber = 3;
+  inline const ::std::string& names(int index) const;
+  inline ::std::string* mutable_names(int index);
+  inline void set_names(int index, const ::std::string& value);
+  inline void set_names(int index, const char* value);
+  inline void set_names(int index, const char* value, size_t size);
+  inline ::std::string* add_names();
+  inline void add_names(const ::std::string& value);
+  inline void add_names(const char* value);
+  inline void add_names(const char* value, size_t size);
+  inline const ::google::protobuf::RepeatedPtrField< ::std::string>& names() const;
+  inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_names();
+
+  // @@protoc_insertion_point(class_scope:singa.BlobProtos)
+ private:
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::RepeatedPtrField< ::singa::BlobProto > blobs_;
+  ::google::protobuf::RepeatedField< ::google::protobuf::int32 > ids_;
+  ::google::protobuf::RepeatedPtrField< ::std::string> names_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static BlobProtos* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LayerProto : public ::google::protobuf::Message {
+ public:
+  LayerProto();
+  virtual ~LayerProto();
+
+  LayerProto(const LayerProto& from);
+
+  inline LayerProto& operator=(const LayerProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const LayerProto& default_instance();
+
+  void Swap(LayerProto* other);
+
+  // implements Message ----------------------------------------------
+
+  LayerProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const LayerProto& from);
+  void MergeFrom(const LayerProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional string name = 1;
+  inline bool has_name() const;
+  inline void clear_name();
+  static const int kNameFieldNumber = 1;
+  inline const ::std::string& name() const;
+  inline void set_name(const ::std::string& value);
+  inline void set_name(const char* value);
+  inline void set_name(const char* value, size_t size);
+  inline ::std::string* mutable_name();
+  inline ::std::string* release_name();
+  inline void set_allocated_name(::std::string* name);
+
+  // optional string type = 2;
+  inline bool has_type() const;
+  inline void clear_type();
+  static const int kTypeFieldNumber = 2;
+  inline const ::std::string& type() const;
+  inline void set_type(const ::std::string& value);
+  inline void set_type(const char* value);
+  inline void set_type(const char* value, size_t size);
+  inline ::std::string* mutable_type();
+  inline ::std::string* release_type();
+  inline void set_allocated_type(::std::string* type);
+
+  // repeated string srclayers = 3;
+  inline int srclayers_size() const;
+  inline void clear_srclayers();
+  static const int kSrclayersFieldNumber = 3;
+  inline const ::std::string& srclayers(int index) const;
+  inline ::std::string* mutable_srclayers(int index);
+  inline void set_srclayers(int index, const ::std::string& value);
+  inline void set_srclayers(int index, const char* value);
+  inline void set_srclayers(int index, const char* value, size_t size);
+  inline ::std::string* add_srclayers();
+  inline void add_srclayers(const ::std::string& value);
+  inline void add_srclayers(const char* value);
+  inline void add_srclayers(const char* value, size_t size);
+  inline const ::google::protobuf::RepeatedPtrField< ::std::string>& srclayers() const;
+  inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_srclayers();
+
+  // optional int32 locationid = 4 [default = 0];
+  inline bool has_locationid() const;
+  inline void clear_locationid();
+  static const int kLocationidFieldNumber = 4;
+  inline ::google::protobuf::int32 locationid() const;
+  inline void set_locationid(::google::protobuf::int32 value);
+
+  // optional int32 partitionid = 5 [default = 0];
+  inline bool has_partitionid() const;
+  inline void clear_partitionid();
+  static const int kPartitionidFieldNumber = 5;
+  inline ::google::protobuf::int32 partitionid() const;
+  inline void set_partitionid(::google::protobuf::int32 value);
+
+  // optional .singa.PartitionType partition_type = 6;
+  inline bool has_partition_type() const;
+  inline void clear_partition_type();
+  static const int kPartitionTypeFieldNumber = 6;
+  inline ::singa::PartitionType partition_type() const;
+  inline void set_partition_type(::singa::PartitionType value);
+
+  // repeated string share_ary = 11;
+  inline int share_ary_size() const;
+  inline void clear_share_ary();
+  static const int kShareAryFieldNumber = 11;
+  inline const ::std::string& share_ary(int index) const;
+  inline ::std::string* mutable_share_ary(int index);
+  inline void set_share_ary(int index, const ::std::string& value);
+  inline void set_share_ary(int index, const char* value);
+  inline void set_share_ary(int index, const char* value, size_t size);
+  inline ::std::string* add_share_ary();
+  inline void add_share_ary(const ::std::string& value);
+  inline void add_share_ary(const char* value);
+  inline void add_share_ary(const char* value, size_t size);
+  inline const ::google::protobuf::RepeatedPtrField< ::std::string>& share_ary() const;
+  inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_share_ary();
+
+  // repeated .singa.ParamProto param = 12;
+  inline int param_size() const;
+  inline void clear_param();
+  static const int kParamFieldNumber = 12;
+  inline const ::singa::ParamProto& param(int index) const;
+  inline ::singa::ParamProto* mutable_param(int index);
+  inline ::singa::ParamProto* add_param();
+  inline const ::google::protobuf::RepeatedPtrField< ::singa::ParamProto >&
+      param() const;
+  inline ::google::protobuf::RepeatedPtrField< ::singa::ParamProto >*
+      mutable_param();
+
+  // repeated string share_param = 13;
+  inline int share_param_size() const;
+  inline void clear_share_param();
+  static const int kShareParamFieldNumber = 13;
+  inline const ::std::string& share_param(int index) const;
+  inline ::std::string* mutable_share_param(int index);
+  inline void set_share_param(int index, const ::std::string& value);
+  inline void set_share_param(int index, const char* value);
+  inline void set_share_param(int index, const char* value, size_t size);
+  inline ::std::string* add_share_param();
+  inline void add_share_param(const ::std::string& value);
+  inline void add_share_param(const char* value);
+  inline void add_share_param(const char* value, size_t size);
+  inline const ::google::protobuf::RepeatedPtrField< ::std::string>& share_param() const;
+  inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_share_param();
+
+  // repeated .singa.Phase exclude = 20;
+  inline int exclude_size() const;
+  inline void clear_exclude();
+  static const int kExcludeFieldNumber = 20;
+  inline ::singa::Phase exclude(int index) const;
+  inline void set_exclude(int index, ::singa::Phase value);
+  inline void add_exclude(::singa::Phase value);
+  inline const ::google::protobuf::RepeatedField<int>& exclude() const;
+  inline ::google::protobuf::RepeatedField<int>* mutable_exclude();
+
+  // optional .singa.ConvolutionProto convolution_param = 21;
+  inline bool has_convolution_param() const;
+  inline void clear_convolution_param();
+  static const int kConvolutionParamFieldNumber = 21;
+  inline const ::singa::ConvolutionProto& convolution_param() const;
+  inline ::singa::ConvolutionProto* mutable_convolution_param();
+  inline ::singa::ConvolutionProto* release_convolution_param();
+  inline void set_allocated_convolution_param(::singa::ConvolutionProto* convolution_param);
+
+  // optional .singa.ConcateProto concate_param = 31;
+  inline bool has_concate_param() const;
+  inline void clear_concate_param();
+  static const int kConcateParamFieldNumber = 31;
+  inline const ::singa::ConcateProto& concate_param() const;
+  inline ::singa::ConcateProto* mutable_concate_param();
+  inline ::singa::ConcateProto* release_concate_param();
+  inline void set_allocated_concate_param(::singa::ConcateProto* concate_param);
+
+  // optional .singa.DataProto data_param = 22;
+  inline bool has_data_param() const;
+  inline void clear_data_param();
+  static const int kDataParamFieldNumber = 22;
+  inline const ::singa::DataProto& data_param() const;
+  inline ::singa::DataProto* mutable_data_param();
+  inline ::singa::DataProto* release_data_param();
+  inline void set_allocated_data_param(::singa::DataProto* data_param);
+
+  // optional .singa.DropoutProto dropout_param = 23;
+  inline bool has_dropout_param() const;
+  inline void clear_dropout_param();
+  static const int kDropoutParamFieldNumber = 23;
+  inline const ::singa::DropoutProto& dropout_param() const;
+  inline ::singa::DropoutProto* mutable_dropout_param();
+  inline ::singa::DropoutProto* release_dropout_param();
+  inline void set_allocated_dropout_param(::singa::DropoutProto* dropout_param);
+
+  // optional .singa.InnerProductProto inner_product_param = 24;
+  inline bool has_inner_product_param() const;
+  inline void clear_inner_product_param();
+  static const int kInnerProductParamFieldNumber = 24;
+  inline const ::singa::InnerProductProto& inner_product_param() const;
+  inline ::singa::InnerProductProto* mutable_inner_product_param();
+  inline ::singa::InnerProductProto* release_inner_product_param();
+  inline void set_allocated_inner_product_param(::singa::InnerProductProto* inner_product_param);
+
+  // optional .singa.LRNProto lrn_param = 25;
+  inline bool has_lrn_param() const;
+  inline void clear_lrn_param();
+  static const int kLrnParamFieldNumber = 25;
+  inline const ::singa::LRNProto& lrn_param() const;
+  inline ::singa::LRNProto* mutable_lrn_param();
+  inline ::singa::LRNProto* release_lrn_param();
+  inline void set_allocated_lrn_param(::singa::LRNProto* lrn_param);
+
+  // optional .singa.MnistProto mnist_param = 26;
+  inline bool has_mnist_param() const;
+  inline void clear_mnist_param();
+  static const int kMnistParamFieldNumber = 26;
+  inline const ::singa::MnistProto& mnist_param() const;
+  inline ::singa::MnistProto* mutable_mnist_param();
+  inline ::singa::MnistProto* release_mnist_param();
+  inline void set_allocated_mnist_param(::singa::MnistProto* mnist_param);
+
+  // optional .singa.PoolingProto pooling_param = 27;
+  inline bool has_pooling_param() const;
+  inline void clear_pooling_param();
+  static const int kPoolingParamFieldNumber = 27;
+  inline const ::singa::PoolingProto& pooling_param() const;
+  inline ::singa::PoolingProto* mutable_pooling_param();
+  inline ::singa::PoolingProto* release_pooling_param();
+  inline void set_allocated_pooling_param(::singa::PoolingProto* pooling_param);
+
+  // optional .singa.SliceProto slice_param = 32;
+  inline bool has_slice_param() const;
+  inline void clear_slice_param();
+  static const int kSliceParamFieldNumber = 32;
+  inline const ::singa::SliceProto& slice_param() const;
+  inline ::singa::SliceProto* mutable_slice_param();
+  inline ::singa::SliceProto* release_slice_param();
+  inline void set_allocated_slice_param(::singa::SliceProto* slice_param);
+
+  // optional .singa.SplitProto split_param = 33;
+  inline bool has_split_param() const;
+  inline void clear_split_param();
+  static const int kSplitParamFieldNumber = 33;
+  inline const ::singa::SplitProto& split_param() const;
+  inline ::singa::SplitProto* mutable_split_param();
+  inline ::singa::SplitProto* release_split_param();
+  inline void set_allocated_split_param(::singa::SplitProto* split_param);
+
+  // optional .singa.ReLUProto relu_param = 28;
+  inline bool has_relu_param() const;
+  inline void clear_relu_param();
+  static const int kReluParamFieldNumber = 28;
+  inline const ::singa::ReLUProto& relu_param() const;
+  inline ::singa::ReLUProto* mutable_relu_param();
+  inline ::singa::ReLUProto* release_relu_param();
+  inline void set_allocated_relu_param(::singa::ReLUProto* relu_param);
+
+  // optional .singa.RGBImage rgbimage_param = 34;
+  inline bool has_rgbimage_param() const;
+  inline void clear_rgbimage_param();
+  static const int kRgbimageParamFieldNumber = 34;
+  inline const ::singa::RGBImage& rgbimage_param() const;
+  inline ::singa::RGBImage* mutable_rgbimage_param();
+  inline ::singa::RGBImage* release_rgbimage_param();
+  inline void set_allocated_rgbimage_param(::singa::RGBImage* rgbimage_param);
+
+  // optional .singa.SoftmaxLossProto softmaxloss_param = 29;
+  inline bool has_softmaxloss_param() const;
+  inline void clear_softmaxloss_param();
+  static const int kSoftmaxlossParamFieldNumber = 29;
+  inline const ::singa::SoftmaxLossProto& softmaxloss_param() const;
+  inline ::singa::SoftmaxLossProto* mutable_softmaxloss_param();
+  inline ::singa::SoftmaxLossProto* release_softmaxloss_param();
+  inline void set_allocated_softmaxloss_param(::singa::SoftmaxLossProto* softmaxloss_param);
+
+  // optional .singa.TanhProto tanh_param = 30;
+  inline bool has_tanh_param() const;
+  inline void clear_tanh_param();
+  static const int kTanhParamFieldNumber = 30;
+  inline const ::singa::TanhProto& tanh_param() const;
+  inline ::singa::TanhProto* mutable_tanh_param();
+  inline ::singa::TanhProto* release_tanh_param();
+  inline void set_allocated_tanh_param(::singa::TanhProto* tanh_param);
+
+  // @@protoc_insertion_point(class_scope:singa.LayerProto)
+ private:
+  inline void set_has_name();
+  inline void clear_has_name();
+  inline void set_has_type();
+  inline void clear_has_type();
+  inline void set_has_locationid();
+  inline void clear_has_locationid();
+  inline void set_has_partitionid();
+  inline void clear_has_partitionid();
+  inline void set_has_partition_type();
+  inline void clear_has_partition_type();
+  inline void set_has_convolution_param();
+  inline void clear_has_convolution_param();
+  inline void set_has_concate_param();
+  inline void clear_has_concate_param();
+  inline void set_has_data_param();
+  inline void clear_has_data_param();
+  inline void set_has_dropout_param();
+  inline void clear_has_dropout_param();
+  inline void set_has_inner_product_param();
+  inline void clear_has_inner_product_param();
+  inline void set_has_lrn_param();
+  inline void clear_has_lrn_param();
+  inline void set_has_mnist_param();
+  inline void clear_has_mnist_param();
+  inline void set_has_pooling_param();
+  inline void clear_has_pooling_param();
+  inline void set_has_slice_param();
+  inline void clear_has_slice_param();
+  inline void set_has_split_param();
+  inline void clear_has_split_param();
+  inline void set_has_relu_param();
+  inline void clear_has_relu_param();
+  inline void set_has_rgbimage_param();
+  inline void clear_has_rgbimage_param();
+  inline void set_has_softmaxloss_param();
+  inline void clear_has_softmaxloss_param();
+  inline void set_has_tanh_param();
+  inline void clear_has_tanh_param();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::std::string* name_;
+  ::std::string* type_;
+  ::google::protobuf::RepeatedPtrField< ::std::string> srclayers_;
+  ::google::protobuf::int32 locationid_;
+  ::google::protobuf::int32 partitionid_;
+  ::google::protobuf::RepeatedPtrField< ::std::string> share_ary_;
+  ::google::protobuf::RepeatedPtrField< ::singa::ParamProto > param_;
+  ::google::protobuf::RepeatedPtrField< ::std::string> share_param_;
+  ::google::protobuf::RepeatedField<int> exclude_;
+  ::singa::ConvolutionProto* convolution_param_;
+  ::singa::ConcateProto* concate_param_;
+  ::singa::DataProto* data_param_;
+  ::singa::DropoutProto* dropout_param_;
+  ::singa::InnerProductProto* inner_product_param_;
+  ::singa::LRNProto* lrn_param_;
+  ::singa::MnistProto* mnist_param_;
+  ::singa::PoolingProto* pooling_param_;
+  ::singa::SliceProto* slice_param_;
+  ::singa::SplitProto* split_param_;
+  ::singa::ReLUProto* relu_param_;
+  ::singa::RGBImage* rgbimage_param_;
+  ::singa::SoftmaxLossProto* softmaxloss_param_;
+  ::singa::TanhProto* tanh_param_;
+  int partition_type_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(24 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static LayerProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RGBImage : public ::google::protobuf::Message {
+ public:
+  RGBImage();
+  virtual ~RGBImage();
+
+  RGBImage(const RGBImage& from);
+
+  inline RGBImage& operator=(const RGBImage& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const RGBImage& default_instance();
+
+  void Swap(RGBImage* other);
+
+  // implements Message ----------------------------------------------
+
+  RGBImage* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const RGBImage& from);
+  void MergeFrom(const RGBImage& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional float scale = 1 [default = 1];
+  inline bool has_scale() const;
+  inline void clear_scale();
+  static const int kScaleFieldNumber = 1;
+  inline float scale() const;
+  inline void set_scale(float value);
+
+  // optional int32 cropsize = 2 [default = 0];
+  inline bool has_cropsize() const;
+  inline void clear_cropsize();
+  static const int kCropsizeFieldNumber = 2;
+  inline ::google::protobuf::int32 cropsize() const;
+  inline void set_cropsize(::google::protobuf::int32 value);
+
+  // optional bool mirror = 3 [default = false];
+  inline bool has_mirror() const;
+  inline void clear_mirror();
+  static const int kMirrorFieldNumber = 3;
+  inline bool mirror() const;
+  inline void set_mirror(bool value);
+
+  // optional string meanfile = 4;
+  inline bool has_meanfile() const;
+  inline void clear_meanfile();
+  static const int kMeanfileFieldNumber = 4;
+  inline const ::std::string& meanfile() const;
+  inline void set_meanfile(const ::std::string& value);
+  inline void set_meanfile(const char* value);
+  inline void set_meanfile(const char* value, size_t size);
+  inline ::std::string* mutable_meanfile();
+  inline ::std::string* release_meanfile();
+  inline void set_allocated_meanfile(::std::string* meanfile);
+
+  // @@protoc_insertion_point(class_scope:singa.RGBImage)
+ private:
+  inline void set_has_scale();
+  inline void clear_has_scale();
+  inline void set_has_cropsize();
+  inline void clear_has_cropsize();
+  inline void set_has_mirror();
+  inline void clear_has_mirror();
+  inline void set_has_meanfile();
+  inline void clear_has_meanfile();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  float scale_;
+  ::google::protobuf::int32 cropsize_;
+  ::std::string* meanfile_;
+  bool mirror_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static RGBImage* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class SplitProto : public ::google::protobuf::Message {
+ public:
+  SplitProto();
+  virtual ~SplitProto();
+
+  SplitProto(const SplitProto& from);
+
+  inline SplitProto& operator=(const SplitProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const SplitProto& default_instance();
+
+  void Swap(SplitProto* other);
+
+  // implements Message ----------------------------------------------
+
+  SplitProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const SplitProto& from);
+  void MergeFrom(const SplitProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional int32 num_splits = 1;
+  inline bool has_num_splits() const;
+  inline void clear_num_splits();
+  static const int kNumSplitsFieldNumber = 1;
+  inline ::google::protobuf::int32 num_splits() const;
+  inline void set_num_splits(::google::protobuf::int32 value);
+
+  // @@protoc_insertion_point(class_scope:singa.SplitProto)
+ private:
+  inline void set_has_num_splits();
+  inline void clear_has_num_splits();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::int32 num_splits_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static SplitProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class TanhProto : public ::google::protobuf::Message {
+ public:
+  TanhProto();
+  virtual ~TanhProto();
+
+  TanhProto(const TanhProto& from);
+
+  inline TanhProto& operator=(const TanhProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const TanhProto& default_instance();
+
+  void Swap(TanhProto* other);
+
+  // implements Message ----------------------------------------------
+
+  TanhProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const TanhProto& from);
+  void MergeFrom(const TanhProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional float outer_scale = 1 [default = 1];
+  inline bool has_outer_scale() const;
+  inline void clear_outer_scale();
+  static const int kOuterScaleFieldNumber = 1;
+  inline float outer_scale() const;
+  inline void set_outer_scale(float value);
+
+  // optional float inner_scale = 2 [default = 1];
+  inline bool has_inner_scale() const;
+  inline void clear_inner_scale();
+  static const int kInnerScaleFieldNumber = 2;
+  inline float inner_scale() const;
+  inline void set_inner_scale(float value);
+
+  // @@protoc_insertion_point(class_scope:singa.TanhProto)
+ private:
+  inline void set_has_outer_scale();
+  inline void clear_has_outer_scale();
+  inline void set_has_inner_scale();
+  inline void clear_has_inner_scale();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  float outer_scale_;
+  float inner_scale_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static TanhProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class SoftmaxLossProto : public ::google::protobuf::Message {
+ public:
+  SoftmaxLossProto();
+  virtual ~SoftmaxLossProto();
+
+  SoftmaxLossProto(const SoftmaxLossProto& from);
+
+  inline SoftmaxLossProto& operator=(const SoftmaxLossProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const SoftmaxLossProto& default_instance();
+
+  void Swap(SoftmaxLossProto* other);
+
+  // implements Message ----------------------------------------------
+
+  SoftmaxLossProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const SoftmaxLossProto& from);
+  void MergeFrom(const SoftmaxLossProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional int32 topk = 1 [default = 1];
+  inline bool has_topk() const;
+  inline void clear_topk();
+  static const int kTopkFieldNumber = 1;
+  inline ::google::protobuf::int32 topk() const;
+  inline void set_topk(::google::protobuf::int32 value);
+
+  // optional float scale = 2 [default = 1];
+  inline bool has_scale() const;
+  inline void clear_scale();
+  static const int kScaleFieldNumber = 2;
+  inline float scale() const;
+  inline void set_scale(float value);
+
+  // @@protoc_insertion_point(class_scope:singa.SoftmaxLossProto)
+ private:
+  inline void set_has_topk();
+  inline void clear_has_topk();
+  inline void set_has_scale();
+  inline void clear_has_scale();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::int32 topk_;
+  float scale_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static SoftmaxLossProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class ConvolutionProto : public ::google::protobuf::Message {
+ public:
+  ConvolutionProto();
+  virtual ~ConvolutionProto();
+
+  ConvolutionProto(const ConvolutionProto& from);
+
+  inline ConvolutionProto& operator=(const ConvolutionProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const ConvolutionProto& default_instance();
+
+  void Swap(ConvolutionProto* other);
+
+  // implements Message ----------------------------------------------
+
+  ConvolutionProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const ConvolutionProto& from);
+  void MergeFrom(const ConvolutionProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional uint32 num_filters = 1;
+  inline bool has_num_filters() const;
+  inline void clear_num_filters();
+  static const int kNumFiltersFieldNumber = 1;
+  inline ::google::protobuf::uint32 num_filters() const;
+  inline void set_num_filters(::google::protobuf::uint32 value);
+
+  // optional bool bias_term = 2 [default = true];
+  inline bool has_bias_term() const;
+  inline void clear_bias_term();
+  static const int kBiasTermFieldNumber = 2;
+  inline bool bias_term() const;
+  inline void set_bias_term(bool value);
+
+  // optional uint32 pad = 3 [default = 0];
+  inline bool has_pad() const;
+  inline void clear_pad();
+  static const int kPadFieldNumber = 3;
+  inline ::google::protobuf::uint32 pad() const;
+  inline void set_pad(::google::protobuf::uint32 value);
+
+  // optional uint32 stride = 4 [default = 1];
+  inline bool has_stride() const;
+  inline void clear_stride();
+  static const int kStrideFieldNumber = 4;
+  inline ::google::protobuf::uint32 stride() const;
+  inline void set_stride(::google::protobuf::uint32 value);
+
+  // required uint32 kernel = 5;
+  inline bool has_kernel() const;
+  inline void clear_kernel();
+  static const int kKernelFieldNumber = 5;
+  inline ::google::protobuf::uint32 kernel() const;
+  inline void set_kernel(::google::protobuf::uint32 value);
+
+  // @@protoc_insertion_point(class_scope:singa.ConvolutionProto)
+ private:
+  inline void set_has_num_filters();
+  inline void clear_has_num_filters();
+  inline void set_has_bias_term();
+  inline void clear_has_bias_term();
+  inline void set_has_pad();
+  inline void clear_has_pad();
+  inline void set_has_stride();
+  inline void clear_has_stride();
+  inline void set_has_kernel();
+  inline void clear_has_kernel();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::uint32 num_filters_;
+  bool bias_term_;
+  ::google::protobuf::uint32 pad_;
+  ::google::protobuf::uint32 stride_;
+  ::google::protobuf::uint32 kernel_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static ConvolutionProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class ConcateProto : public ::google::protobuf::Message {
+ public:
+  ConcateProto();
+  virtual ~ConcateProto();
+
+  ConcateProto(const ConcateProto& from);
+
+  inline ConcateProto& operator=(const ConcateProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const ConcateProto& default_instance();
+
+  void Swap(ConcateProto* other);
+
+  // implements Message ----------------------------------------------
+
+  ConcateProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const ConcateProto& from);
+  void MergeFrom(const ConcateProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional int32 concate_dimension = 1;
+  inline bool has_concate_dimension() const;
+  inline void clear_concate_dimension();
+  static const int kConcateDimensionFieldNumber = 1;
+  inline ::google::protobuf::int32 concate_dimension() const;
+  inline void set_concate_dimension(::google::protobuf::int32 value);
+
+  // optional int32 concate_num = 2;
+  inline bool has_concate_num() const;
+  inline void clear_concate_num();
+  static const int kConcateNumFieldNumber = 2;
+  inline ::google::protobuf::int32 concate_num() const;
+  inline void set_concate_num(::google::protobuf::int32 value);
+
+  // @@protoc_insertion_point(class_scope:singa.ConcateProto)
+ private:
+  inline void set_has_concate_dimension();
+  inline void clear_has_concate_dimension();
+  inline void set_has_concate_num();
+  inline void clear_has_concate_num();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::int32 concate_dimension_;
+  ::google::protobuf::int32 concate_num_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static ConcateProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class DataProto : public ::google::protobuf::Message {
+ public:
+  DataProto();
+  virtual ~DataProto();
+
+  DataProto(const DataProto& from);
+
+  inline DataProto& operator=(const DataProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const DataProto& default_instance();
+
+  void Swap(DataProto* other);
+
+  // implements Message ----------------------------------------------
+
+  DataProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const DataProto& from);
+  void MergeFrom(const DataProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional string source = 1;
+  inline bool has_source() const;
+  inline void clear_source();
+  static const int kSourceFieldNumber = 1;
+  inline const ::std::string& source() const;
+  inline void set_source(const ::std::string& value);
+  inline void set_source(const char* value);
+  inline void set_source(const char* value, size_t size);
+  inline ::std::string* mutable_source();
+  inline ::std::string* release_source();
+  inline void set_allocated_source(::std::string* source);
+
+  // optional string path = 2;
+  inline bool has_path() const;
+  inline void clear_path();
+  static const int kPathFieldNumber = 2;
+  inline const ::std::string& path() const;
+  inline void set_path(const ::std::string& value);
+  inline void set_path(const char* value);
+  inline void set_path(const char* value, size_t size);
+  inline ::std::string* mutable_path();
+  inline ::std::string* release_path();
+  inline void set_allocated_path(::std::string* path);
+
+  // optional uint32 batchsize = 4;
+  inline bool has_batchsize() const;
+  inline void clear_batchsize();
+  static const int kBatchsizeFieldNumber = 4;
+  inline ::google::protobuf::uint32 batchsize() const;
+  inline void set_batchsize(::google::protobuf::uint32 value);
+
+  // optional uint32 random_skip = 5 [default = 0];
+  inline bool has_random_skip() const;
+  inline void clear_random_skip();
+  static const int kRandomSkipFieldNumber = 5;
+  inline ::google::protobuf::uint32 random_skip() const;
+  inline void set_random_skip(::google::protobuf::uint32 value);
+
+  // @@protoc_insertion_point(class_scope:singa.DataProto)
+ private:
+  inline void set_has_source();
+  inline void clear_has_source();
+  inline void set_has_path();
+  inline void clear_has_path();
+  inline void set_has_batchsize();
+  inline void clear_has_batchsize();
+  inline void set_has_random_skip();
+  inline void clear_has_random_skip();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::std::string* source_;
+  ::std::string* path_;
+  ::google::protobuf::uint32 batchsize_;
+  ::google::protobuf::uint32 random_skip_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static DataProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class MnistProto : public ::google::protobuf::Message {
+ public:
+  MnistProto();
+  virtual ~MnistProto();
+
+  MnistProto(const MnistProto& from);
+
+  inline MnistProto& operator=(const MnistProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const MnistProto& default_instance();
+
+  void Swap(MnistProto* other);
+
+  // implements Message ----------------------------------------------
+
+  MnistProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const MnistProto& from);
+  void MergeFrom(const MnistProto& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional int32 kernel = 1 [default = 0];
+  inline bool has_kernel() const;
+  inline void clear_kernel();
+  static const int kKernelFieldNumber = 1;
+  inline ::google::protobuf::int32 kernel() const;
+  inline void set_kernel(::google::protobuf::int32 value);
+
+  // optional float sigma = 2 [default = 0];
+  inline bool has_sigma() const;
+  inline void clear_sigma();
+  static const int kSigmaFieldNumber = 2;
+  inline float sigma() const;
+  inline void set_sigma(float value);
+
+  // optional float alpha = 3 [default = 0];
+  inline bool has_alpha() const;
+  inline void clear_alpha();
+  static const int kAlphaFieldNumber = 3;
+  inline float alpha() const;
+  inline void set_alpha(float value);
+
+  // optional float beta = 4 [default = 0];
+  inline bool has_beta() const;
+  inline void clear_beta();
+  static const int kBetaFieldNumber = 4;
+  inline float beta() const;
+  inline void set_beta(float value);
+
+  // optional float gamma = 5 [default = 0];
+  inline bool has_gamma() const;
+  inline void clear_gamma();
+  static const int kGammaFieldNumber = 5;
+  inline float gamma() const;
+  inline void set_gamma(float value);
+
+  // optional int32 resize = 6 [default = 0];
+  inline bool has_resize() const;
+  inline void clear_resize();
+  static const int kResizeFieldNumber = 6;
+  inline ::google::protobuf::int32 resize() const;
+  inline void set_resize(::google::protobuf::int32 value);
+
+  // optional int32 elastic_freq = 7 [default = 0];
+  inline bool has_elastic_freq() const;
+  inline void clear_elastic_freq();
+  static const int kElasticFreqFieldNumber = 7;
+  inline ::google::protobuf::int32 elastic_freq() const;
+  inline void set_elastic_freq(::google::protobuf::int32 value);
+
+  // optional float norm_a = 8 [default = 1];
+  inline bool has_norm_a() const;
+  inline void clear_norm_a();
+  static const int kNormAFieldNumber = 8;
+  inline float norm_a() const;
+  inline void set_norm_a(float value);
+
+  // optional float norm_b = 9 [default = 0];
+  inline bool has_norm_b() const;
+  inline void clear_norm_b();
+  static const int kNormBFieldNumber = 9;
+  inline float norm_b() const;
+  inline void set_norm_b(float value);
+
+  // @@protoc_insertion_point(class_scope:singa.MnistProto)
+ private:
+  inline void set_has_kernel();
+  inline void clear_has_kernel();
+  inline void set_has_sigma();
+  inline void clear_has_sigma();
+  inline void set_has_alpha();
+  inline void clear_has_alpha();
+  inline void set_has_beta();
+  inline void clear_has_beta();
+  inline void set_has_gamma();
+  inline void clear_has_gamma();
+  inline void set_has_resize();
+  inline void clear_has_resize();
+  inline void set_has_elastic_freq();
+  inline void clear_has_elastic_freq();
+  inline void set_has_norm_a();
+  inline void clear_has_norm_a();
+  inline void set_has_norm_b();
+  inline void clear_has_norm_b();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::int32 kernel_;
+  float sigma_;
+  float alpha_;
+  float beta_;
+  float gamma_;
+  ::google::protobuf::int32 resize_;
+  ::google::protobuf::int32 elastic_freq_;
+  float norm_a_;
+  float norm_b_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32];
+
+  friend void  protobuf_AddDesc_model_2eproto();
+  friend void protobuf_AssignDesc_model_2eproto();
+  friend void protobuf_ShutdownFile_model_2eproto();
+
+  void InitAsDefaultInstance();
+  static MnistProto* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class DropoutProto : public ::google::protobuf::Message {
+ public:
+  DropoutProto();
+  virtual ~DropoutProto();
+
+  DropoutProto(const DropoutProto& from);
+
+  inline DropoutProto& operator=(const DropoutProto& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const DropoutProto& default_instance();
+
+  void Swap(DropoutProto* other);
+
+  // implements Message ----------------------------------------------
+
+  DropoutProto* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from

<TRUNCATED>

Mime
View raw message