Exemplo n.º 1
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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    if (tensor_ == null)
                    {
                        tensor_ = new global::Tensorflow.TensorProto();
                    }
                    input.ReadMessage(tensor_);
                    break;
                }
                }
            }
        }
 public void MergeFrom(FixedLenFeatureProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Dtype != 0)
     {
         Dtype = other.Dtype;
     }
     if (other.shape_ != null)
     {
         if (shape_ == null)
         {
             shape_ = new global::Tensorflow.TensorShapeProto();
         }
         Shape.MergeFrom(other.Shape);
     }
     if (other.defaultValue_ != null)
     {
         if (defaultValue_ == null)
         {
             defaultValue_ = new global::Tensorflow.TensorProto();
         }
         DefaultValue.MergeFrom(other.DefaultValue);
     }
     if (other.ValuesOutputTensorName.Length != 0)
     {
         ValuesOutputTensorName = other.ValuesOutputTensorName;
     }
 }
Exemplo n.º 3
0
 public void MergeFrom(NamedTensorProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.tensor_ != null)
     {
         if (tensor_ == null)
         {
             tensor_ = new global::Tensorflow.TensorProto();
         }
         Tensor.MergeFrom(other.Tensor);
     }
 }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    dtype_ = (global::Tensorflow.DataType)input.ReadEnum();
                    break;
                }

                case 18: {
                    if (shape_ == null)
                    {
                        shape_ = new global::Tensorflow.TensorShapeProto();
                    }
                    input.ReadMessage(shape_);
                    break;
                }

                case 26: {
                    if (defaultValue_ == null)
                    {
                        defaultValue_ = new global::Tensorflow.TensorProto();
                    }
                    input.ReadMessage(defaultValue_);
                    break;
                }

                case 34: {
                    ValuesOutputTensorName = input.ReadString();
                    break;
                }
                }
            }
        }
Exemplo n.º 5
0
 public void MergeFrom(NamedTensorProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.tensor_ != null)
     {
         if (tensor_ == null)
         {
             tensor_ = new global::Tensorflow.TensorProto();
         }
         Tensor.MergeFrom(other.Tensor);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo n.º 6
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.AttrValue.Types.ListValue subBuilder = new global::Tensorflow.AttrValue.Types.ListValue();
                    if (valueCase_ == ValueOneofCase.List)
                    {
                        subBuilder.MergeFrom(List);
                    }
                    input.ReadMessage(subBuilder);
                    List = subBuilder;
                    break;
                }

                case 18: {
                    S = input.ReadBytes();
                    break;
                }

                case 24: {
                    I = input.ReadInt64();
                    break;
                }

                case 37: {
                    F = input.ReadFloat();
                    break;
                }

                case 40: {
                    B = input.ReadBool();
                    break;
                }

                case 48: {
                    value_     = input.ReadEnum();
                    valueCase_ = ValueOneofCase.Type;
                    break;
                }

                case 58: {
                    global::Tensorflow.TensorShapeProto subBuilder = new global::Tensorflow.TensorShapeProto();
                    if (valueCase_ == ValueOneofCase.Shape)
                    {
                        subBuilder.MergeFrom(Shape);
                    }
                    input.ReadMessage(subBuilder);
                    Shape = subBuilder;
                    break;
                }

                case 66: {
                    global::Tensorflow.TensorProto subBuilder = new global::Tensorflow.TensorProto();
                    if (valueCase_ == ValueOneofCase.Tensor)
                    {
                        subBuilder.MergeFrom(Tensor);
                    }
                    input.ReadMessage(subBuilder);
                    Tensor = subBuilder;
                    break;
                }

                case 74: {
                    Placeholder = input.ReadString();
                    break;
                }

                case 82: {
                    global::Tensorflow.NameAttrList subBuilder = new global::Tensorflow.NameAttrList();
                    if (valueCase_ == ValueOneofCase.Func)
                    {
                        subBuilder.MergeFrom(Func);
                    }
                    input.ReadMessage(subBuilder);
                    Func = subBuilder;
                    break;
                }
                }
            }
        }
Exemplo n.º 7
0
        public void MergeFrom(AttrValue other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.ValueCase)
            {
            case ValueOneofCase.S:
                S = other.S;
                break;

            case ValueOneofCase.I:
                I = other.I;
                break;

            case ValueOneofCase.F:
                F = other.F;
                break;

            case ValueOneofCase.B:
                B = other.B;
                break;

            case ValueOneofCase.Type:
                Type = other.Type;
                break;

            case ValueOneofCase.Shape:
                if (Shape == null)
                {
                    Shape = new global::Tensorflow.TensorShapeProto();
                }
                Shape.MergeFrom(other.Shape);
                break;

            case ValueOneofCase.Tensor:
                if (Tensor == null)
                {
                    Tensor = new global::Tensorflow.TensorProto();
                }
                Tensor.MergeFrom(other.Tensor);
                break;

            case ValueOneofCase.List:
                if (List == null)
                {
                    List = new global::Tensorflow.AttrValue.Types.ListValue();
                }
                List.MergeFrom(other.List);
                break;

            case ValueOneofCase.Func:
                if (Func == null)
                {
                    Func = new global::Tensorflow.NameAttrList();
                }
                Func.MergeFrom(other.Func);
                break;

            case ValueOneofCase.Placeholder:
                Placeholder = other.Placeholder;
                break;
            }

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