예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder)
            {
                hash ^= FasterRcnnBoxCoder.GetHashCode();
            }
            if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder)
            {
                hash ^= MeanStddevBoxCoder.GetHashCode();
            }
            if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder)
            {
                hash ^= SquareBoxCoder.GetHashCode();
            }
            if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder)
            {
                hash ^= KeypointBoxCoder.GetHashCode();
            }
            hash ^= (int)boxCoderOneofCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public void MergeFrom(BoxCoder other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.BoxCoderOneofCase)
            {
            case BoxCoderOneofOneofCase.FasterRcnnBoxCoder:
                if (FasterRcnnBoxCoder == null)
                {
                    FasterRcnnBoxCoder = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder();
                }
                FasterRcnnBoxCoder.MergeFrom(other.FasterRcnnBoxCoder);
                break;

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

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

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

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }