// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: onnx.proto3

#include "onnx.proto3.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<0> scc_info_OperatorSetIdProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<0> scc_info_StringStringEntryProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<0> scc_info_TensorProto_Segment_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<0> scc_info_TensorShapeProto_Dimension_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<1> scc_info_TensorShapeProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<1> scc_info_TypeProto_Tensor_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<1> scc_info_TypeProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<1> scc_info_ValueInfoProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<2> scc_info_AttributeProto_onnx_2eproto3;
extern PROTOBUF_INTERNAL_EXPORT_onnx_2eproto3 ::google::protobuf::internal::SCCInfo<2> scc_info_TensorProto_onnx_2eproto3;
namespace onnx {
class AttributeProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AttributeProto> _instance;
} _AttributeProto_default_instance_;
class ValueInfoProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ValueInfoProto> _instance;
} _ValueInfoProto_default_instance_;
class NodeProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<NodeProto> _instance;
} _NodeProto_default_instance_;
class ModelProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ModelProto> _instance;
} _ModelProto_default_instance_;
class StringStringEntryProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<StringStringEntryProto> _instance;
} _StringStringEntryProto_default_instance_;
class GraphProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<GraphProto> _instance;
} _GraphProto_default_instance_;
class TensorProto_SegmentDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TensorProto_Segment> _instance;
} _TensorProto_Segment_default_instance_;
class TensorProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TensorProto> _instance;
} _TensorProto_default_instance_;
class TensorShapeProto_DimensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto_Dimension> _instance;
  ::google::protobuf::int64 dim_value_;
  ::google::protobuf::internal::ArenaStringPtr dim_param_;
} _TensorShapeProto_Dimension_default_instance_;
class TensorShapeProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto> _instance;
} _TensorShapeProto_default_instance_;
class TypeProto_TensorDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TypeProto_Tensor> _instance;
} _TypeProto_Tensor_default_instance_;
class TypeProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TypeProto> _instance;
  const ::onnx::TypeProto_Tensor* tensor_type_;
} _TypeProto_default_instance_;
class OperatorSetIdProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OperatorSetIdProto> _instance;
} _OperatorSetIdProto_default_instance_;
}  // namespace onnx
static void InitDefaultsAttributeProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_AttributeProto_default_instance_;
    new (ptr) ::onnx::AttributeProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  {
    void* ptr = &::onnx::_NodeProto_default_instance_;
    new (ptr) ::onnx::NodeProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  {
    void* ptr = &::onnx::_GraphProto_default_instance_;
    new (ptr) ::onnx::GraphProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::AttributeProto::InitAsDefaultInstance();
  ::onnx::NodeProto::InitAsDefaultInstance();
  ::onnx::GraphProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_AttributeProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAttributeProto_onnx_2eproto3}, {
      &scc_info_TensorProto_onnx_2eproto3.base,
      &scc_info_ValueInfoProto_onnx_2eproto3.base,}};

static void InitDefaultsValueInfoProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_ValueInfoProto_default_instance_;
    new (ptr) ::onnx::ValueInfoProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::ValueInfoProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_ValueInfoProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsValueInfoProto_onnx_2eproto3}, {
      &scc_info_TypeProto_onnx_2eproto3.base,}};

static void InitDefaultsModelProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_ModelProto_default_instance_;
    new (ptr) ::onnx::ModelProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::ModelProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_ModelProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsModelProto_onnx_2eproto3}, {
      &scc_info_OperatorSetIdProto_onnx_2eproto3.base,
      &scc_info_AttributeProto_onnx_2eproto3.base,
      &scc_info_StringStringEntryProto_onnx_2eproto3.base,}};

static void InitDefaultsStringStringEntryProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_StringStringEntryProto_default_instance_;
    new (ptr) ::onnx::StringStringEntryProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::StringStringEntryProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_StringStringEntryProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStringStringEntryProto_onnx_2eproto3}, {}};

static void InitDefaultsTensorProto_Segment_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TensorProto_Segment_default_instance_;
    new (ptr) ::onnx::TensorProto_Segment();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TensorProto_Segment::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_TensorProto_Segment_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTensorProto_Segment_onnx_2eproto3}, {}};

static void InitDefaultsTensorProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TensorProto_default_instance_;
    new (ptr) ::onnx::TensorProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TensorProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TensorProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTensorProto_onnx_2eproto3}, {
      &scc_info_TensorProto_Segment_onnx_2eproto3.base,
      &scc_info_StringStringEntryProto_onnx_2eproto3.base,}};

static void InitDefaultsTensorShapeProto_Dimension_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TensorShapeProto_Dimension_default_instance_;
    new (ptr) ::onnx::TensorShapeProto_Dimension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TensorShapeProto_Dimension::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_TensorShapeProto_Dimension_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTensorShapeProto_Dimension_onnx_2eproto3}, {}};

static void InitDefaultsTensorShapeProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TensorShapeProto_default_instance_;
    new (ptr) ::onnx::TensorShapeProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TensorShapeProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TensorShapeProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTensorShapeProto_onnx_2eproto3}, {
      &scc_info_TensorShapeProto_Dimension_onnx_2eproto3.base,}};

static void InitDefaultsTypeProto_Tensor_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TypeProto_Tensor_default_instance_;
    new (ptr) ::onnx::TypeProto_Tensor();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TypeProto_Tensor::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TypeProto_Tensor_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTypeProto_Tensor_onnx_2eproto3}, {
      &scc_info_TensorShapeProto_onnx_2eproto3.base,}};

static void InitDefaultsTypeProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_TypeProto_default_instance_;
    new (ptr) ::onnx::TypeProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::TypeProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TypeProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTypeProto_onnx_2eproto3}, {
      &scc_info_TypeProto_Tensor_onnx_2eproto3.base,}};

static void InitDefaultsOperatorSetIdProto_onnx_2eproto3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::onnx::_OperatorSetIdProto_default_instance_;
    new (ptr) ::onnx::OperatorSetIdProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::onnx::OperatorSetIdProto::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_OperatorSetIdProto_onnx_2eproto3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOperatorSetIdProto_onnx_2eproto3}, {}};

void InitDefaults_onnx_2eproto3() {
  ::google::protobuf::internal::InitSCC(&scc_info_AttributeProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ValueInfoProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ModelProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_StringStringEntryProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TensorProto_Segment_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TensorProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TensorShapeProto_Dimension_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TensorShapeProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TypeProto_Tensor_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TypeProto_onnx_2eproto3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OperatorSetIdProto_onnx_2eproto3.base);
}

::google::protobuf::Metadata file_level_metadata_onnx_2eproto3[13];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_onnx_2eproto3[4];
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_onnx_2eproto3 = nullptr;

const ::google::protobuf::uint32 TableStruct_onnx_2eproto3::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, name_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, ref_attr_name_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, doc_string_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, type_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, f_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, i_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, s_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, t_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, g_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, floats_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, ints_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, strings_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, tensors_),
  PROTOBUF_FIELD_OFFSET(::onnx::AttributeProto, graphs_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::ValueInfoProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::ValueInfoProto, name_),
  PROTOBUF_FIELD_OFFSET(::onnx::ValueInfoProto, type_),
  PROTOBUF_FIELD_OFFSET(::onnx::ValueInfoProto, doc_string_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, input_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, output_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, name_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, op_type_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, domain_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, attribute_),
  PROTOBUF_FIELD_OFFSET(::onnx::NodeProto, doc_string_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, ir_version_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, opset_import_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, producer_name_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, producer_version_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, domain_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, model_version_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, doc_string_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, graph_),
  PROTOBUF_FIELD_OFFSET(::onnx::ModelProto, metadata_props_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::StringStringEntryProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::StringStringEntryProto, key_),
  PROTOBUF_FIELD_OFFSET(::onnx::StringStringEntryProto, value_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, node_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, name_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, initializer_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, doc_string_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, input_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, output_),
  PROTOBUF_FIELD_OFFSET(::onnx::GraphProto, value_info_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto_Segment, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto_Segment, begin_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto_Segment, end_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, dims_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, data_type_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, segment_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, float_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, int32_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, string_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, int64_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, name_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, doc_string_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, raw_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, external_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, data_location_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, double_data_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorProto, uint64_data_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto_Dimension, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto_Dimension, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_value_),
  offsetof(::onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_param_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto_Dimension, denotation_),
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto_Dimension, value_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto, dim_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto_Tensor, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto_Tensor, elem_type_),
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto_Tensor, shape_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::onnx::TypeProtoDefaultTypeInternal, tensor_type_),
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto, denotation_),
  PROTOBUF_FIELD_OFFSET(::onnx::TypeProto, value_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::onnx::OperatorSetIdProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::onnx::OperatorSetIdProto, domain_),
  PROTOBUF_FIELD_OFFSET(::onnx::OperatorSetIdProto, version_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::onnx::AttributeProto)},
  { 19, -1, sizeof(::onnx::ValueInfoProto)},
  { 27, -1, sizeof(::onnx::NodeProto)},
  { 39, -1, sizeof(::onnx::ModelProto)},
  { 53, -1, sizeof(::onnx::StringStringEntryProto)},
  { 60, -1, sizeof(::onnx::GraphProto)},
  { 72, -1, sizeof(::onnx::TensorProto_Segment)},
  { 79, -1, sizeof(::onnx::TensorProto)},
  { 98, -1, sizeof(::onnx::TensorShapeProto_Dimension)},
  { 107, -1, sizeof(::onnx::TensorShapeProto)},
  { 113, -1, sizeof(::onnx::TypeProto_Tensor)},
  { 120, -1, sizeof(::onnx::TypeProto)},
  { 128, -1, sizeof(::onnx::OperatorSetIdProto)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_AttributeProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_ValueInfoProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_NodeProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_ModelProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_StringStringEntryProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_GraphProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TensorProto_Segment_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TensorProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TensorShapeProto_Dimension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TensorShapeProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TypeProto_Tensor_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_TypeProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::onnx::_OperatorSetIdProto_default_instance_),
};

::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_onnx_2eproto3 = {
  {}, AddDescriptors_onnx_2eproto3, "onnx.proto3", schemas,
  file_default_instances, TableStruct_onnx_2eproto3::offsets,
  file_level_metadata_onnx_2eproto3, 13, file_level_enum_descriptors_onnx_2eproto3, file_level_service_descriptors_onnx_2eproto3,
};

const char descriptor_table_protodef_onnx_2eproto3[] =
  "\n\013onnx.proto3\022\004onnx\"\340\003\n\016AttributeProto\022\014"
  "\n\004name\030\001 \001(\t\022\025\n\rref_attr_name\030\025 \001(\t\022\022\n\nd"
  "oc_string\030\r \001(\t\0220\n\004type\030\024 \001(\0162\".onnx.Att"
  "ributeProto.AttributeType\022\t\n\001f\030\002 \001(\002\022\t\n\001"
  "i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022\034\n\001t\030\005 \001(\0132\021.onnx.Ten"
  "sorProto\022\033\n\001g\030\006 \001(\0132\020.onnx.GraphProto\022\016\n"
  "\006floats\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t"
  " \003(\014\022\"\n\007tensors\030\n \003(\0132\021.onnx.TensorProto"
  "\022 \n\006graphs\030\013 \003(\0132\020.onnx.GraphProto\"\221\001\n\rA"
  "ttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\007"
  "\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022\t\n\005GRAPH"
  "\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRINGS\020\010\022\013\n"
  "\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"Q\n\016ValueInfoProto"
  "\022\014\n\004name\030\001 \001(\t\022\035\n\004type\030\002 \001(\0132\017.onnx.Type"
  "Proto\022\022\n\ndoc_string\030\003 \001(\t\"\226\001\n\tNodeProto\022"
  "\r\n\005input\030\001 \003(\t\022\016\n\006output\030\002 \003(\t\022\014\n\004name\030\003"
  " \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006domain\030\007 \001(\t\022\'\n"
  "\tattribute\030\005 \003(\0132\024.onnx.AttributeProto\022\022"
  "\n\ndoc_string\030\006 \001(\t\"\223\002\n\nModelProto\022\022\n\nir_"
  "version\030\001 \001(\003\022.\n\014opset_import\030\010 \003(\0132\030.on"
  "nx.OperatorSetIdProto\022\025\n\rproducer_name\030\002"
  " \001(\t\022\030\n\020producer_version\030\003 \001(\t\022\016\n\006domain"
  "\030\004 \001(\t\022\025\n\rmodel_version\030\005 \001(\003\022\022\n\ndoc_str"
  "ing\030\006 \001(\t\022\037\n\005graph\030\007 \001(\0132\020.onnx.GraphPro"
  "to\0224\n\016metadata_props\030\016 \003(\0132\034.onnx.String"
  "StringEntryProto\"4\n\026StringStringEntryPro"
  "to\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\352\001\n\nGraph"
  "Proto\022\035\n\004node\030\001 \003(\0132\017.onnx.NodeProto\022\014\n\004"
  "name\030\002 \001(\t\022&\n\013initializer\030\005 \003(\0132\021.onnx.T"
  "ensorProto\022\022\n\ndoc_string\030\n \001(\t\022#\n\005input\030"
  "\013 \003(\0132\024.onnx.ValueInfoProto\022$\n\006output\030\014 "
  "\003(\0132\024.onnx.ValueInfoProto\022(\n\nvalue_info\030"
  "\r \003(\0132\024.onnx.ValueInfoProto\"\270\005\n\013TensorPr"
  "oto\022\014\n\004dims\030\001 \003(\003\022\021\n\tdata_type\030\002 \001(\005\022*\n\007"
  "segment\030\003 \001(\0132\031.onnx.TensorProto.Segment"
  "\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
  " \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
  "ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
  "g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\0223\n\rexternal_da"
  "ta\030\r \003(\0132\034.onnx.StringStringEntryProto\0225"
  "\n\rdata_location\030\016 \001(\0162\036.onnx.TensorProto"
  ".DataLocation\022\027\n\013double_data\030\n \003(\001B\002\020\001\022\027"
  "\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007Segment\022\r\n\005be"
  "gin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\332\001\n\010DataType\022\r\n\tU"
  "NDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UINT8\020\002\022\010\n\004INT8"
  "\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n\005INT32\020\006\022\t\n\005"
  "INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020\t\022\013\n\007FLOAT16"
  "\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n\n\006UINT64\020\r\022\r"
  "\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020\017\022\014\n\010BFLOAT1"
  "6\020\020\")\n\014DataLocation\022\013\n\007DEFAULT\020\000\022\014\n\010EXTE"
  "RNAL\020\001\"\225\001\n\020TensorShapeProto\022-\n\003dim\030\001 \003(\013"
  "2 .onnx.TensorShapeProto.Dimension\032R\n\tDi"
  "mension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_para"
  "m\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value\"\233"
  "\001\n\tTypeProto\022-\n\013tensor_type\030\001 \001(\0132\026.onnx"
  ".TypeProto.TensorH\000\022\022\n\ndenotation\030\006 \001(\t\032"
  "B\n\006Tensor\022\021\n\telem_type\030\001 \001(\005\022%\n\005shape\030\002 "
  "\001(\0132\026.onnx.TensorShapeProtoB\007\n\005value\"5\n\022"
  "OperatorSetIdProto\022\016\n\006domain\030\001 \001(\t\022\017\n\007ve"
  "rsion\030\002 \001(\003*}\n\007Version\022\022\n\016_START_VERSION"
  "\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001\022\031\n\025IR_VERS"
  "ION_2017_10_30\020\002\022\030\n\024IR_VERSION_2017_11_3"
  "\020\003\022\016\n\nIR_VERSION\020\004b\006proto3"
  ;
::google::protobuf::internal::DescriptorTable descriptor_table_onnx_2eproto3 = {
  false, InitDefaults_onnx_2eproto3, 
  descriptor_table_protodef_onnx_2eproto3,
  "onnx.proto3", &assign_descriptors_table_onnx_2eproto3, 2506,
};

void AddDescriptors_onnx_2eproto3() {
  static constexpr ::google::protobuf::internal::InitFunc deps[1] =
  {
  };
 ::google::protobuf::internal::AddDescriptors(&descriptor_table_onnx_2eproto3, deps, 0);
}

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_onnx_2eproto3 = []() { AddDescriptors_onnx_2eproto3(); return true; }();
namespace onnx {
const ::google::protobuf::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
  ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_onnx_2eproto3);
  return file_level_enum_descriptors_onnx_2eproto3[0];
}
bool AttributeProto_AttributeType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const AttributeProto_AttributeType AttributeProto::UNDEFINED;
const AttributeProto_AttributeType AttributeProto::FLOAT;
const AttributeProto_AttributeType AttributeProto::INT;
const AttributeProto_AttributeType AttributeProto::STRING;
const AttributeProto_AttributeType AttributeProto::TENSOR;
const AttributeProto_AttributeType AttributeProto::GRAPH;
const AttributeProto_AttributeType AttributeProto::FLOATS;
const AttributeProto_AttributeType AttributeProto::INTS;
const AttributeProto_AttributeType AttributeProto::STRINGS;
const AttributeProto_AttributeType AttributeProto::TENSORS;
const AttributeProto_AttributeType AttributeProto::GRAPHS;
const AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
const AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
const int AttributeProto::AttributeType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* TensorProto_DataType_descriptor() {
  ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_onnx_2eproto3);
  return file_level_enum_descriptors_onnx_2eproto3[1];
}
bool TensorProto_DataType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TensorProto_DataType TensorProto::UNDEFINED;
const TensorProto_DataType TensorProto::FLOAT;
const TensorProto_DataType TensorProto::UINT8;
const TensorProto_DataType TensorProto::INT8;
const TensorProto_DataType TensorProto::UINT16;
const TensorProto_DataType TensorProto::INT16;
const TensorProto_DataType TensorProto::INT32;
const TensorProto_DataType TensorProto::INT64;
const TensorProto_DataType TensorProto::STRING;
const TensorProto_DataType TensorProto::BOOL;
const TensorProto_DataType TensorProto::FLOAT16;
const TensorProto_DataType TensorProto::DOUBLE;
const TensorProto_DataType TensorProto::UINT32;
const TensorProto_DataType TensorProto::UINT64;
const TensorProto_DataType TensorProto::COMPLEX64;
const TensorProto_DataType TensorProto::COMPLEX128;
const TensorProto_DataType TensorProto::BFLOAT16;
const TensorProto_DataType TensorProto::DataType_MIN;
const TensorProto_DataType TensorProto::DataType_MAX;
const int TensorProto::DataType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* TensorProto_DataLocation_descriptor() {
  ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_onnx_2eproto3);
  return file_level_enum_descriptors_onnx_2eproto3[2];
}
bool TensorProto_DataLocation_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TensorProto_DataLocation TensorProto::DEFAULT;
const TensorProto_DataLocation TensorProto::EXTERNAL;
const TensorProto_DataLocation TensorProto::DataLocation_MIN;
const TensorProto_DataLocation TensorProto::DataLocation_MAX;
const int TensorProto::DataLocation_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Version_descriptor() {
  ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_onnx_2eproto3);
  return file_level_enum_descriptors_onnx_2eproto3[3];
}
bool Version_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}


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

void AttributeProto::InitAsDefaultInstance() {
  ::onnx::_AttributeProto_default_instance_._instance.get_mutable()->t_ = const_cast< ::onnx::TensorProto*>(
      ::onnx::TensorProto::internal_default_instance());
  ::onnx::_AttributeProto_default_instance_._instance.get_mutable()->g_ = const_cast< ::onnx::GraphProto*>(
      ::onnx::GraphProto::internal_default_instance());
}
class AttributeProto::HasBitSetters {
 public:
  static const ::onnx::TensorProto& t(const AttributeProto* msg);
  static const ::onnx::GraphProto& g(const AttributeProto* msg);
};

const ::onnx::TensorProto&
AttributeProto::HasBitSetters::t(const AttributeProto* msg) {
  return *msg->t_;
}
const ::onnx::GraphProto&
AttributeProto::HasBitSetters::g(const AttributeProto* msg) {
  return *msg->g_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AttributeProto::kNameFieldNumber;
const int AttributeProto::kRefAttrNameFieldNumber;
const int AttributeProto::kDocStringFieldNumber;
const int AttributeProto::kTypeFieldNumber;
const int AttributeProto::kFFieldNumber;
const int AttributeProto::kIFieldNumber;
const int AttributeProto::kSFieldNumber;
const int AttributeProto::kTFieldNumber;
const int AttributeProto::kGFieldNumber;
const int AttributeProto::kFloatsFieldNumber;
const int AttributeProto::kIntsFieldNumber;
const int AttributeProto::kStringsFieldNumber;
const int AttributeProto::kTensorsFieldNumber;
const int AttributeProto::kGraphsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AttributeProto::AttributeProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.AttributeProto)
}
AttributeProto::AttributeProto(const AttributeProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      floats_(from.floats_),
      ints_(from.ints_),
      strings_(from.strings_),
      tensors_(from.tensors_),
      graphs_(from.graphs_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.s().size() > 0) {
    s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.ref_attr_name().size() > 0) {
    ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
  }
  if (from.has_t()) {
    t_ = new ::onnx::TensorProto(*from.t_);
  } else {
    t_ = nullptr;
  }
  if (from.has_g()) {
    g_ = new ::onnx::GraphProto(*from.g_);
  } else {
    g_ = nullptr;
  }
  ::memcpy(&i_, &from.i_,
    static_cast<size_t>(reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&i_)) + sizeof(type_));
  // @@protoc_insertion_point(copy_constructor:onnx.AttributeProto)
}

void AttributeProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_AttributeProto_onnx_2eproto3.base);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&t_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&type_) -
      reinterpret_cast<char*>(&t_)) + sizeof(type_));
}

AttributeProto::~AttributeProto() {
  // @@protoc_insertion_point(destructor:onnx.AttributeProto)
  SharedDtor();
}

void AttributeProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ref_attr_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete t_;
  if (this != internal_default_instance()) delete g_;
}

void AttributeProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const AttributeProto& AttributeProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_AttributeProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void AttributeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.AttributeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  floats_.Clear();
  ints_.Clear();
  strings_.Clear();
  tensors_.Clear();
  graphs_.Clear();
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ref_attr_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && t_ != nullptr) {
    delete t_;
  }
  t_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && g_ != nullptr) {
    delete g_;
  }
  g_ = nullptr;
  ::memset(&i_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&type_) -
      reinterpret_cast<char*>(&i_)) + sizeof(type_));
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* AttributeProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<AttributeProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // string name = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.AttributeProto.name");
        object = msg->mutable_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // float f = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 21) goto handle_unusual;
        msg->set_f(::google::protobuf::io::UnalignedLoad<float>(ptr));
        ptr += sizeof(float);
        break;
      }
      // int64 i = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
        msg->set_i(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // bytes s = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        object = msg->mutable_s();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParser;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // .onnx.TensorProto t = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::TensorProto::_InternalParse;
        object = msg->mutable_t();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // .onnx.GraphProto g = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::GraphProto::_InternalParse;
        object = msg->mutable_g();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // repeated float floats = 7;
      case 7: {
        if (static_cast<::google::protobuf::uint8>(tag) == 58) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedFloatParser;
          object = msg->mutable_floats();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 61) goto handle_unusual;
        do {
          msg->add_floats(::google::protobuf::io::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 61 && (ptr += 1));
        break;
      }
      // repeated int64 ints = 8;
      case 8: {
        if (static_cast<::google::protobuf::uint8>(tag) == 66) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedInt64Parser;
          object = msg->mutable_ints();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual;
        do {
          msg->add_ints(::google::protobuf::internal::ReadVarint(&ptr));
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 64 && (ptr += 1));
        break;
      }
      // repeated bytes strings = 9;
      case 9: {
        if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          object = msg->add_strings();
          if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
            parser_till_end = ::google::protobuf::internal::GreedyStringParser;
            goto string_till_end;
          }
          GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx));
          ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
          ptr += size;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 74 && (ptr += 1));
        break;
      }
      // repeated .onnx.TensorProto tensors = 10;
      case 10: {
        if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::TensorProto::_InternalParse;
          object = msg->add_tensors();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 82 && (ptr += 1));
        break;
      }
      // repeated .onnx.GraphProto graphs = 11;
      case 11: {
        if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::GraphProto::_InternalParse;
          object = msg->add_graphs();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 90 && (ptr += 1));
        break;
      }
      // string doc_string = 13;
      case 13: {
        if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.AttributeProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // .onnx.AttributeProto.AttributeType type = 20;
      case 20: {
        if (static_cast<::google::protobuf::uint8>(tag) != 160) goto handle_unusual;
        ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
        msg->set_type(static_cast<::onnx::AttributeProto_AttributeType>(val));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // string ref_attr_name = 21;
      case 21: {
        if (static_cast<::google::protobuf::uint8>(tag) != 170) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.AttributeProto.ref_attr_name");
        object = msg->mutable_ref_attr_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool AttributeProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.AttributeProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.AttributeProto.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // float f = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (21 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &f_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int64 i = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &i_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes s = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_s()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.TensorProto t = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_t()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.GraphProto g = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_g()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float floats = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_floats())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (61 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 58u, input, this->mutable_floats())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 ints = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_ints())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 1, 66u, input, this->mutable_ints())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bytes strings = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_strings()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.TensorProto tensors = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_tensors()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.GraphProto graphs = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_graphs()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (106 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.AttributeProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.AttributeProto.AttributeType type = 20;
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (160 & 0xFF)) {
          int value = 0;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_type(static_cast< ::onnx::AttributeProto_AttributeType >(value));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string ref_attr_name = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (170 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_ref_attr_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.AttributeProto.ref_attr_name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.AttributeProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.AttributeProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void AttributeProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.AttributeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // float f = 2;
  if (this->f() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->f(), output);
  }

  // int64 i = 3;
  if (this->i() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output);
  }

  // bytes s = 4;
  if (this->s().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->s(), output);
  }

  // .onnx.TensorProto t = 5;
  if (this->has_t()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, HasBitSetters::t(this), output);
  }

  // .onnx.GraphProto g = 6;
  if (this->has_g()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, HasBitSetters::g(this), output);
  }

  // repeated float floats = 7;
  if (this->floats_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_floats_cached_byte_size_.load(
        std::memory_order_relaxed));
    ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
      this->floats().data(), this->floats_size(), output);
  }

  // repeated int64 ints = 8;
  if (this->ints_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(8, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_ints_cached_byte_size_.load(
        std::memory_order_relaxed));
  }
  for (int i = 0, n = this->ints_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
      this->ints(i), output);
  }

  // repeated bytes strings = 9;
  for (int i = 0, n = this->strings_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      9, this->strings(i), output);
  }

  // repeated .onnx.TensorProto tensors = 10;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10,
      this->tensors(static_cast<int>(i)),
      output);
  }

  // repeated .onnx.GraphProto graphs = 11;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11,
      this->graphs(static_cast<int>(i)),
      output);
  }

  // string doc_string = 13;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      13, this->doc_string(), output);
  }

  // .onnx.AttributeProto.AttributeType type = 20;
  if (this->type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      20, this->type(), output);
  }

  // string ref_attr_name = 21;
  if (this->ref_attr_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.ref_attr_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      21, this->ref_attr_name(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.AttributeProto)
}

::google::protobuf::uint8* AttributeProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.AttributeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // float f = 2;
  if (this->f() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->f(), target);
  }

  // int64 i = 3;
  if (this->i() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target);
  }

  // bytes s = 4;
  if (this->s().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->s(), target);
  }

  // .onnx.TensorProto t = 5;
  if (this->has_t()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, HasBitSetters::t(this), target);
  }

  // .onnx.GraphProto g = 6;
  if (this->has_g()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, HasBitSetters::g(this), target);
  }

  // repeated float floats = 7;
  if (this->floats_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      7,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _floats_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->floats_, target);
  }

  // repeated int64 ints = 8;
  if (this->ints_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      8,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _ints_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt64NoTagToArray(this->ints_, target);
  }

  // repeated bytes strings = 9;
  for (int i = 0, n = this->strings_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(9, this->strings(i), target);
  }

  // repeated .onnx.TensorProto tensors = 10;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, this->tensors(static_cast<int>(i)), target);
  }

  // repeated .onnx.GraphProto graphs = 11;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->graphs(static_cast<int>(i)), target);
  }

  // string doc_string = 13;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        13, this->doc_string(), target);
  }

  // .onnx.AttributeProto.AttributeType type = 20;
  if (this->type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      20, this->type(), target);
  }

  // string ref_attr_name = 21;
  if (this->ref_attr_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.AttributeProto.ref_attr_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        21, this->ref_attr_name(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.AttributeProto)
  return target;
}

size_t AttributeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.AttributeProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated float floats = 7;
  {
    unsigned int count = static_cast<unsigned int>(this->floats_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _floats_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int64 ints = 8;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->ints_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _ints_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated bytes strings = 9;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->strings_size());
  for (int i = 0, n = this->strings_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->strings(i));
  }

  // repeated .onnx.TensorProto tensors = 10;
  {
    unsigned int count = static_cast<unsigned int>(this->tensors_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->tensors(static_cast<int>(i)));
    }
  }

  // repeated .onnx.GraphProto graphs = 11;
  {
    unsigned int count = static_cast<unsigned int>(this->graphs_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->graphs(static_cast<int>(i)));
    }
  }

  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // bytes s = 4;
  if (this->s().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->s());
  }

  // string doc_string = 13;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  // string ref_attr_name = 21;
  if (this->ref_attr_name().size() > 0) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->ref_attr_name());
  }

  // .onnx.TensorProto t = 5;
  if (this->has_t()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *t_);
  }

  // .onnx.GraphProto g = 6;
  if (this->has_g()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *g_);
  }

  // int64 i = 3;
  if (this->i() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->i());
  }

  // float f = 2;
  if (this->f() != 0) {
    total_size += 1 + 4;
  }

  // .onnx.AttributeProto.AttributeType type = 20;
  if (this->type() != 0) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void AttributeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.AttributeProto)
  GOOGLE_DCHECK_NE(&from, this);
  const AttributeProto* source =
      ::google::protobuf::DynamicCastToGenerated<AttributeProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.AttributeProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.AttributeProto)
    MergeFrom(*source);
  }
}

void AttributeProto::MergeFrom(const AttributeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.AttributeProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  floats_.MergeFrom(from.floats_);
  ints_.MergeFrom(from.ints_);
  strings_.MergeFrom(from.strings_);
  tensors_.MergeFrom(from.tensors_);
  graphs_.MergeFrom(from.graphs_);
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.s().size() > 0) {

    s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.ref_attr_name().size() > 0) {

    ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
  }
  if (from.has_t()) {
    mutable_t()->::onnx::TensorProto::MergeFrom(from.t());
  }
  if (from.has_g()) {
    mutable_g()->::onnx::GraphProto::MergeFrom(from.g());
  }
  if (from.i() != 0) {
    set_i(from.i());
  }
  if (from.f() != 0) {
    set_f(from.f());
  }
  if (from.type() != 0) {
    set_type(from.type());
  }
}

void AttributeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.AttributeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AttributeProto::CopyFrom(const AttributeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.AttributeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void AttributeProto::Swap(AttributeProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AttributeProto::InternalSwap(AttributeProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  floats_.InternalSwap(&other->floats_);
  ints_.InternalSwap(&other->ints_);
  strings_.InternalSwap(CastToBase(&other->strings_));
  CastToBase(&tensors_)->InternalSwap(CastToBase(&other->tensors_));
  CastToBase(&graphs_)->InternalSwap(CastToBase(&other->graphs_));
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  s_.Swap(&other->s_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  ref_attr_name_.Swap(&other->ref_attr_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(t_, other->t_);
  swap(g_, other->g_);
  swap(i_, other->i_);
  swap(f_, other->f_);
  swap(type_, other->type_);
}

::google::protobuf::Metadata AttributeProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void ValueInfoProto::InitAsDefaultInstance() {
  ::onnx::_ValueInfoProto_default_instance_._instance.get_mutable()->type_ = const_cast< ::onnx::TypeProto*>(
      ::onnx::TypeProto::internal_default_instance());
}
class ValueInfoProto::HasBitSetters {
 public:
  static const ::onnx::TypeProto& type(const ValueInfoProto* msg);
};

const ::onnx::TypeProto&
ValueInfoProto::HasBitSetters::type(const ValueInfoProto* msg) {
  return *msg->type_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ValueInfoProto::kNameFieldNumber;
const int ValueInfoProto::kTypeFieldNumber;
const int ValueInfoProto::kDocStringFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ValueInfoProto::ValueInfoProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.ValueInfoProto)
}
ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_type()) {
    type_ = new ::onnx::TypeProto(*from.type_);
  } else {
    type_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:onnx.ValueInfoProto)
}

void ValueInfoProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_ValueInfoProto_onnx_2eproto3.base);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_ = nullptr;
}

ValueInfoProto::~ValueInfoProto() {
  // @@protoc_insertion_point(destructor:onnx.ValueInfoProto)
  SharedDtor();
}

void ValueInfoProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete type_;
}

void ValueInfoProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ValueInfoProto& ValueInfoProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_ValueInfoProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void ValueInfoProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.ValueInfoProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && type_ != nullptr) {
    delete type_;
  }
  type_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ValueInfoProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<ValueInfoProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // string name = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ValueInfoProto.name");
        object = msg->mutable_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // .onnx.TypeProto type = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::TypeProto::_InternalParse;
        object = msg->mutable_type();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // string doc_string = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ValueInfoProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ValueInfoProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.ValueInfoProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ValueInfoProto.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.TypeProto type = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_type()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ValueInfoProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.ValueInfoProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.ValueInfoProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void ValueInfoProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.ValueInfoProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ValueInfoProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // .onnx.TypeProto type = 2;
  if (this->has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, HasBitSetters::type(this), output);
  }

  // string doc_string = 3;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ValueInfoProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->doc_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.ValueInfoProto)
}

::google::protobuf::uint8* ValueInfoProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.ValueInfoProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ValueInfoProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // .onnx.TypeProto type = 2;
  if (this->has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, HasBitSetters::type(this), target);
  }

  // string doc_string = 3;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ValueInfoProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->doc_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.ValueInfoProto)
  return target;
}

size_t ValueInfoProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.ValueInfoProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // string doc_string = 3;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  // .onnx.TypeProto type = 2;
  if (this->has_type()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *type_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ValueInfoProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.ValueInfoProto)
  GOOGLE_DCHECK_NE(&from, this);
  const ValueInfoProto* source =
      ::google::protobuf::DynamicCastToGenerated<ValueInfoProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.ValueInfoProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.ValueInfoProto)
    MergeFrom(*source);
  }
}

void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.ValueInfoProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_type()) {
    mutable_type()->::onnx::TypeProto::MergeFrom(from.type());
  }
}

void ValueInfoProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.ValueInfoProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ValueInfoProto::CopyFrom(const ValueInfoProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.ValueInfoProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ValueInfoProto::Swap(ValueInfoProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(type_, other->type_);
}

::google::protobuf::Metadata ValueInfoProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void NodeProto::InitAsDefaultInstance() {
}
class NodeProto::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NodeProto::kInputFieldNumber;
const int NodeProto::kOutputFieldNumber;
const int NodeProto::kNameFieldNumber;
const int NodeProto::kOpTypeFieldNumber;
const int NodeProto::kDomainFieldNumber;
const int NodeProto::kAttributeFieldNumber;
const int NodeProto::kDocStringFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NodeProto::NodeProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.NodeProto)
}
NodeProto::NodeProto(const NodeProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      input_(from.input_),
      output_(from.output_),
      attribute_(from.attribute_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.op_type().size() > 0) {
    op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.domain().size() > 0) {
    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
  // @@protoc_insertion_point(copy_constructor:onnx.NodeProto)
}

void NodeProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_AttributeProto_onnx_2eproto3.base);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

NodeProto::~NodeProto() {
  // @@protoc_insertion_point(destructor:onnx.NodeProto)
  SharedDtor();
}

void NodeProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  op_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void NodeProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const NodeProto& NodeProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_AttributeProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void NodeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.NodeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  input_.Clear();
  output_.Clear();
  attribute_.Clear();
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  op_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* NodeProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<NodeProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // repeated string input = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          ctx->extra_parse_data().SetFieldName("onnx.NodeProto.input");
          object = msg->add_input();
          if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
            parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
            goto string_till_end;
          }
          GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
          ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
          ptr += size;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
        break;
      }
      // repeated string output = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          ctx->extra_parse_data().SetFieldName("onnx.NodeProto.output");
          object = msg->add_output();
          if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
            parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
            goto string_till_end;
          }
          GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
          ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
          ptr += size;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1));
        break;
      }
      // string name = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.NodeProto.name");
        object = msg->mutable_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string op_type = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.NodeProto.op_type");
        object = msg->mutable_op_type();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // repeated .onnx.AttributeProto attribute = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::AttributeProto::_InternalParse;
          object = msg->add_attribute();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1));
        break;
      }
      // string doc_string = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.NodeProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string domain = 7;
      case 7: {
        if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.NodeProto.domain");
        object = msg->mutable_domain();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool NodeProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.NodeProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string input = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_input()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->input(this->input_size() - 1).data(),
            static_cast<int>(this->input(this->input_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.input"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string output = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_output()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->output(this->output_size() - 1).data(),
            static_cast<int>(this->output(this->output_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.output"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string name = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string op_type = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_op_type()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->op_type().data(), static_cast<int>(this->op_type().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.op_type"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.AttributeProto attribute = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_attribute()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string domain = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_domain()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->domain().data(), static_cast<int>(this->domain().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.NodeProto.domain"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.NodeProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.NodeProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void NodeProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.NodeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string input = 1;
  for (int i = 0, n = this->input_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->input(i).data(), static_cast<int>(this->input(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.input");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->input(i), output);
  }

  // repeated string output = 2;
  for (int i = 0, n = this->output_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->output(i).data(), static_cast<int>(this->output(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.output");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->output(i), output);
  }

  // string name = 3;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->name(), output);
  }

  // string op_type = 4;
  if (this->op_type().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->op_type().data(), static_cast<int>(this->op_type().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.op_type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->op_type(), output);
  }

  // repeated .onnx.AttributeProto attribute = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5,
      this->attribute(static_cast<int>(i)),
      output);
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->doc_string(), output);
  }

  // string domain = 7;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.domain");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      7, this->domain(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.NodeProto)
}

::google::protobuf::uint8* NodeProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.NodeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string input = 1;
  for (int i = 0, n = this->input_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->input(i).data(), static_cast<int>(this->input(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.input");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->input(i), target);
  }

  // repeated string output = 2;
  for (int i = 0, n = this->output_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->output(i).data(), static_cast<int>(this->output(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.output");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->output(i), target);
  }

  // string name = 3;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->name(), target);
  }

  // string op_type = 4;
  if (this->op_type().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->op_type().data(), static_cast<int>(this->op_type().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.op_type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->op_type(), target);
  }

  // repeated .onnx.AttributeProto attribute = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->attribute(static_cast<int>(i)), target);
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->doc_string(), target);
  }

  // string domain = 7;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.NodeProto.domain");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        7, this->domain(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.NodeProto)
  return target;
}

size_t NodeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.NodeProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string input = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->input_size());
  for (int i = 0, n = this->input_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->input(i));
  }

  // repeated string output = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->output_size());
  for (int i = 0, n = this->output_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->output(i));
  }

  // repeated .onnx.AttributeProto attribute = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->attribute_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->attribute(static_cast<int>(i)));
    }
  }

  // string name = 3;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // string op_type = 4;
  if (this->op_type().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->op_type());
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  // string domain = 7;
  if (this->domain().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->domain());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void NodeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.NodeProto)
  GOOGLE_DCHECK_NE(&from, this);
  const NodeProto* source =
      ::google::protobuf::DynamicCastToGenerated<NodeProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.NodeProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.NodeProto)
    MergeFrom(*source);
  }
}

void NodeProto::MergeFrom(const NodeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.NodeProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  input_.MergeFrom(from.input_);
  output_.MergeFrom(from.output_);
  attribute_.MergeFrom(from.attribute_);
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.op_type().size() > 0) {

    op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.domain().size() > 0) {

    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
}

void NodeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.NodeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void NodeProto::CopyFrom(const NodeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.NodeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void NodeProto::Swap(NodeProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NodeProto::InternalSwap(NodeProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  input_.InternalSwap(CastToBase(&other->input_));
  output_.InternalSwap(CastToBase(&other->output_));
  CastToBase(&attribute_)->InternalSwap(CastToBase(&other->attribute_));
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  op_type_.Swap(&other->op_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  domain_.Swap(&other->domain_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::google::protobuf::Metadata NodeProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void ModelProto::InitAsDefaultInstance() {
  ::onnx::_ModelProto_default_instance_._instance.get_mutable()->graph_ = const_cast< ::onnx::GraphProto*>(
      ::onnx::GraphProto::internal_default_instance());
}
class ModelProto::HasBitSetters {
 public:
  static const ::onnx::GraphProto& graph(const ModelProto* msg);
};

const ::onnx::GraphProto&
ModelProto::HasBitSetters::graph(const ModelProto* msg) {
  return *msg->graph_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ModelProto::kIrVersionFieldNumber;
const int ModelProto::kOpsetImportFieldNumber;
const int ModelProto::kProducerNameFieldNumber;
const int ModelProto::kProducerVersionFieldNumber;
const int ModelProto::kDomainFieldNumber;
const int ModelProto::kModelVersionFieldNumber;
const int ModelProto::kDocStringFieldNumber;
const int ModelProto::kGraphFieldNumber;
const int ModelProto::kMetadataPropsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ModelProto::ModelProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.ModelProto)
}
ModelProto::ModelProto(const ModelProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      opset_import_(from.opset_import_),
      metadata_props_(from.metadata_props_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.producer_name().size() > 0) {
    producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
  }
  producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.producer_version().size() > 0) {
    producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
  }
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.domain().size() > 0) {
    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_graph()) {
    graph_ = new ::onnx::GraphProto(*from.graph_);
  } else {
    graph_ = nullptr;
  }
  ::memcpy(&ir_version_, &from.ir_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
    reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
  // @@protoc_insertion_point(copy_constructor:onnx.ModelProto)
}

void ModelProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_ModelProto_onnx_2eproto3.base);
  producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&graph_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&model_version_) -
      reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
}

ModelProto::~ModelProto() {
  // @@protoc_insertion_point(destructor:onnx.ModelProto)
  SharedDtor();
}

void ModelProto::SharedDtor() {
  producer_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  producer_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete graph_;
}

void ModelProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ModelProto& ModelProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_ModelProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void ModelProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.ModelProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  opset_import_.Clear();
  metadata_props_.Clear();
  producer_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  producer_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && graph_ != nullptr) {
    delete graph_;
  }
  graph_ = nullptr;
  ::memset(&ir_version_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&model_version_) -
      reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ModelProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<ModelProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // int64 ir_version = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
        msg->set_ir_version(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // string producer_name = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ModelProto.producer_name");
        object = msg->mutable_producer_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string producer_version = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ModelProto.producer_version");
        object = msg->mutable_producer_version();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string domain = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ModelProto.domain");
        object = msg->mutable_domain();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // int64 model_version = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual;
        msg->set_model_version(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // string doc_string = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.ModelProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // .onnx.GraphProto graph = 7;
      case 7: {
        if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::GraphProto::_InternalParse;
        object = msg->mutable_graph();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // repeated .onnx.OperatorSetIdProto opset_import = 8;
      case 8: {
        if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::OperatorSetIdProto::_InternalParse;
          object = msg->add_opset_import();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 66 && (ptr += 1));
        break;
      }
      // repeated .onnx.StringStringEntryProto metadata_props = 14;
      case 14: {
        if (static_cast<::google::protobuf::uint8>(tag) != 114) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::StringStringEntryProto::_InternalParse;
          object = msg->add_metadata_props();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 114 && (ptr += 1));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ModelProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.ModelProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // int64 ir_version = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &ir_version_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string producer_name = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_producer_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->producer_name().data(), static_cast<int>(this->producer_name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ModelProto.producer_name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string producer_version = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_producer_version()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->producer_version().data(), static_cast<int>(this->producer_version().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ModelProto.producer_version"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string domain = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_domain()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->domain().data(), static_cast<int>(this->domain().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ModelProto.domain"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int64 model_version = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &model_version_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.ModelProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.GraphProto graph = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_graph()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.OperatorSetIdProto opset_import = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_opset_import()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.StringStringEntryProto metadata_props = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (114 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_metadata_props()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.ModelProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.ModelProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void ModelProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.ModelProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 ir_version = 1;
  if (this->ir_version() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->ir_version(), output);
  }

  // string producer_name = 2;
  if (this->producer_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->producer_name().data(), static_cast<int>(this->producer_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.producer_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->producer_name(), output);
  }

  // string producer_version = 3;
  if (this->producer_version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->producer_version().data(), static_cast<int>(this->producer_version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.producer_version");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->producer_version(), output);
  }

  // string domain = 4;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.domain");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->domain(), output);
  }

  // int64 model_version = 5;
  if (this->model_version() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->model_version(), output);
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->doc_string(), output);
  }

  // .onnx.GraphProto graph = 7;
  if (this->has_graph()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, HasBitSetters::graph(this), output);
  }

  // repeated .onnx.OperatorSetIdProto opset_import = 8;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8,
      this->opset_import(static_cast<int>(i)),
      output);
  }

  // repeated .onnx.StringStringEntryProto metadata_props = 14;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      14,
      this->metadata_props(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.ModelProto)
}

::google::protobuf::uint8* ModelProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.ModelProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 ir_version = 1;
  if (this->ir_version() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->ir_version(), target);
  }

  // string producer_name = 2;
  if (this->producer_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->producer_name().data(), static_cast<int>(this->producer_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.producer_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->producer_name(), target);
  }

  // string producer_version = 3;
  if (this->producer_version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->producer_version().data(), static_cast<int>(this->producer_version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.producer_version");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->producer_version(), target);
  }

  // string domain = 4;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.domain");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->domain(), target);
  }

  // int64 model_version = 5;
  if (this->model_version() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->model_version(), target);
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.ModelProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->doc_string(), target);
  }

  // .onnx.GraphProto graph = 7;
  if (this->has_graph()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, HasBitSetters::graph(this), target);
  }

  // repeated .onnx.OperatorSetIdProto opset_import = 8;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        8, this->opset_import(static_cast<int>(i)), target);
  }

  // repeated .onnx.StringStringEntryProto metadata_props = 14;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        14, this->metadata_props(static_cast<int>(i)), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.ModelProto)
  return target;
}

size_t ModelProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.ModelProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .onnx.OperatorSetIdProto opset_import = 8;
  {
    unsigned int count = static_cast<unsigned int>(this->opset_import_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->opset_import(static_cast<int>(i)));
    }
  }

  // repeated .onnx.StringStringEntryProto metadata_props = 14;
  {
    unsigned int count = static_cast<unsigned int>(this->metadata_props_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->metadata_props(static_cast<int>(i)));
    }
  }

  // string producer_name = 2;
  if (this->producer_name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->producer_name());
  }

  // string producer_version = 3;
  if (this->producer_version().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->producer_version());
  }

  // string domain = 4;
  if (this->domain().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->domain());
  }

  // string doc_string = 6;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  // .onnx.GraphProto graph = 7;
  if (this->has_graph()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *graph_);
  }

  // int64 ir_version = 1;
  if (this->ir_version() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->ir_version());
  }

  // int64 model_version = 5;
  if (this->model_version() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->model_version());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ModelProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.ModelProto)
  GOOGLE_DCHECK_NE(&from, this);
  const ModelProto* source =
      ::google::protobuf::DynamicCastToGenerated<ModelProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.ModelProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.ModelProto)
    MergeFrom(*source);
  }
}

void ModelProto::MergeFrom(const ModelProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.ModelProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  opset_import_.MergeFrom(from.opset_import_);
  metadata_props_.MergeFrom(from.metadata_props_);
  if (from.producer_name().size() > 0) {

    producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
  }
  if (from.producer_version().size() > 0) {

    producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
  }
  if (from.domain().size() > 0) {

    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_graph()) {
    mutable_graph()->::onnx::GraphProto::MergeFrom(from.graph());
  }
  if (from.ir_version() != 0) {
    set_ir_version(from.ir_version());
  }
  if (from.model_version() != 0) {
    set_model_version(from.model_version());
  }
}

void ModelProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.ModelProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ModelProto::CopyFrom(const ModelProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.ModelProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ModelProto::Swap(ModelProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ModelProto::InternalSwap(ModelProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&opset_import_)->InternalSwap(CastToBase(&other->opset_import_));
  CastToBase(&metadata_props_)->InternalSwap(CastToBase(&other->metadata_props_));
  producer_name_.Swap(&other->producer_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  producer_version_.Swap(&other->producer_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  domain_.Swap(&other->domain_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(graph_, other->graph_);
  swap(ir_version_, other->ir_version_);
  swap(model_version_, other->model_version_);
}

::google::protobuf::Metadata ModelProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void StringStringEntryProto::InitAsDefaultInstance() {
}
class StringStringEntryProto::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StringStringEntryProto::kKeyFieldNumber;
const int StringStringEntryProto::kValueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

StringStringEntryProto::StringStringEntryProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.StringStringEntryProto)
}
StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.key().size() > 0) {
    key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  }
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.value().size() > 0) {
    value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  }
  // @@protoc_insertion_point(copy_constructor:onnx.StringStringEntryProto)
}

void StringStringEntryProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_StringStringEntryProto_onnx_2eproto3.base);
  key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

StringStringEntryProto::~StringStringEntryProto() {
  // @@protoc_insertion_point(destructor:onnx.StringStringEntryProto)
  SharedDtor();
}

void StringStringEntryProto::SharedDtor() {
  key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void StringStringEntryProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const StringStringEntryProto& StringStringEntryProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_StringStringEntryProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void StringStringEntryProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.StringStringEntryProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* StringStringEntryProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<StringStringEntryProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // string key = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.StringStringEntryProto.key");
        object = msg->mutable_key();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string value = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.StringStringEntryProto.value");
        object = msg->mutable_value();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool StringStringEntryProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.StringStringEntryProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string key = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_key()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->key().data(), static_cast<int>(this->key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.StringStringEntryProto.key"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string value = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_value()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->value().data(), static_cast<int>(this->value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.StringStringEntryProto.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.StringStringEntryProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.StringStringEntryProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void StringStringEntryProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.StringStringEntryProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string key = 1;
  if (this->key().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->key().data(), static_cast<int>(this->key().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.StringStringEntryProto.key");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->key(), output);
  }

  // string value = 2;
  if (this->value().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->value().data(), static_cast<int>(this->value().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.StringStringEntryProto.value");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->value(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.StringStringEntryProto)
}

::google::protobuf::uint8* StringStringEntryProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.StringStringEntryProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string key = 1;
  if (this->key().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->key().data(), static_cast<int>(this->key().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.StringStringEntryProto.key");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->key(), target);
  }

  // string value = 2;
  if (this->value().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->value().data(), static_cast<int>(this->value().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.StringStringEntryProto.value");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->value(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.StringStringEntryProto)
  return target;
}

size_t StringStringEntryProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.StringStringEntryProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string key = 1;
  if (this->key().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->key());
  }

  // string value = 2;
  if (this->value().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->value());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void StringStringEntryProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.StringStringEntryProto)
  GOOGLE_DCHECK_NE(&from, this);
  const StringStringEntryProto* source =
      ::google::protobuf::DynamicCastToGenerated<StringStringEntryProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.StringStringEntryProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.StringStringEntryProto)
    MergeFrom(*source);
  }
}

void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.StringStringEntryProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.key().size() > 0) {

    key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  }
  if (from.value().size() > 0) {

    value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  }
}

void StringStringEntryProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.StringStringEntryProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.StringStringEntryProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void StringStringEntryProto::Swap(StringStringEntryProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::google::protobuf::Metadata StringStringEntryProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void GraphProto::InitAsDefaultInstance() {
}
class GraphProto::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GraphProto::kNodeFieldNumber;
const int GraphProto::kNameFieldNumber;
const int GraphProto::kInitializerFieldNumber;
const int GraphProto::kDocStringFieldNumber;
const int GraphProto::kInputFieldNumber;
const int GraphProto::kOutputFieldNumber;
const int GraphProto::kValueInfoFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

GraphProto::GraphProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.GraphProto)
}
GraphProto::GraphProto(const GraphProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      node_(from.node_),
      initializer_(from.initializer_),
      input_(from.input_),
      output_(from.output_),
      value_info_(from.value_info_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  // @@protoc_insertion_point(copy_constructor:onnx.GraphProto)
}

void GraphProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_AttributeProto_onnx_2eproto3.base);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

GraphProto::~GraphProto() {
  // @@protoc_insertion_point(destructor:onnx.GraphProto)
  SharedDtor();
}

void GraphProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void GraphProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const GraphProto& GraphProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_AttributeProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void GraphProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.GraphProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  node_.Clear();
  initializer_.Clear();
  input_.Clear();
  output_.Clear();
  value_info_.Clear();
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* GraphProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<GraphProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // repeated .onnx.NodeProto node = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::NodeProto::_InternalParse;
          object = msg->add_node();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
        break;
      }
      // string name = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.GraphProto.name");
        object = msg->mutable_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // repeated .onnx.TensorProto initializer = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::TensorProto::_InternalParse;
          object = msg->add_initializer();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1));
        break;
      }
      // string doc_string = 10;
      case 10: {
        if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.GraphProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // repeated .onnx.ValueInfoProto input = 11;
      case 11: {
        if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::ValueInfoProto::_InternalParse;
          object = msg->add_input();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 90 && (ptr += 1));
        break;
      }
      // repeated .onnx.ValueInfoProto output = 12;
      case 12: {
        if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::ValueInfoProto::_InternalParse;
          object = msg->add_output();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 98 && (ptr += 1));
        break;
      }
      // repeated .onnx.ValueInfoProto value_info = 13;
      case 13: {
        if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::ValueInfoProto::_InternalParse;
          object = msg->add_value_info();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 106 && (ptr += 1));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool GraphProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.GraphProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .onnx.NodeProto node = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_node()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string name = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.GraphProto.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.TensorProto initializer = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_initializer()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.GraphProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.ValueInfoProto input = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_input()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.ValueInfoProto output = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (98 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_output()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.ValueInfoProto value_info = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (106 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_value_info()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.GraphProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.GraphProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void GraphProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.GraphProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .onnx.NodeProto node = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->node(static_cast<int>(i)),
      output);
  }

  // string name = 2;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.GraphProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->name(), output);
  }

  // repeated .onnx.TensorProto initializer = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5,
      this->initializer(static_cast<int>(i)),
      output);
  }

  // string doc_string = 10;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.GraphProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      10, this->doc_string(), output);
  }

  // repeated .onnx.ValueInfoProto input = 11;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11,
      this->input(static_cast<int>(i)),
      output);
  }

  // repeated .onnx.ValueInfoProto output = 12;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      12,
      this->output(static_cast<int>(i)),
      output);
  }

  // repeated .onnx.ValueInfoProto value_info = 13;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13,
      this->value_info(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.GraphProto)
}

::google::protobuf::uint8* GraphProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.GraphProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .onnx.NodeProto node = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->node(static_cast<int>(i)), target);
  }

  // string name = 2;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.GraphProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->name(), target);
  }

  // repeated .onnx.TensorProto initializer = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->initializer(static_cast<int>(i)), target);
  }

  // string doc_string = 10;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.GraphProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        10, this->doc_string(), target);
  }

  // repeated .onnx.ValueInfoProto input = 11;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->input(static_cast<int>(i)), target);
  }

  // repeated .onnx.ValueInfoProto output = 12;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        12, this->output(static_cast<int>(i)), target);
  }

  // repeated .onnx.ValueInfoProto value_info = 13;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        13, this->value_info(static_cast<int>(i)), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.GraphProto)
  return target;
}

size_t GraphProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.GraphProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .onnx.NodeProto node = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->node_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->node(static_cast<int>(i)));
    }
  }

  // repeated .onnx.TensorProto initializer = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->initializer_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->initializer(static_cast<int>(i)));
    }
  }

  // repeated .onnx.ValueInfoProto input = 11;
  {
    unsigned int count = static_cast<unsigned int>(this->input_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->input(static_cast<int>(i)));
    }
  }

  // repeated .onnx.ValueInfoProto output = 12;
  {
    unsigned int count = static_cast<unsigned int>(this->output_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->output(static_cast<int>(i)));
    }
  }

  // repeated .onnx.ValueInfoProto value_info = 13;
  {
    unsigned int count = static_cast<unsigned int>(this->value_info_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->value_info(static_cast<int>(i)));
    }
  }

  // string name = 2;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // string doc_string = 10;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GraphProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.GraphProto)
  GOOGLE_DCHECK_NE(&from, this);
  const GraphProto* source =
      ::google::protobuf::DynamicCastToGenerated<GraphProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.GraphProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.GraphProto)
    MergeFrom(*source);
  }
}

void GraphProto::MergeFrom(const GraphProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.GraphProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  node_.MergeFrom(from.node_);
  initializer_.MergeFrom(from.initializer_);
  input_.MergeFrom(from.input_);
  output_.MergeFrom(from.output_);
  value_info_.MergeFrom(from.value_info_);
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
}

void GraphProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.GraphProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void GraphProto::CopyFrom(const GraphProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.GraphProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GraphProto::Swap(GraphProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void GraphProto::InternalSwap(GraphProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&node_)->InternalSwap(CastToBase(&other->node_));
  CastToBase(&initializer_)->InternalSwap(CastToBase(&other->initializer_));
  CastToBase(&input_)->InternalSwap(CastToBase(&other->input_));
  CastToBase(&output_)->InternalSwap(CastToBase(&other->output_));
  CastToBase(&value_info_)->InternalSwap(CastToBase(&other->value_info_));
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::google::protobuf::Metadata GraphProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TensorProto_Segment::InitAsDefaultInstance() {
}
class TensorProto_Segment::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorProto_Segment::kBeginFieldNumber;
const int TensorProto_Segment::kEndFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TensorProto_Segment::TensorProto_Segment()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TensorProto.Segment)
}
TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&begin_, &from.begin_,
    static_cast<size_t>(reinterpret_cast<char*>(&end_) -
    reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  // @@protoc_insertion_point(copy_constructor:onnx.TensorProto.Segment)
}

void TensorProto_Segment::SharedCtor() {
  ::memset(&begin_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&end_) -
      reinterpret_cast<char*>(&begin_)) + sizeof(end_));
}

TensorProto_Segment::~TensorProto_Segment() {
  // @@protoc_insertion_point(destructor:onnx.TensorProto.Segment)
  SharedDtor();
}

void TensorProto_Segment::SharedDtor() {
}

void TensorProto_Segment::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TensorProto_Segment& TensorProto_Segment::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TensorProto_Segment_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TensorProto_Segment::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TensorProto.Segment)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&begin_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&end_) -
      reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TensorProto_Segment::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TensorProto_Segment*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // int64 begin = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
        msg->set_begin(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // int64 end = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
        msg->set_end(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TensorProto_Segment::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TensorProto.Segment)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // int64 begin = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &begin_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int64 end = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &end_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TensorProto.Segment)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TensorProto.Segment)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TensorProto_Segment::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TensorProto.Segment)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 begin = 1;
  if (this->begin() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->begin(), output);
  }

  // int64 end = 2;
  if (this->end() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->end(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TensorProto.Segment)
}

::google::protobuf::uint8* TensorProto_Segment::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorProto.Segment)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 begin = 1;
  if (this->begin() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->begin(), target);
  }

  // int64 end = 2;
  if (this->end() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->end(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorProto.Segment)
  return target;
}

size_t TensorProto_Segment::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TensorProto.Segment)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // int64 begin = 1;
  if (this->begin() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->begin());
  }

  // int64 end = 2;
  if (this->end() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->end());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorProto_Segment::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TensorProto.Segment)
  GOOGLE_DCHECK_NE(&from, this);
  const TensorProto_Segment* source =
      ::google::protobuf::DynamicCastToGenerated<TensorProto_Segment>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TensorProto.Segment)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TensorProto.Segment)
    MergeFrom(*source);
  }
}

void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorProto.Segment)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.begin() != 0) {
    set_begin(from.begin());
  }
  if (from.end() != 0) {
    set_end(from.end());
  }
}

void TensorProto_Segment::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TensorProto.Segment)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorProto.Segment)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TensorProto_Segment::Swap(TensorProto_Segment* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(begin_, other->begin_);
  swap(end_, other->end_);
}

::google::protobuf::Metadata TensorProto_Segment::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TensorProto::InitAsDefaultInstance() {
  ::onnx::_TensorProto_default_instance_._instance.get_mutable()->segment_ = const_cast< ::onnx::TensorProto_Segment*>(
      ::onnx::TensorProto_Segment::internal_default_instance());
}
class TensorProto::HasBitSetters {
 public:
  static const ::onnx::TensorProto_Segment& segment(const TensorProto* msg);
};

const ::onnx::TensorProto_Segment&
TensorProto::HasBitSetters::segment(const TensorProto* msg) {
  return *msg->segment_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorProto::kDimsFieldNumber;
const int TensorProto::kDataTypeFieldNumber;
const int TensorProto::kSegmentFieldNumber;
const int TensorProto::kFloatDataFieldNumber;
const int TensorProto::kInt32DataFieldNumber;
const int TensorProto::kStringDataFieldNumber;
const int TensorProto::kInt64DataFieldNumber;
const int TensorProto::kNameFieldNumber;
const int TensorProto::kDocStringFieldNumber;
const int TensorProto::kRawDataFieldNumber;
const int TensorProto::kExternalDataFieldNumber;
const int TensorProto::kDataLocationFieldNumber;
const int TensorProto::kDoubleDataFieldNumber;
const int TensorProto::kUint64DataFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TensorProto::TensorProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TensorProto)
}
TensorProto::TensorProto(const TensorProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      dims_(from.dims_),
      float_data_(from.float_data_),
      int32_data_(from.int32_data_),
      string_data_(from.string_data_),
      int64_data_(from.int64_data_),
      double_data_(from.double_data_),
      uint64_data_(from.uint64_data_),
      external_data_(from.external_data_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.raw_data().size() > 0) {
    raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
  }
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.doc_string().size() > 0) {
    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_segment()) {
    segment_ = new ::onnx::TensorProto_Segment(*from.segment_);
  } else {
    segment_ = nullptr;
  }
  ::memcpy(&data_type_, &from.data_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&data_location_) -
    reinterpret_cast<char*>(&data_type_)) + sizeof(data_location_));
  // @@protoc_insertion_point(copy_constructor:onnx.TensorProto)
}

void TensorProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_TensorProto_onnx_2eproto3.base);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&segment_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&data_location_) -
      reinterpret_cast<char*>(&segment_)) + sizeof(data_location_));
}

TensorProto::~TensorProto() {
  // @@protoc_insertion_point(destructor:onnx.TensorProto)
  SharedDtor();
}

void TensorProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  raw_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete segment_;
}

void TensorProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TensorProto& TensorProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TensorProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TensorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TensorProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  dims_.Clear();
  float_data_.Clear();
  int32_data_.Clear();
  string_data_.Clear();
  int64_data_.Clear();
  double_data_.Clear();
  uint64_data_.Clear();
  external_data_.Clear();
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  raw_data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && segment_ != nullptr) {
    delete segment_;
  }
  segment_ = nullptr;
  ::memset(&data_type_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&data_location_) -
      reinterpret_cast<char*>(&data_type_)) + sizeof(data_location_));
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TensorProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TensorProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // repeated int64 dims = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) == 10) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedInt64Parser;
          object = msg->mutable_dims();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
        do {
          msg->add_dims(::google::protobuf::internal::ReadVarint(&ptr));
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 8 && (ptr += 1));
        break;
      }
      // int32 data_type = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
        msg->set_data_type(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // .onnx.TensorProto.Segment segment = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::TensorProto_Segment::_InternalParse;
        object = msg->mutable_segment();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // repeated float float_data = 4 [packed = true];
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) == 34) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedFloatParser;
          object = msg->mutable_float_data();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 37) goto handle_unusual;
        do {
          msg->add_float_data(::google::protobuf::io::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 37 && (ptr += 1));
        break;
      }
      // repeated int32 int32_data = 5 [packed = true];
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) == 42) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedInt32Parser;
          object = msg->mutable_int32_data();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual;
        do {
          msg->add_int32_data(::google::protobuf::internal::ReadVarint(&ptr));
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 40 && (ptr += 1));
        break;
      }
      // repeated bytes string_data = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          object = msg->add_string_data();
          if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
            parser_till_end = ::google::protobuf::internal::GreedyStringParser;
            goto string_till_end;
          }
          GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx));
          ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
          ptr += size;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1));
        break;
      }
      // repeated int64 int64_data = 7 [packed = true];
      case 7: {
        if (static_cast<::google::protobuf::uint8>(tag) == 58) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedInt64Parser;
          object = msg->mutable_int64_data();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual;
        do {
          msg->add_int64_data(::google::protobuf::internal::ReadVarint(&ptr));
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 56 && (ptr += 1));
        break;
      }
      // string name = 8;
      case 8: {
        if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.TensorProto.name");
        object = msg->mutable_name();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // bytes raw_data = 9;
      case 9: {
        if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        object = msg->mutable_raw_data();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParser;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // repeated double double_data = 10 [packed = true];
      case 10: {
        if (static_cast<::google::protobuf::uint8>(tag) == 82) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedDoubleParser;
          object = msg->mutable_double_data();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 81) goto handle_unusual;
        do {
          msg->add_double_data(::google::protobuf::io::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 81 && (ptr += 1));
        break;
      }
      // repeated uint64 uint64_data = 11 [packed = true];
      case 11: {
        if (static_cast<::google::protobuf::uint8>(tag) == 90) {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::PackedUInt64Parser;
          object = msg->mutable_uint64_data();
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          if (size) ptr = parser_till_end(ptr, newend, object, ctx);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
          break;
        } else if (static_cast<::google::protobuf::uint8>(tag) != 88) goto handle_unusual;
        do {
          msg->add_uint64_data(::google::protobuf::internal::ReadVarint(&ptr));
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 88 && (ptr += 1));
        break;
      }
      // string doc_string = 12;
      case 12: {
        if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.TensorProto.doc_string");
        object = msg->mutable_doc_string();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // repeated .onnx.StringStringEntryProto external_data = 13;
      case 13: {
        if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::StringStringEntryProto::_InternalParse;
          object = msg->add_external_data();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 106 && (ptr += 1));
        break;
      }
      // .onnx.TensorProto.DataLocation data_location = 14;
      case 14: {
        if (static_cast<::google::protobuf::uint8>(tag) != 112) goto handle_unusual;
        ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
        msg->set_data_location(static_cast<::onnx::TensorProto_DataLocation>(val));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TensorProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TensorProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated int64 dims = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_dims())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 1, 10u, input, this->mutable_dims())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 data_type = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &data_type_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.TensorProto.Segment segment = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_segment()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float float_data = 4 [packed = true];
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_float_data())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (37 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 34u, input, this->mutable_float_data())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 int32_data = 5 [packed = true];
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_int32_data())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 42u, input, this->mutable_int32_data())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bytes string_data = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_string_data()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 int64_data = 7 [packed = true];
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_int64_data())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 1, 58u, input, this->mutable_int64_data())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string name = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.TensorProto.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes raw_data = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_raw_data()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated double double_data = 10 [packed = true];
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_double_data())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (81 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 1, 82u, input, this->mutable_double_data())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint64 uint64_data = 11 [packed = true];
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_uint64_data())));
        } else if (static_cast< ::google::protobuf::uint8>(tag) == (88 & 0xFF)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 1, 90u, input, this->mutable_uint64_data())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string doc_string = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (98 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_doc_string()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->doc_string().data(), static_cast<int>(this->doc_string().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.TensorProto.doc_string"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .onnx.StringStringEntryProto external_data = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (106 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_external_data()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.TensorProto.DataLocation data_location = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (112 & 0xFF)) {
          int value = 0;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_data_location(static_cast< ::onnx::TensorProto_DataLocation >(value));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TensorProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TensorProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TensorProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TensorProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int64 dims = 1;
  if (this->dims_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_dims_cached_byte_size_.load(
        std::memory_order_relaxed));
  }
  for (int i = 0, n = this->dims_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
      this->dims(i), output);
  }

  // int32 data_type = 2;
  if (this->data_type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->data_type(), output);
  }

  // .onnx.TensorProto.Segment segment = 3;
  if (this->has_segment()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, HasBitSetters::segment(this), output);
  }

  // repeated float float_data = 4 [packed = true];
  if (this->float_data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_float_data_cached_byte_size_.load(
        std::memory_order_relaxed));
    ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
      this->float_data().data(), this->float_data_size(), output);
  }

  // repeated int32 int32_data = 5 [packed = true];
  if (this->int32_data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_int32_data_cached_byte_size_.load(
        std::memory_order_relaxed));
  }
  for (int i = 0, n = this->int32_data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->int32_data(i), output);
  }

  // repeated bytes string_data = 6;
  for (int i = 0, n = this->string_data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      6, this->string_data(i), output);
  }

  // repeated int64 int64_data = 7 [packed = true];
  if (this->int64_data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_int64_data_cached_byte_size_.load(
        std::memory_order_relaxed));
  }
  for (int i = 0, n = this->int64_data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
      this->int64_data(i), output);
  }

  // string name = 8;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      8, this->name(), output);
  }

  // bytes raw_data = 9;
  if (this->raw_data().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      9, this->raw_data(), output);
  }

  // repeated double double_data = 10 [packed = true];
  if (this->double_data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(10, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_double_data_cached_byte_size_.load(
        std::memory_order_relaxed));
    ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
      this->double_data().data(), this->double_data_size(), output);
  }

  // repeated uint64 uint64_data = 11 [packed = true];
  if (this->uint64_data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(11, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_uint64_data_cached_byte_size_.load(
        std::memory_order_relaxed));
  }
  for (int i = 0, n = this->uint64_data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
      this->uint64_data(i), output);
  }

  // string doc_string = 12;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorProto.doc_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      12, this->doc_string(), output);
  }

  // repeated .onnx.StringStringEntryProto external_data = 13;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->external_data_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13,
      this->external_data(static_cast<int>(i)),
      output);
  }

  // .onnx.TensorProto.DataLocation data_location = 14;
  if (this->data_location() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      14, this->data_location(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TensorProto)
}

::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int64 dims = 1;
  if (this->dims_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _dims_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt64NoTagToArray(this->dims_, target);
  }

  // int32 data_type = 2;
  if (this->data_type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->data_type(), target);
  }

  // .onnx.TensorProto.Segment segment = 3;
  if (this->has_segment()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, HasBitSetters::segment(this), target);
  }

  // repeated float float_data = 4 [packed = true];
  if (this->float_data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      4,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _float_data_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->float_data_, target);
  }

  // repeated int32 int32_data = 5 [packed = true];
  if (this->int32_data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      5,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _int32_data_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->int32_data_, target);
  }

  // repeated bytes string_data = 6;
  for (int i = 0, n = this->string_data_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(6, this->string_data(i), target);
  }

  // repeated int64 int64_data = 7 [packed = true];
  if (this->int64_data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      7,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _int64_data_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt64NoTagToArray(this->int64_data_, target);
  }

  // string name = 8;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        8, this->name(), target);
  }

  // bytes raw_data = 9;
  if (this->raw_data().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        9, this->raw_data(), target);
  }

  // repeated double double_data = 10 [packed = true];
  if (this->double_data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      10,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _double_data_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteDoubleNoTagToArray(this->double_data_, target);
  }

  // repeated uint64 uint64_data = 11 [packed = true];
  if (this->uint64_data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      11,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        _uint64_data_cached_byte_size_.load(std::memory_order_relaxed),
         target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt64NoTagToArray(this->uint64_data_, target);
  }

  // string doc_string = 12;
  if (this->doc_string().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->doc_string().data(), static_cast<int>(this->doc_string().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorProto.doc_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        12, this->doc_string(), target);
  }

  // repeated .onnx.StringStringEntryProto external_data = 13;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->external_data_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        13, this->external_data(static_cast<int>(i)), target);
  }

  // .onnx.TensorProto.DataLocation data_location = 14;
  if (this->data_location() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      14, this->data_location(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorProto)
  return target;
}

size_t TensorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TensorProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int64 dims = 1;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->dims_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _dims_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated float float_data = 4 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->float_data_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _float_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 int32_data = 5 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->int32_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _int32_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated bytes string_data = 6;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->string_data_size());
  for (int i = 0, n = this->string_data_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->string_data(i));
  }

  // repeated int64 int64_data = 7 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->int64_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _int64_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated double double_data = 10 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->double_data_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _double_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated uint64 uint64_data = 11 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt64Size(this->uint64_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast<::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    _uint64_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated .onnx.StringStringEntryProto external_data = 13;
  {
    unsigned int count = static_cast<unsigned int>(this->external_data_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->external_data(static_cast<int>(i)));
    }
  }

  // string name = 8;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // bytes raw_data = 9;
  if (this->raw_data().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->raw_data());
  }

  // string doc_string = 12;
  if (this->doc_string().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->doc_string());
  }

  // .onnx.TensorProto.Segment segment = 3;
  if (this->has_segment()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *segment_);
  }

  // int32 data_type = 2;
  if (this->data_type() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->data_type());
  }

  // .onnx.TensorProto.DataLocation data_location = 14;
  if (this->data_location() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->data_location());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TensorProto)
  GOOGLE_DCHECK_NE(&from, this);
  const TensorProto* source =
      ::google::protobuf::DynamicCastToGenerated<TensorProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TensorProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TensorProto)
    MergeFrom(*source);
  }
}

void TensorProto::MergeFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  dims_.MergeFrom(from.dims_);
  float_data_.MergeFrom(from.float_data_);
  int32_data_.MergeFrom(from.int32_data_);
  string_data_.MergeFrom(from.string_data_);
  int64_data_.MergeFrom(from.int64_data_);
  double_data_.MergeFrom(from.double_data_);
  uint64_data_.MergeFrom(from.uint64_data_);
  external_data_.MergeFrom(from.external_data_);
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.raw_data().size() > 0) {

    raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
  }
  if (from.doc_string().size() > 0) {

    doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
  }
  if (from.has_segment()) {
    mutable_segment()->::onnx::TensorProto_Segment::MergeFrom(from.segment());
  }
  if (from.data_type() != 0) {
    set_data_type(from.data_type());
  }
  if (from.data_location() != 0) {
    set_data_location(from.data_location());
  }
}

void TensorProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TensorProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TensorProto::CopyFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TensorProto::Swap(TensorProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TensorProto::InternalSwap(TensorProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  dims_.InternalSwap(&other->dims_);
  float_data_.InternalSwap(&other->float_data_);
  int32_data_.InternalSwap(&other->int32_data_);
  string_data_.InternalSwap(CastToBase(&other->string_data_));
  int64_data_.InternalSwap(&other->int64_data_);
  double_data_.InternalSwap(&other->double_data_);
  uint64_data_.InternalSwap(&other->uint64_data_);
  CastToBase(&external_data_)->InternalSwap(CastToBase(&other->external_data_));
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  raw_data_.Swap(&other->raw_data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  doc_string_.Swap(&other->doc_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(segment_, other->segment_);
  swap(data_type_, other->data_type_);
  swap(data_location_, other->data_location_);
}

::google::protobuf::Metadata TensorProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TensorShapeProto_Dimension::InitAsDefaultInstance() {
  ::onnx::_TensorShapeProto_Dimension_default_instance_.dim_value_ = PROTOBUF_LONGLONG(0);
  ::onnx::_TensorShapeProto_Dimension_default_instance_.dim_param_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
class TensorShapeProto_Dimension::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorShapeProto_Dimension::kDimValueFieldNumber;
const int TensorShapeProto_Dimension::kDimParamFieldNumber;
const int TensorShapeProto_Dimension::kDenotationFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TensorShapeProto_Dimension::TensorShapeProto_Dimension()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TensorShapeProto.Dimension)
}
TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.denotation().size() > 0) {
    denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
  }
  clear_has_value();
  switch (from.value_case()) {
    case kDimValue: {
      set_dim_value(from.dim_value());
      break;
    }
    case kDimParam: {
      set_dim_param(from.dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:onnx.TensorShapeProto.Dimension)
}

void TensorShapeProto_Dimension::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_TensorShapeProto_Dimension_onnx_2eproto3.base);
  denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_value();
}

TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
  // @@protoc_insertion_point(destructor:onnx.TensorShapeProto.Dimension)
  SharedDtor();
}

void TensorShapeProto_Dimension::SharedDtor() {
  denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_value()) {
    clear_value();
  }
}

void TensorShapeProto_Dimension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TensorShapeProto_Dimension& TensorShapeProto_Dimension::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TensorShapeProto_Dimension_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TensorShapeProto_Dimension::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:onnx.TensorShapeProto.Dimension)
  switch (value_case()) {
    case kDimValue: {
      // No need to clear
      break;
    }
    case kDimParam: {
      value_.dim_param_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = VALUE_NOT_SET;
}


void TensorShapeProto_Dimension::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TensorShapeProto.Dimension)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  denotation_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_value();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TensorShapeProto_Dimension::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TensorShapeProto_Dimension*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // int64 dim_value = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
        msg->set_dim_value(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // string dim_param = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.TensorShapeProto.Dimension.dim_param");
        object = msg->mutable_dim_param();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // string denotation = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.TensorShapeProto.Dimension.denotation");
        object = msg->mutable_denotation();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TensorShapeProto_Dimension::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TensorShapeProto.Dimension)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // int64 dim_value = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
          clear_value();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &value_.dim_value_)));
          set_has_dim_value();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string dim_param = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_dim_param()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->dim_param().data(), static_cast<int>(this->dim_param().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.TensorShapeProto.Dimension.dim_param"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string denotation = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_denotation()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->denotation().data(), static_cast<int>(this->denotation().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.TensorShapeProto.Dimension.denotation"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TensorShapeProto.Dimension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TensorShapeProto.Dimension)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TensorShapeProto_Dimension::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TensorShapeProto.Dimension)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 dim_value = 1;
  if (has_dim_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->dim_value(), output);
  }

  // string dim_param = 2;
  if (has_dim_param()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->dim_param().data(), static_cast<int>(this->dim_param().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorShapeProto.Dimension.dim_param");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->dim_param(), output);
  }

  // string denotation = 3;
  if (this->denotation().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->denotation().data(), static_cast<int>(this->denotation().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorShapeProto.Dimension.denotation");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->denotation(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TensorShapeProto.Dimension)
}

::google::protobuf::uint8* TensorShapeProto_Dimension::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorShapeProto.Dimension)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 dim_value = 1;
  if (has_dim_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->dim_value(), target);
  }

  // string dim_param = 2;
  if (has_dim_param()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->dim_param().data(), static_cast<int>(this->dim_param().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorShapeProto.Dimension.dim_param");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->dim_param(), target);
  }

  // string denotation = 3;
  if (this->denotation().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->denotation().data(), static_cast<int>(this->denotation().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TensorShapeProto.Dimension.denotation");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->denotation(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorShapeProto.Dimension)
  return target;
}

size_t TensorShapeProto_Dimension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TensorShapeProto.Dimension)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string denotation = 3;
  if (this->denotation().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->denotation());
  }

  switch (value_case()) {
    // int64 dim_value = 1;
    case kDimValue: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->dim_value());
      break;
    }
    // string dim_param = 2;
    case kDimParam: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorShapeProto_Dimension::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TensorShapeProto.Dimension)
  GOOGLE_DCHECK_NE(&from, this);
  const TensorShapeProto_Dimension* source =
      ::google::protobuf::DynamicCastToGenerated<TensorShapeProto_Dimension>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TensorShapeProto.Dimension)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TensorShapeProto.Dimension)
    MergeFrom(*source);
  }
}

void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorShapeProto.Dimension)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.denotation().size() > 0) {

    denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
  }
  switch (from.value_case()) {
    case kDimValue: {
      set_dim_value(from.dim_value());
      break;
    }
    case kDimParam: {
      set_dim_param(from.dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
}

void TensorShapeProto_Dimension::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TensorShapeProto.Dimension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorShapeProto.Dimension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TensorShapeProto_Dimension::Swap(TensorShapeProto_Dimension* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  denotation_.Swap(&other->denotation_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(value_, other->value_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::google::protobuf::Metadata TensorShapeProto_Dimension::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TensorShapeProto::InitAsDefaultInstance() {
}
class TensorShapeProto::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorShapeProto::kDimFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TensorShapeProto::TensorShapeProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TensorShapeProto)
}
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      dim_(from.dim_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:onnx.TensorShapeProto)
}

void TensorShapeProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_TensorShapeProto_onnx_2eproto3.base);
}

TensorShapeProto::~TensorShapeProto() {
  // @@protoc_insertion_point(destructor:onnx.TensorShapeProto)
  SharedDtor();
}

void TensorShapeProto::SharedDtor() {
}

void TensorShapeProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TensorShapeProto& TensorShapeProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TensorShapeProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TensorShapeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TensorShapeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  dim_.Clear();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TensorShapeProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TensorShapeProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // repeated .onnx.TensorShapeProto.Dimension dim = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::onnx::TensorShapeProto_Dimension::_InternalParse;
          object = msg->add_dim();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TensorShapeProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TensorShapeProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .onnx.TensorShapeProto.Dimension dim = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_dim()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TensorShapeProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TensorShapeProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TensorShapeProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TensorShapeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .onnx.TensorShapeProto.Dimension dim = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->dim(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TensorShapeProto)
}

::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorShapeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .onnx.TensorShapeProto.Dimension dim = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->dim(static_cast<int>(i)), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorShapeProto)
  return target;
}

size_t TensorShapeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TensorShapeProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .onnx.TensorShapeProto.Dimension dim = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->dim_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->dim(static_cast<int>(i)));
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TensorShapeProto)
  GOOGLE_DCHECK_NE(&from, this);
  const TensorShapeProto* source =
      ::google::protobuf::DynamicCastToGenerated<TensorShapeProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TensorShapeProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TensorShapeProto)
    MergeFrom(*source);
  }
}

void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorShapeProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  dim_.MergeFrom(from.dim_);
}

void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TensorShapeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorShapeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TensorShapeProto::Swap(TensorShapeProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&dim_)->InternalSwap(CastToBase(&other->dim_));
}

::google::protobuf::Metadata TensorShapeProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TypeProto_Tensor::InitAsDefaultInstance() {
  ::onnx::_TypeProto_Tensor_default_instance_._instance.get_mutable()->shape_ = const_cast< ::onnx::TensorShapeProto*>(
      ::onnx::TensorShapeProto::internal_default_instance());
}
class TypeProto_Tensor::HasBitSetters {
 public:
  static const ::onnx::TensorShapeProto& shape(const TypeProto_Tensor* msg);
};

const ::onnx::TensorShapeProto&
TypeProto_Tensor::HasBitSetters::shape(const TypeProto_Tensor* msg) {
  return *msg->shape_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TypeProto_Tensor::kElemTypeFieldNumber;
const int TypeProto_Tensor::kShapeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TypeProto_Tensor::TypeProto_Tensor()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TypeProto.Tensor)
}
TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_shape()) {
    shape_ = new ::onnx::TensorShapeProto(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  elem_type_ = from.elem_type_;
  // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.Tensor)
}

void TypeProto_Tensor::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_TypeProto_Tensor_onnx_2eproto3.base);
  ::memset(&shape_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&elem_type_) -
      reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
}

TypeProto_Tensor::~TypeProto_Tensor() {
  // @@protoc_insertion_point(destructor:onnx.TypeProto.Tensor)
  SharedDtor();
}

void TypeProto_Tensor::SharedDtor() {
  if (this != internal_default_instance()) delete shape_;
}

void TypeProto_Tensor::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TypeProto_Tensor& TypeProto_Tensor::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TypeProto_Tensor_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TypeProto_Tensor::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.Tensor)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) {
    delete shape_;
  }
  shape_ = nullptr;
  elem_type_ = 0;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TypeProto_Tensor::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TypeProto_Tensor*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // int32 elem_type = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
        msg->set_elem_type(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // .onnx.TensorShapeProto shape = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::TensorShapeProto::_InternalParse;
        object = msg->mutable_shape();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TypeProto_Tensor::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TypeProto.Tensor)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // int32 elem_type = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &elem_type_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .onnx.TensorShapeProto shape = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_shape()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TypeProto.Tensor)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TypeProto.Tensor)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TypeProto_Tensor::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TypeProto.Tensor)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 elem_type = 1;
  if (this->elem_type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->elem_type(), output);
  }

  // .onnx.TensorShapeProto shape = 2;
  if (this->has_shape()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, HasBitSetters::shape(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TypeProto.Tensor)
}

::google::protobuf::uint8* TypeProto_Tensor::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.Tensor)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 elem_type = 1;
  if (this->elem_type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->elem_type(), target);
  }

  // .onnx.TensorShapeProto shape = 2;
  if (this->has_shape()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, HasBitSetters::shape(this), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.Tensor)
  return target;
}

size_t TypeProto_Tensor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.Tensor)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .onnx.TensorShapeProto shape = 2;
  if (this->has_shape()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *shape_);
  }

  // int32 elem_type = 1;
  if (this->elem_type() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->elem_type());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_Tensor::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TypeProto.Tensor)
  GOOGLE_DCHECK_NE(&from, this);
  const TypeProto_Tensor* source =
      ::google::protobuf::DynamicCastToGenerated<TypeProto_Tensor>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TypeProto.Tensor)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TypeProto.Tensor)
    MergeFrom(*source);
  }
}

void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.Tensor)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_shape()) {
    mutable_shape()->::onnx::TensorShapeProto::MergeFrom(from.shape());
  }
  if (from.elem_type() != 0) {
    set_elem_type(from.elem_type());
  }
}

void TypeProto_Tensor::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TypeProto.Tensor)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.Tensor)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TypeProto_Tensor::Swap(TypeProto_Tensor* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(shape_, other->shape_);
  swap(elem_type_, other->elem_type_);
}

::google::protobuf::Metadata TypeProto_Tensor::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void TypeProto::InitAsDefaultInstance() {
  ::onnx::_TypeProto_default_instance_.tensor_type_ = const_cast< ::onnx::TypeProto_Tensor*>(
      ::onnx::TypeProto_Tensor::internal_default_instance());
}
class TypeProto::HasBitSetters {
 public:
  static const ::onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg);
};

const ::onnx::TypeProto_Tensor&
TypeProto::HasBitSetters::tensor_type(const TypeProto* msg) {
  return *msg->value_.tensor_type_;
}
void TypeProto::set_allocated_tensor_type(::onnx::TypeProto_Tensor* tensor_type) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_value();
  if (tensor_type) {
    ::google::protobuf::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      tensor_type = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, tensor_type, submessage_arena);
    }
    set_has_tensor_type();
    value_.tensor_type_ = tensor_type;
  }
  // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.tensor_type)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TypeProto::kTensorTypeFieldNumber;
const int TypeProto::kDenotationFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TypeProto::TypeProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.TypeProto)
}
TypeProto::TypeProto(const TypeProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.denotation().size() > 0) {
    denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
  }
  clear_has_value();
  switch (from.value_case()) {
    case kTensorType: {
      mutable_tensor_type()->::onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:onnx.TypeProto)
}

void TypeProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_TypeProto_onnx_2eproto3.base);
  denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_value();
}

TypeProto::~TypeProto() {
  // @@protoc_insertion_point(destructor:onnx.TypeProto)
  SharedDtor();
}

void TypeProto::SharedDtor() {
  denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_value()) {
    clear_value();
  }
}

void TypeProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TypeProto& TypeProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_TypeProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void TypeProto::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:onnx.TypeProto)
  switch (value_case()) {
    case kTensorType: {
      delete value_.tensor_type_;
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = VALUE_NOT_SET;
}


void TypeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.TypeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  denotation_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_value();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TypeProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<TypeProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // .onnx.TypeProto.Tensor tensor_type = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::onnx::TypeProto_Tensor::_InternalParse;
        object = msg->mutable_tensor_type();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // string denotation = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.TypeProto.denotation");
        object = msg->mutable_denotation();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TypeProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.TypeProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .onnx.TypeProto.Tensor tensor_type = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_tensor_type()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string denotation = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_denotation()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->denotation().data(), static_cast<int>(this->denotation().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.TypeProto.denotation"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.TypeProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.TypeProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TypeProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.TypeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .onnx.TypeProto.Tensor tensor_type = 1;
  if (has_tensor_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, HasBitSetters::tensor_type(this), output);
  }

  // string denotation = 6;
  if (this->denotation().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->denotation().data(), static_cast<int>(this->denotation().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TypeProto.denotation");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->denotation(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.TypeProto)
}

::google::protobuf::uint8* TypeProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .onnx.TypeProto.Tensor tensor_type = 1;
  if (has_tensor_type()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, HasBitSetters::tensor_type(this), target);
  }

  // string denotation = 6;
  if (this->denotation().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->denotation().data(), static_cast<int>(this->denotation().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.TypeProto.denotation");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->denotation(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto)
  return target;
}

size_t TypeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string denotation = 6;
  if (this->denotation().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->denotation());
  }

  switch (value_case()) {
    // .onnx.TypeProto.Tensor tensor_type = 1;
    case kTensorType: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *value_.tensor_type_);
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.TypeProto)
  GOOGLE_DCHECK_NE(&from, this);
  const TypeProto* source =
      ::google::protobuf::DynamicCastToGenerated<TypeProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.TypeProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.TypeProto)
    MergeFrom(*source);
  }
}

void TypeProto::MergeFrom(const TypeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.denotation().size() > 0) {

    denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
  }
  switch (from.value_case()) {
    case kTensorType: {
      mutable_tensor_type()->::onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
}

void TypeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.TypeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TypeProto::CopyFrom(const TypeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TypeProto::Swap(TypeProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TypeProto::InternalSwap(TypeProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  denotation_.Swap(&other->denotation_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(value_, other->value_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::google::protobuf::Metadata TypeProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


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

void OperatorSetIdProto::InitAsDefaultInstance() {
}
class OperatorSetIdProto::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int OperatorSetIdProto::kDomainFieldNumber;
const int OperatorSetIdProto::kVersionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

OperatorSetIdProto::OperatorSetIdProto()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:onnx.OperatorSetIdProto)
}
OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.domain().size() > 0) {
    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
  version_ = from.version_;
  // @@protoc_insertion_point(copy_constructor:onnx.OperatorSetIdProto)
}

void OperatorSetIdProto::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_OperatorSetIdProto_onnx_2eproto3.base);
  domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  version_ = PROTOBUF_LONGLONG(0);
}

OperatorSetIdProto::~OperatorSetIdProto() {
  // @@protoc_insertion_point(destructor:onnx.OperatorSetIdProto)
  SharedDtor();
}

void OperatorSetIdProto::SharedDtor() {
  domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void OperatorSetIdProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const OperatorSetIdProto& OperatorSetIdProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_OperatorSetIdProto_onnx_2eproto3.base);
  return *internal_default_instance();
}


void OperatorSetIdProto::Clear() {
// @@protoc_insertion_point(message_clear_start:onnx.OperatorSetIdProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  version_ = PROTOBUF_LONGLONG(0);
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* OperatorSetIdProto::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<OperatorSetIdProto*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // string domain = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("onnx.OperatorSetIdProto.domain");
        object = msg->mutable_domain();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // int64 version = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
        msg->set_version(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool OperatorSetIdProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:onnx.OperatorSetIdProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string domain = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_domain()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->domain().data(), static_cast<int>(this->domain().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "onnx.OperatorSetIdProto.domain"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int64 version = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &version_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:onnx.OperatorSetIdProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:onnx.OperatorSetIdProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void OperatorSetIdProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:onnx.OperatorSetIdProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string domain = 1;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.OperatorSetIdProto.domain");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->domain(), output);
  }

  // int64 version = 2;
  if (this->version() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:onnx.OperatorSetIdProto)
}

::google::protobuf::uint8* OperatorSetIdProto::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:onnx.OperatorSetIdProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string domain = 1;
  if (this->domain().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->domain().data(), static_cast<int>(this->domain().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "onnx.OperatorSetIdProto.domain");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->domain(), target);
  }

  // int64 version = 2;
  if (this->version() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:onnx.OperatorSetIdProto)
  return target;
}

size_t OperatorSetIdProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:onnx.OperatorSetIdProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string domain = 1;
  if (this->domain().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->domain());
  }

  // int64 version = 2;
  if (this->version() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->version());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void OperatorSetIdProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:onnx.OperatorSetIdProto)
  GOOGLE_DCHECK_NE(&from, this);
  const OperatorSetIdProto* source =
      ::google::protobuf::DynamicCastToGenerated<OperatorSetIdProto>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:onnx.OperatorSetIdProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:onnx.OperatorSetIdProto)
    MergeFrom(*source);
  }
}

void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:onnx.OperatorSetIdProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.domain().size() > 0) {

    domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
  }
  if (from.version() != 0) {
    set_version(from.version());
  }
}

void OperatorSetIdProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:onnx.OperatorSetIdProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:onnx.OperatorSetIdProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void OperatorSetIdProto::Swap(OperatorSetIdProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  domain_.Swap(&other->domain_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(version_, other->version_);
}

::google::protobuf::Metadata OperatorSetIdProto::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_onnx_2eproto3);
  return ::file_level_metadata_onnx_2eproto3[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace onnx
namespace google {
namespace protobuf {
template<> PROTOBUF_NOINLINE ::onnx::AttributeProto* Arena::CreateMaybeMessage< ::onnx::AttributeProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::AttributeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::ValueInfoProto* Arena::CreateMaybeMessage< ::onnx::ValueInfoProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::ValueInfoProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::NodeProto* Arena::CreateMaybeMessage< ::onnx::NodeProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::NodeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::ModelProto* Arena::CreateMaybeMessage< ::onnx::ModelProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::ModelProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::StringStringEntryProto* Arena::CreateMaybeMessage< ::onnx::StringStringEntryProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::StringStringEntryProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::GraphProto* Arena::CreateMaybeMessage< ::onnx::GraphProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::GraphProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TensorProto_Segment* Arena::CreateMaybeMessage< ::onnx::TensorProto_Segment >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TensorProto_Segment >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TensorProto* Arena::CreateMaybeMessage< ::onnx::TensorProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TensorProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TensorShapeProto_Dimension* Arena::CreateMaybeMessage< ::onnx::TensorShapeProto_Dimension >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TensorShapeProto_Dimension >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TensorShapeProto* Arena::CreateMaybeMessage< ::onnx::TensorShapeProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TensorShapeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TypeProto_Tensor* Arena::CreateMaybeMessage< ::onnx::TypeProto_Tensor >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TypeProto_Tensor >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::TypeProto* Arena::CreateMaybeMessage< ::onnx::TypeProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::TypeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::onnx::OperatorSetIdProto* Arena::CreateMaybeMessage< ::onnx::OperatorSetIdProto >(Arena* arena) {
  return Arena::CreateInternal< ::onnx::OperatorSetIdProto >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
