Exemple #1
0
        public void MergeFrom(DetectionModel other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.ModelCase)
            {
            case ModelOneofCase.FasterRcnn:
                if (FasterRcnn == null)
                {
                    FasterRcnn = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn();
                }
                FasterRcnn.MergeFrom(other.FasterRcnn);
                break;

            case ModelOneofCase.Ssd:
                if (Ssd == null)
                {
                    Ssd = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd();
                }
                Ssd.MergeFrom(other.Ssd);
                break;
            }

            _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: {
                    global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn();
                    if (modelCase_ == ModelOneofCase.FasterRcnn)
                    {
                        subBuilder.MergeFrom(FasterRcnn);
                    }
                    input.ReadMessage(subBuilder);
                    FasterRcnn = subBuilder;
                    break;
                }

                case 18: {
                    global::Tensorflow.Models.ObjectDetection.Protos.Ssd subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd();
                    if (modelCase_ == ModelOneofCase.Ssd)
                    {
                        subBuilder.MergeFrom(Ssd);
                    }
                    input.ReadMessage(subBuilder);
                    Ssd = subBuilder;
                    break;
                }
                }
            }
        }