Пример #1
0
 public void MergeFrom(Layer other)
 {
     if (other == null)
     {
         return;
     }
     if (other.LayerInputDim != 0)
     {
         LayerInputDim = other.LayerInputDim;
     }
     if (other.LayerOutputDim != 0)
     {
         LayerOutputDim = other.LayerOutputDim;
     }
     if (other.layerInputWeight_ != null)
     {
         if (layerInputWeight_ == null)
         {
             layerInputWeight_ = new global::Apollo.Prediction.Matrix();
         }
         LayerInputWeight.MergeFrom(other.LayerInputWeight);
     }
     if (other.layerBias_ != null)
     {
         if (layerBias_ == null)
         {
             layerBias_ = new global::Apollo.Prediction.Vector();
         }
         LayerBias.MergeFrom(other.LayerBias);
     }
     if (other.LayerActivationFunc != 0)
     {
         LayerActivationFunc = other.LayerActivationFunc;
     }
 }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    DimInput = input.ReadInt32();
                    break;
                }

                case 18: {
                    if (samplesMean_ == null)
                    {
                        samplesMean_ = new global::Apollo.Prediction.Vector();
                    }
                    input.ReadMessage(samplesMean_);
                    break;
                }

                case 26: {
                    if (samplesStd_ == null)
                    {
                        samplesStd_ = new global::Apollo.Prediction.Vector();
                    }
                    input.ReadMessage(samplesStd_);
                    break;
                }

                case 32: {
                    NumLayer = input.ReadInt32();
                    break;
                }

                case 42: {
                    layer_.AddEntriesFrom(input, _repeated_layer_codec);
                    break;
                }

                case 48: {
                    DimOutput = input.ReadInt32();
                    break;
                }
                }
            }
        }
Пример #3
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    LayerInputDim = input.ReadInt32();
                    break;
                }

                case 16: {
                    LayerOutputDim = input.ReadInt32();
                    break;
                }

                case 26: {
                    if (layerInputWeight_ == null)
                    {
                        layerInputWeight_ = new global::Apollo.Prediction.Matrix();
                    }
                    input.ReadMessage(layerInputWeight_);
                    break;
                }

                case 34: {
                    if (layerBias_ == null)
                    {
                        layerBias_ = new global::Apollo.Prediction.Vector();
                    }
                    input.ReadMessage(layerBias_);
                    break;
                }

                case 40: {
                    layerActivationFunc_ = (global::Apollo.Prediction.Layer.Types.ActivationFunc)input.ReadEnum();
                    break;
                }
                }
            }
        }
Пример #4
0
 public void MergeFrom(FnnVehicleModel other)
 {
     if (other == null)
     {
         return;
     }
     if (other.DimInput != 0)
     {
         DimInput = other.DimInput;
     }
     if (other.samplesMean_ != null)
     {
         if (samplesMean_ == null)
         {
             samplesMean_ = new global::Apollo.Prediction.Vector();
         }
         SamplesMean.MergeFrom(other.SamplesMean);
     }
     if (other.samplesStd_ != null)
     {
         if (samplesStd_ == null)
         {
             samplesStd_ = new global::Apollo.Prediction.Vector();
         }
         SamplesStd.MergeFrom(other.SamplesStd);
     }
     if (other.NumLayer != 0)
     {
         NumLayer = other.NumLayer;
     }
     layer_.Add(other.layer_);
     if (other.DimOutput != 0)
     {
         DimOutput = other.DimOutput;
     }
 }