// Generated by the protocol buffer compiler.  DO NOT EDIT!

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "clstm.pb.h"
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace clstm {

namespace {

const ::google::protobuf::Descriptor* KeyValue_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  KeyValue_reflection_ = NULL;
const ::google::protobuf::Descriptor* Array_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Array_reflection_ = NULL;
const ::google::protobuf::Descriptor* NetworkProto_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NetworkProto_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_clstm_2eproto() {
  protobuf_AddDesc_clstm_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "clstm.proto");
  GOOGLE_CHECK(file != NULL);
  KeyValue_descriptor_ = file->message_type(0);
  static const int KeyValue_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyValue, key_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyValue, value_),
  };
  KeyValue_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      KeyValue_descriptor_,
      KeyValue::default_instance_,
      KeyValue_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyValue, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyValue, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(KeyValue));
  Array_descriptor_ = file->message_type(1);
  static const int Array_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Array, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Array, dim_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Array, value_),
  };
  Array_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Array_descriptor_,
      Array::default_instance_,
      Array_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Array, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Array, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Array));
  NetworkProto_descriptor_ = file->message_type(2);
  static const int NetworkProto_offsets_[9] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, kind_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, ninput_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, noutput_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, icodec_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, codec_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, attribute_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, weights_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, sub_),
  };
  NetworkProto_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      NetworkProto_descriptor_,
      NetworkProto::default_instance_,
      NetworkProto_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetworkProto, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(NetworkProto));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_clstm_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    KeyValue_descriptor_, &KeyValue::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    Array_descriptor_, &Array::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    NetworkProto_descriptor_, &NetworkProto::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_clstm_2eproto() {
  delete KeyValue::default_instance_;
  delete KeyValue_reflection_;
  delete Array::default_instance_;
  delete Array_reflection_;
  delete NetworkProto::default_instance_;
  delete NetworkProto_reflection_;
}

void protobuf_AddDesc_clstm_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\013clstm.proto\022\005clstm\"&\n\010KeyValue\022\013\n\003key\030"
    "\001 \002(\t\022\r\n\005value\030\002 \002(\t\"1\n\005Array\022\014\n\004name\030\001 "
    "\001(\t\022\013\n\003dim\030\002 \003(\005\022\r\n\005value\030\003 \003(\002\"\317\001\n\014Netw"
    "orkProto\022\014\n\004kind\030\001 \002(\t\022\014\n\004name\030\002 \001(\t\022\016\n\006"
    "ninput\030\n \002(\005\022\017\n\007noutput\030\013 \002(\005\022\016\n\006icodec\030"
    "\014 \003(\005\022\r\n\005codec\030\r \003(\005\022\"\n\tattribute\030\024 \003(\0132"
    "\017.clstm.KeyValue\022\035\n\007weights\030\036 \003(\0132\014.clst"
    "m.Array\022 \n\003sub\030( \003(\0132\023.clstm.NetworkProt"
    "o", 321);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "clstm.proto", &protobuf_RegisterTypes);
  KeyValue::default_instance_ = new KeyValue();
  Array::default_instance_ = new Array();
  NetworkProto::default_instance_ = new NetworkProto();
  KeyValue::default_instance_->InitAsDefaultInstance();
  Array::default_instance_->InitAsDefaultInstance();
  NetworkProto::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_clstm_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_clstm_2eproto {
  StaticDescriptorInitializer_clstm_2eproto() {
    protobuf_AddDesc_clstm_2eproto();
  }
} static_descriptor_initializer_clstm_2eproto_;


// ===================================================================

const ::std::string KeyValue::_default_key_;
const ::std::string KeyValue::_default_value_;
#ifndef _MSC_VER
const int KeyValue::kKeyFieldNumber;
const int KeyValue::kValueFieldNumber;
#endif  // !_MSC_VER

KeyValue::KeyValue()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void KeyValue::InitAsDefaultInstance() {
}

KeyValue::KeyValue(const KeyValue& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void KeyValue::SharedCtor() {
  _cached_size_ = 0;
  key_ = const_cast< ::std::string*>(&_default_key_);
  value_ = const_cast< ::std::string*>(&_default_value_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

KeyValue::~KeyValue() {
  SharedDtor();
}

void KeyValue::SharedDtor() {
  if (key_ != &_default_key_) {
    delete key_;
  }
  if (value_ != &_default_value_) {
    delete value_;
  }
  if (this != default_instance_) {
  }
}

void KeyValue::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* KeyValue::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return KeyValue_descriptor_;
}

const KeyValue& KeyValue::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_clstm_2eproto();  return *default_instance_;
}

KeyValue* KeyValue::default_instance_ = NULL;

KeyValue* KeyValue::New() const {
  return new KeyValue;
}

void KeyValue::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (key_ != &_default_key_) {
        key_->clear();
      }
    }
    if (_has_bit(1)) {
      if (value_ != &_default_value_) {
        value_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool KeyValue::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required string key = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_key()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->key().data(), this->key().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_value;
        break;
      }
      
      // required string value = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_value:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_value()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->value().data(), this->value().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void KeyValue::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required string key = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->key().data(), this->key().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->key(), output);
  }
  
  // required string value = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->value().data(), this->value().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->value(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* KeyValue::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required string key = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->key().data(), this->key().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->key(), target);
  }
  
  // required string value = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->value().data(), this->value().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->value(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int KeyValue::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string key = 1;
    if (has_key()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->key());
    }
    
    // required string value = 2;
    if (has_value()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->value());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void KeyValue::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const KeyValue* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const KeyValue*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void KeyValue::MergeFrom(const KeyValue& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_key(from.key());
    }
    if (from._has_bit(1)) {
      set_value(from.value());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void KeyValue::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void KeyValue::CopyFrom(const KeyValue& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool KeyValue::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  
  return true;
}

void KeyValue::Swap(KeyValue* other) {
  if (other != this) {
    std::swap(key_, other->key_);
    std::swap(value_, other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata KeyValue::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = KeyValue_descriptor_;
  metadata.reflection = KeyValue_reflection_;
  return metadata;
}


// ===================================================================

const ::std::string Array::_default_name_;
#ifndef _MSC_VER
const int Array::kNameFieldNumber;
const int Array::kDimFieldNumber;
const int Array::kValueFieldNumber;
#endif  // !_MSC_VER

Array::Array()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void Array::InitAsDefaultInstance() {
}

Array::Array(const Array& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void Array::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&_default_name_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Array::~Array() {
  SharedDtor();
}

void Array::SharedDtor() {
  if (name_ != &_default_name_) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void Array::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Array::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Array_descriptor_;
}

const Array& Array::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_clstm_2eproto();  return *default_instance_;
}

Array* Array::default_instance_ = NULL;

Array* Array::New() const {
  return new Array;
}

void Array::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (name_ != &_default_name_) {
        name_->clear();
      }
    }
  }
  dim_.Clear();
  value_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool Array::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_dim;
        break;
      }
      
      // repeated int32 dim = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_dim:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 16, input, this->mutable_dim())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_dim())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_dim;
        if (input->ExpectTag(29)) goto parse_value;
        break;
      }
      
      // repeated float value = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_value:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 29, input, this->mutable_value())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_value())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(29)) goto parse_value;
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Array::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }
  
  // repeated int32 dim = 2;
  for (int i = 0; i < this->dim_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      2, this->dim(i), output);
  }
  
  // repeated float value = 3;
  for (int i = 0; i < this->value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      3, this->value(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* Array::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }
  
  // repeated int32 dim = 2;
  for (int i = 0; i < this->dim_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(2, this->dim(i), target);
  }
  
  // repeated float value = 3;
  for (int i = 0; i < this->value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(3, this->value(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int Array::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }
    
  }
  // repeated int32 dim = 2;
  {
    int data_size = 0;
    for (int i = 0; i < this->dim_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->dim(i));
    }
    total_size += 1 * this->dim_size() + data_size;
  }
  
  // repeated float value = 3;
  {
    int data_size = 0;
    data_size = 4 * this->value_size();
    total_size += 1 * this->value_size() + data_size;
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Array::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const Array* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const Array*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void Array::MergeFrom(const Array& from) {
  GOOGLE_CHECK_NE(&from, this);
  dim_.MergeFrom(from.dim_);
  value_.MergeFrom(from.value_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_name(from.name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void Array::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Array::CopyFrom(const Array& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Array::IsInitialized() const {
  
  return true;
}

void Array::Swap(Array* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    dim_.Swap(&other->dim_);
    value_.Swap(&other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata Array::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Array_descriptor_;
  metadata.reflection = Array_reflection_;
  return metadata;
}


// ===================================================================

const ::std::string NetworkProto::_default_kind_;
const ::std::string NetworkProto::_default_name_;
#ifndef _MSC_VER
const int NetworkProto::kKindFieldNumber;
const int NetworkProto::kNameFieldNumber;
const int NetworkProto::kNinputFieldNumber;
const int NetworkProto::kNoutputFieldNumber;
const int NetworkProto::kIcodecFieldNumber;
const int NetworkProto::kCodecFieldNumber;
const int NetworkProto::kAttributeFieldNumber;
const int NetworkProto::kWeightsFieldNumber;
const int NetworkProto::kSubFieldNumber;
#endif  // !_MSC_VER

NetworkProto::NetworkProto()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void NetworkProto::InitAsDefaultInstance() {
}

NetworkProto::NetworkProto(const NetworkProto& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void NetworkProto::SharedCtor() {
  _cached_size_ = 0;
  kind_ = const_cast< ::std::string*>(&_default_kind_);
  name_ = const_cast< ::std::string*>(&_default_name_);
  ninput_ = 0;
  noutput_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

NetworkProto::~NetworkProto() {
  SharedDtor();
}

void NetworkProto::SharedDtor() {
  if (kind_ != &_default_kind_) {
    delete kind_;
  }
  if (name_ != &_default_name_) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void NetworkProto::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NetworkProto::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NetworkProto_descriptor_;
}

const NetworkProto& NetworkProto::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_clstm_2eproto();  return *default_instance_;
}

NetworkProto* NetworkProto::default_instance_ = NULL;

NetworkProto* NetworkProto::New() const {
  return new NetworkProto;
}

void NetworkProto::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (kind_ != &_default_kind_) {
        kind_->clear();
      }
    }
    if (_has_bit(1)) {
      if (name_ != &_default_name_) {
        name_->clear();
      }
    }
    ninput_ = 0;
    noutput_ = 0;
  }
  icodec_.Clear();
  codec_.Clear();
  attribute_.Clear();
  weights_.Clear();
  sub_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool NetworkProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required string kind = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_kind()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->kind().data(), this->kind().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_name;
        break;
      }
      
      // optional string name = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(80)) goto parse_ninput;
        break;
      }
      
      // required int32 ninput = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_ninput:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &ninput_)));
          _set_bit(2);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(88)) goto parse_noutput;
        break;
      }
      
      // required int32 noutput = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_noutput:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &noutput_)));
          _set_bit(3);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(96)) goto parse_icodec;
        break;
      }
      
      // repeated int32 icodec = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_icodec:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 96, input, this->mutable_icodec())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_icodec())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(96)) goto parse_icodec;
        if (input->ExpectTag(104)) goto parse_codec;
        break;
      }
      
      // repeated int32 codec = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_codec:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 104, input, this->mutable_codec())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_codec())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(104)) goto parse_codec;
        if (input->ExpectTag(162)) goto parse_attribute;
        break;
      }
      
      // repeated .clstm.KeyValue attribute = 20;
      case 20: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_attribute:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_attribute()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(162)) goto parse_attribute;
        if (input->ExpectTag(242)) goto parse_weights;
        break;
      }
      
      // repeated .clstm.Array weights = 30;
      case 30: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_weights:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_weights()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(242)) goto parse_weights;
        if (input->ExpectTag(322)) goto parse_sub;
        break;
      }
      
      // repeated .clstm.NetworkProto sub = 40;
      case 40: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_sub:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_sub()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(322)) goto parse_sub;
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void NetworkProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required string kind = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->kind().data(), this->kind().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->kind(), output);
  }
  
  // optional string name = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->name(), output);
  }
  
  // required int32 ninput = 10;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->ninput(), output);
  }
  
  // required int32 noutput = 11;
  if (_has_bit(3)) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->noutput(), output);
  }
  
  // repeated int32 icodec = 12;
  for (int i = 0; i < this->icodec_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      12, this->icodec(i), output);
  }
  
  // repeated int32 codec = 13;
  for (int i = 0; i < this->codec_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      13, this->codec(i), output);
  }
  
  // repeated .clstm.KeyValue attribute = 20;
  for (int i = 0; i < this->attribute_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      20, this->attribute(i), output);
  }
  
  // repeated .clstm.Array weights = 30;
  for (int i = 0; i < this->weights_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      30, this->weights(i), output);
  }
  
  // repeated .clstm.NetworkProto sub = 40;
  for (int i = 0; i < this->sub_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      40, this->sub(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* NetworkProto::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required string kind = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->kind().data(), this->kind().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->kind(), target);
  }
  
  // optional string name = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->name(), target);
  }
  
  // required int32 ninput = 10;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->ninput(), target);
  }
  
  // required int32 noutput = 11;
  if (_has_bit(3)) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->noutput(), target);
  }
  
  // repeated int32 icodec = 12;
  for (int i = 0; i < this->icodec_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(12, this->icodec(i), target);
  }
  
  // repeated int32 codec = 13;
  for (int i = 0; i < this->codec_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(13, this->codec(i), target);
  }
  
  // repeated .clstm.KeyValue attribute = 20;
  for (int i = 0; i < this->attribute_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        20, this->attribute(i), target);
  }
  
  // repeated .clstm.Array weights = 30;
  for (int i = 0; i < this->weights_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        30, this->weights(i), target);
  }
  
  // repeated .clstm.NetworkProto sub = 40;
  for (int i = 0; i < this->sub_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        40, this->sub(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int NetworkProto::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string kind = 1;
    if (has_kind()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->kind());
    }
    
    // optional string name = 2;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }
    
    // required int32 ninput = 10;
    if (has_ninput()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->ninput());
    }
    
    // required int32 noutput = 11;
    if (has_noutput()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->noutput());
    }
    
  }
  // repeated int32 icodec = 12;
  {
    int data_size = 0;
    for (int i = 0; i < this->icodec_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->icodec(i));
    }
    total_size += 1 * this->icodec_size() + data_size;
  }
  
  // repeated int32 codec = 13;
  {
    int data_size = 0;
    for (int i = 0; i < this->codec_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->codec(i));
    }
    total_size += 1 * this->codec_size() + data_size;
  }
  
  // repeated .clstm.KeyValue attribute = 20;
  total_size += 2 * this->attribute_size();
  for (int i = 0; i < this->attribute_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->attribute(i));
  }
  
  // repeated .clstm.Array weights = 30;
  total_size += 2 * this->weights_size();
  for (int i = 0; i < this->weights_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->weights(i));
  }
  
  // repeated .clstm.NetworkProto sub = 40;
  total_size += 2 * this->sub_size();
  for (int i = 0; i < this->sub_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->sub(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NetworkProto::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const NetworkProto* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const NetworkProto*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void NetworkProto::MergeFrom(const NetworkProto& from) {
  GOOGLE_CHECK_NE(&from, this);
  icodec_.MergeFrom(from.icodec_);
  codec_.MergeFrom(from.codec_);
  attribute_.MergeFrom(from.attribute_);
  weights_.MergeFrom(from.weights_);
  sub_.MergeFrom(from.sub_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_kind(from.kind());
    }
    if (from._has_bit(1)) {
      set_name(from.name());
    }
    if (from._has_bit(2)) {
      set_ninput(from.ninput());
    }
    if (from._has_bit(3)) {
      set_noutput(from.noutput());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void NetworkProto::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void NetworkProto::CopyFrom(const NetworkProto& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool NetworkProto::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000000d) != 0x0000000d) return false;
  
  for (int i = 0; i < attribute_size(); i++) {
    if (!this->attribute(i).IsInitialized()) return false;
  }
  for (int i = 0; i < sub_size(); i++) {
    if (!this->sub(i).IsInitialized()) return false;
  }
  return true;
}

void NetworkProto::Swap(NetworkProto* other) {
  if (other != this) {
    std::swap(kind_, other->kind_);
    std::swap(name_, other->name_);
    std::swap(ninput_, other->ninput_);
    std::swap(noutput_, other->noutput_);
    icodec_.Swap(&other->icodec_);
    codec_.Swap(&other->codec_);
    attribute_.Swap(&other->attribute_);
    weights_.Swap(&other->weights_);
    sub_.Swap(&other->sub_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata NetworkProto::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NetworkProto_descriptor_;
  metadata.reflection = NetworkProto_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace clstm

// @@protoc_insertion_point(global_scope)
