Exemple #1
0
 public void MergeFrom(GraphDef other)
 {
     if (other == null)
     {
         return;
     }
     node_.Add(other.node_);
     if (other.versions_ != null)
     {
         if (versions_ == null)
         {
             versions_ = new global::org.tensorflow.framework.VersionDef();
         }
         Versions.MergeFrom(other.Versions);
     }
     if (other.Version != 0)
     {
         Version = other.Version;
     }
     if (other.library_ != null)
     {
         if (library_ == null)
         {
             library_ = new global::org.tensorflow.framework.FunctionDefLibrary();
         }
         Library.MergeFrom(other.Library);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    node_.AddEntriesFrom(input, _repeated_node_codec);
                    break;
                }

                case 18: {
                    if (library_ == null)
                    {
                        library_ = new global::org.tensorflow.framework.FunctionDefLibrary();
                    }
                    input.ReadMessage(library_);
                    break;
                }

                case 24: {
                    Version = input.ReadInt32();
                    break;
                }

                case 34: {
                    if (versions_ == null)
                    {
                        versions_ = new global::org.tensorflow.framework.VersionDef();
                    }
                    input.ReadMessage(versions_);
                    break;
                }
                }
            }
        }