예제 #1
0
 public void MergeFrom(TensorProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Dtype != global::Tensorflow.DataType.DtInvalid)
     {
         Dtype = other.Dtype;
     }
     if (other.tensorShape_ != null)
     {
         if (tensorShape_ == null)
         {
             TensorShape = new global::Tensorflow.TensorShapeProto();
         }
         TensorShape.MergeFrom(other.TensorShape);
     }
     if (other.VersionNumber != 0)
     {
         VersionNumber = other.VersionNumber;
     }
     if (other.TensorContent.Length != 0)
     {
         TensorContent = other.TensorContent;
     }
     halfVal_.Add(other.halfVal_);
     floatVal_.Add(other.floatVal_);
     doubleVal_.Add(other.doubleVal_);
     intVal_.Add(other.intVal_);
     stringVal_.Add(other.stringVal_);
     scomplexVal_.Add(other.scomplexVal_);
     int64Val_.Add(other.int64Val_);
     boolVal_.Add(other.boolVal_);
     dcomplexVal_.Add(other.dcomplexVal_);
     resourceHandleVal_.Add(other.resourceHandleVal_);
     variantVal_.Add(other.variantVal_);
     uint32Val_.Add(other.uint32Val_);
     uint64Val_.Add(other.uint64Val_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #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 8: {
                    Dtype = (global::Tensorflow.DataType)input.ReadEnum();
                    break;
                }

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

                case 34: {
                    if (allocationDescription_ == null)
                    {
                        AllocationDescription = new global::Tensorflow.AllocationDescription();
                    }
                    input.ReadMessage(AllocationDescription);
                    break;
                }
                }
            }
        }
예제 #3
0
 public void MergeFrom(TensorProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Dtype != 0)
     {
         Dtype = other.Dtype;
     }
     if (other.tensorShape_ != null)
     {
         if (tensorShape_ == null)
         {
             tensorShape_ = new global::Tensorflow.TensorShapeProto();
         }
         TensorShape.MergeFrom(other.TensorShape);
     }
     if (other.VersionNumber != 0)
     {
         VersionNumber = other.VersionNumber;
     }
     if (other.TensorContent.Length != 0)
     {
         TensorContent = other.TensorContent;
     }
     halfVal_.Add(other.halfVal_);
     floatVal_.Add(other.floatVal_);
     doubleVal_.Add(other.doubleVal_);
     intVal_.Add(other.intVal_);
     stringVal_.Add(other.stringVal_);
     scomplexVal_.Add(other.scomplexVal_);
     int64Val_.Add(other.int64Val_);
     boolVal_.Add(other.boolVal_);
     dcomplexVal_.Add(other.dcomplexVal_);
     resourceHandleVal_.Add(other.resourceHandleVal_);
 }
예제 #4
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: {
                            if (shape_ == null)
                            {
                                Shape = new global::Tensorflow.TensorShapeProto();
                            }
                            input.ReadMessage(Shape);
                            break;
                        }

                        case 16: {
                            Dtype = (global::Tensorflow.DataType)input.ReadEnum();
                            break;
                        }

                        case 34: {
                            if (type_ == null)
                            {
                                Type = new global::Tensorflow.FullTypeDef();
                            }
                            input.ReadMessage(Type);
                            break;
                        }
                        }
                    }
                }
예제 #5
0
 public void MergeFrom(BundleEntryProto 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.ShardId != 0)
     {
         ShardId = other.ShardId;
     }
     if (other.Offset != 0L)
     {
         Offset = other.Offset;
     }
     if (other.Size != 0L)
     {
         Size = other.Size;
     }
     if (other.Crc32C != 0)
     {
         Crc32C = other.Crc32C;
     }
     slices_.Add(other.slices_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #6
0
        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 34: {
                    if (allocationDescription_ == null)
                    {
                        allocationDescription_ = new global::Tensorflow.AllocationDescription();
                    }
                    input.ReadMessage(allocationDescription_);
                    break;
                }
                }
            }
        }
예제 #7
0
 public void MergeFrom(CppShapeInferenceResult other)
 {
     if (other == null)
     {
         return;
     }
     if (other.shape_ != null)
     {
         if (shape_ == null)
         {
             Shape = new global::Tensorflow.TensorShapeProto();
         }
         Shape.MergeFrom(other.Shape);
     }
     if (other.handleData_ != null)
     {
         if (handleData_ == null)
         {
             HandleData = new global::Tensorflow.CppShapeInferenceResult.Types.HandleData();
         }
         HandleData.MergeFrom(other.HandleData);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 public void MergeFrom(HandleShapeAndType other)
 {
     if (other == null)
     {
         return;
     }
     if (other.shape_ != null)
     {
         if (shape_ == null)
         {
             Shape = new global::Tensorflow.TensorShapeProto();
         }
         Shape.MergeFrom(other.Shape);
     }
     if (other.Dtype != global::Tensorflow.DataType.DtInvalid)
     {
         Dtype = other.Dtype;
     }
     if (other.SpecializedType != global::Tensorflow.SpecializedType.StInvalid)
     {
         SpecializedType = other.SpecializedType;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #9
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 8: {
                    dtype_ = (global::Tensorflow.DataType)input.ReadEnum();
                    break;
                }

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

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

                case 34: {
                    TensorContent = input.ReadBytes();
                    break;
                }

                case 42:
                case 45: {
                    floatVal_.AddEntriesFrom(input, _repeated_floatVal_codec);
                    break;
                }

                case 50:
                case 49: {
                    doubleVal_.AddEntriesFrom(input, _repeated_doubleVal_codec);
                    break;
                }

                case 58:
                case 56: {
                    intVal_.AddEntriesFrom(input, _repeated_intVal_codec);
                    break;
                }

                case 66: {
                    stringVal_.AddEntriesFrom(input, _repeated_stringVal_codec);
                    break;
                }

                case 74:
                case 77: {
                    scomplexVal_.AddEntriesFrom(input, _repeated_scomplexVal_codec);
                    break;
                }

                case 82:
                case 80: {
                    int64Val_.AddEntriesFrom(input, _repeated_int64Val_codec);
                    break;
                }

                case 90:
                case 88: {
                    boolVal_.AddEntriesFrom(input, _repeated_boolVal_codec);
                    break;
                }

                case 98:
                case 97: {
                    dcomplexVal_.AddEntriesFrom(input, _repeated_dcomplexVal_codec);
                    break;
                }

                case 106:
                case 104: {
                    halfVal_.AddEntriesFrom(input, _repeated_halfVal_codec);
                    break;
                }

                case 114: {
                    resourceHandleVal_.AddEntriesFrom(input, _repeated_resourceHandleVal_codec);
                    break;
                }

                case 122: {
                    variantVal_.AddEntriesFrom(input, _repeated_variantVal_codec);
                    break;
                }

                case 130:
                case 128: {
                    uint32Val_.AddEntriesFrom(input, _repeated_uint32Val_codec);
                    break;
                }

                case 138:
                case 136: {
                    uint64Val_.AddEntriesFrom(input, _repeated_uint64Val_codec);
                    break;
                }
                }
            }
        }
예제 #10
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;
                }
                }
            }
        }
예제 #11
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);
        }