tf中graph定义


原生定义:
tensorflow::tensorflow/core/framework/graph.proto
message GraphDef {
  repeated NodeDef node = 1;
  VersionDef versions = 4;
  int32 version = 3 [deprecated = true];
  FunctionDefLibrary library = 2;
};
编译处理后类GraphDef 定义
class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphDef) */ {
 public:
  GraphDef();注意此构造函数
  virtual ~GraphDef();
  GraphDef(const GraphDef& from);
  inline GraphDef& operator=(const GraphDef& from) {
    CopyFrom(from);
    return *this;
  }
  inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const GraphDef& default_instance();
  static inline const GraphDef* internal_default_instance() {
    return reinterpret_cast<const GraphDef*>(
               &_GraphDef_default_instance_);
  }
  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
    0;
  void UnsafeArenaSwap(GraphDef* other);
  void Swap(GraphDef* other);
 
  // implements Message ----------------------------------------------
  inline GraphDef* New() const PROTOBUF_FINAL { return New(NULL); }
  GraphDef* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
  void CopyFrom(const GraphDef& from);
  void MergeFrom(const GraphDef& from);
  void Clear() PROTOBUF_FINAL;
  bool IsInitialized() const PROTOBUF_FINAL;
 
 
  size_t ByteSizeLong() const PROTOBUF_FINAL;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
 
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const PROTOBUF_FINAL;
  void InternalSwap(GraphDef* other);
  protected:
  explicit GraphDef(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:
  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
  // nested types ----------------------------------------------------
  // accessors -------------------------------------------------------
  // repeated .tensorflow.NodeDef node = 1;
  int node_size() const;
  void clear_node();
  static const int kNodeFieldNumber = 1;
  const ::tensorflow::NodeDef& node(int index) const;
  ::tensorflow::NodeDef* mutable_node(int index);
  ::tensorflow::NodeDef* add_node();
  ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >*
      mutable_node();
  const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >&
      node() const;
  // .tensorflow.FunctionDefLibrary library = 2;
  bool has_library() const;
  void clear_library();
  static const int kLibraryFieldNumber = 2;
  private:
  void _slow_mutable_library();
  void _slow_set_allocated_library(
      ::google::protobuf::Arena* message_arena, ::tensorflow::FunctionDefLibrary** library);
  ::tensorflow::FunctionDefLibrary* _slow_release_library();
  public:
  const ::tensorflow::FunctionDefLibrary& library() const;
  ::tensorflow::FunctionDefLibrary* mutable_library();
  ::tensorflow::FunctionDefLibrary* release_library();
  void set_allocated_library(::tensorflow::FunctionDefLibrary* library);
  ::tensorflow::FunctionDefLibrary* unsafe_arena_release_library();
  void unsafe_arena_set_allocated_library(
      ::tensorflow::FunctionDefLibrary* library);
  // .tensorflow.VersionDef versions = 4;
  bool has_versions() const;
  void clear_versions();
  static const int kVersionsFieldNumber = 4;
  private:
  void _slow_mutable_versions();
  void _slow_set_allocated_versions(
      ::google::protobuf::Arena* message_arena, ::tensorflow::VersionDef** versions);
  ::tensorflow::VersionDef* _slow_release_versions();
  public:
  const ::tensorflow::VersionDef& versions() const;
  ::tensorflow::VersionDef* mutable_versions();
  ::tensorflow::VersionDef* release_versions();
  void set_allocated_versions(::tensorflow::VersionDef* versions);
  ::tensorflow::VersionDef* unsafe_arena_release_versions();
  void unsafe_arena_set_allocated_versions(
      ::tensorflow::VersionDef* versions);
  // int32 version = 3 [deprecated = true];
  GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_version();
  GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kVersionFieldNumber = 3;
  GOOGLE_PROTOBUF_DEPRECATED_ATTR ::google::protobuf::int32 version() const;
  GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_version(::google::protobuf::int32 value);
  // @@protoc_insertion_point(class_scope:tensorflow.GraphDef)
 private:
  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  friend class ::google::protobuf::Arena;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef > node_;
  ::tensorflow::FunctionDefLibrary* library_;
  ::tensorflow::VersionDef* versions_;
  ::google::protobuf::int32 version_;
  mutable int _cached_size_;
  friend struct protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto::TableStruct;
};
// ===================================================================
 
 

                
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值