Ejemplo n.º 1
0
 public void MergeFrom(pb::CodedInputStream input) {
   uint tag;
   while ((tag = input.ReadTag()) != 0) {
     switch(tag) {
       default:
         input.SkipLastField();
         break;
       case 8: {
         Size = input.ReadInt64();
         break;
       }
       case 16: {
         AliasInputPort = input.ReadInt64();
         break;
       }
       case 26: {
         if (shape_ == null) {
           shape_ = new global::Vision.Tensorflow.Proto.TensorShapeProto();
         }
         input.ReadMessage(shape_);
         break;
       }
       case 32: {
         dtype_ = (global::Vision.Tensorflow.Proto.DataType) input.ReadEnum();
         break;
       }
     }
   }
 }
Ejemplo n.º 2
0
 public void MergeFrom(TensorDescription other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Dtype != 0)
     {
         Dtype = other.Dtype;
     }
     if (other.shape_ != null)
     {
         if (shape_ == null)
         {
             shape_ = new global::Vision.Tensorflow.Proto.TensorShapeProto();
         }
         Shape.MergeFrom(other.Shape);
     }
     if (other.allocationDescription_ != null)
     {
         if (allocationDescription_ == null)
         {
             allocationDescription_ = new global::Vision.Tensorflow.Proto.AllocationDescription();
         }
         AllocationDescription.MergeFrom(other.AllocationDescription);
     }
 }
Ejemplo n.º 3
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

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

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

                case 32: {
                    Offset = input.ReadInt64();
                    break;
                }

                case 40: {
                    Size = input.ReadInt64();
                    break;
                }

                case 53: {
                    Crc32C = input.ReadFixed32();
                    break;
                }

                case 58: {
                    slices_.AddEntriesFrom(input, _repeated_slices_codec);
                    break;
                }
                }
            }
        }
Ejemplo n.º 4
0
 public void MergeFrom(TensorShapeTypeProto other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Dtype != 0)
     {
         Dtype = other.Dtype;
     }
     if (other.shape_ != null)
     {
         if (shape_ == null)
         {
             shape_ = new global::Vision.Tensorflow.Proto.TensorShapeProto();
         }
         Shape.MergeFrom(other.Shape);
     }
 }
Ejemplo n.º 5
0
 public void MergeFrom(OutputInfo other) {
   if (other == null) {
     return;
   }
   if (other.Size != 0L) {
     Size = other.Size;
   }
   if (other.AliasInputPort != 0L) {
     AliasInputPort = other.AliasInputPort;
   }
   if (other.shape_ != null) {
     if (shape_ == null) {
       shape_ = new global::Vision.Tensorflow.Proto.TensorShapeProto();
     }
     Shape.MergeFrom(other.Shape);
   }
   if (other.Dtype != 0) {
     Dtype = other.Dtype;
   }
 }
Ejemplo n.º 6
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::Vision.Tensorflow.Proto.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_);
 }
Ejemplo n.º 7
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

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

                case 34: {
                    if (allocationDescription_ == null)
                    {
                        allocationDescription_ = new global::Vision.Tensorflow.Proto.AllocationDescription();
                    }
                    input.ReadMessage(allocationDescription_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 8
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::Vision.Tensorflow.Proto.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_);
 }
Ejemplo n.º 9
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

                case 18: {
                    if (tensorShape_ == null)
                    {
                        tensorShape_ = new global::Vision.Tensorflow.Proto.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;
                }
                }
            }
        }
Ejemplo n.º 10
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 10: {
                    global::Vision.Tensorflow.Proto.AttrValue.Types.ListValue subBuilder = new global::Vision.Tensorflow.Proto.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::Vision.Tensorflow.Proto.TensorShapeProto subBuilder = new global::Vision.Tensorflow.Proto.TensorShapeProto();
                    if (valueCase_ == ValueOneofCase.Shape)
                    {
                        subBuilder.MergeFrom(Shape);
                    }
                    input.ReadMessage(subBuilder);
                    Shape = subBuilder;
                    break;
                }

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

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

                case 82: {
                    global::Vision.Tensorflow.Proto.NameAttrList subBuilder = new global::Vision.Tensorflow.Proto.NameAttrList();
                    if (valueCase_ == ValueOneofCase.Func)
                    {
                        subBuilder.MergeFrom(Func);
                    }
                    input.ReadMessage(subBuilder);
                    Func = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 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::Vision.Tensorflow.Proto.TensorShapeProto();
                }
                Shape.MergeFrom(other.Shape);
                break;

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

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

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

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