Exemplo n.º 1
0
        public void MergeFrom(InferenceResult other)
        {
            if (other == null)
            {
                return;
            }
            if (other.modelSpec_ != null)
            {
                if (modelSpec_ == null)
                {
                    ModelSpec = new global::Tensorflow.Serving.ModelSpec();
                }
                ModelSpec.MergeFrom(other.ModelSpec);
            }
            switch (other.ResultCase)
            {
            case ResultOneofCase.ClassificationResult:
                if (ClassificationResult == null)
                {
                    ClassificationResult = new global::Tensorflow.Serving.ClassificationResult();
                }
                ClassificationResult.MergeFrom(other.ClassificationResult);
                break;

            case ResultOneofCase.RegressionResult:
                if (RegressionResult == null)
                {
                    RegressionResult = new global::Tensorflow.Serving.RegressionResult();
                }
                RegressionResult.MergeFrom(other.RegressionResult);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (modelSpec_ != null)
            {
                hash ^= ModelSpec.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.ClassificationResult)
            {
                hash ^= ClassificationResult.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.RegressionResult)
            {
                hash ^= RegressionResult.GetHashCode();
            }
            hash ^= (int)resultCase_;
            return(hash);
        }