Exemple #1
0
 public Params(int errorMeasureValue, int correctionBytesCount, DecoderType rsDecoderType, int orderNo)
 {
     ErrorMeasureValue    = errorMeasureValue;
     CorrectionBytesCount = correctionBytesCount;
     RsDecoderType        = rsDecoderType;
     OrderNo = orderNo;
 }
Exemple #2
0
 public Params(int errorMeasureValue, int correctionBytesCount, DecoderType rsDecoderType, ErrorProviderType rsErrorProviderType)
 {
     ErrorMeasureValue    = errorMeasureValue;
     CorrectionBytesCount = correctionBytesCount;
     RsDecoderType        = rsDecoderType;
     RsErrorProviderType  = rsErrorProviderType;
 }
 public Params(int errorMeasureValue, int correctionBytesCount, DecoderType rsDecoderType, int orderNo)
 {
     ErrorMeasureValue = errorMeasureValue;
     CorrectionBytesCount = correctionBytesCount;
     RsDecoderType = rsDecoderType;
     OrderNo = orderNo;
 }
 public Params(int errorMeasureValue, int correctionBytesCount, DecoderType rsDecoderType, ErrorProviderType rsErrorProviderType)
 {
     ErrorMeasureValue = errorMeasureValue;
     CorrectionBytesCount = correctionBytesCount;
     RsDecoderType = rsDecoderType;
     RsErrorProviderType = rsErrorProviderType;
 }
        public FieldDecoderAttribute(DecoderType type, string regName)
        {
            TkDebug.AssertArgument((type != DecoderType.None && !string.IsNullOrEmpty(regName)) ||
                                   (type == DecoderType.None), "regName", "参数regName不能为空", null);

            Type    = type;
            RegName = regName;
        }
Exemple #6
0
 private bool isDecoderTypePresent(DecoderType dType)
 {
     foreach (Decoder decoder in _decoders)
     {
         if (decoder.getDecoderType() == dType)
         {
             return(true);
         }
     }
     return(false);
 }
        private void SetProperties(DecoderConfigItem item, DecoderType type)
        {
            Type       = type;
            RegName    = item.RegName;
            fAdditions = item.AdditionInfos;

            EasySearchConfigItem easySearch = item as EasySearchConfigItem;

            if (easySearch != null)
            {
                RefFields = easySearch.RefFields;
            }
        }
Exemple #8
0
        private void RemoveDecoderOfType(DecoderType dType)
        {
            List <Decoder> toRemove = new List <Decoder>();

            foreach (Decoder decoder in _decoders)
            {
                if (decoder.getDecoderType() == dType)
                {
                    toRemove.Add(decoder);
                }
            }
            foreach (Decoder decoder in toRemove)
            {
                _decoders.Remove(decoder);
            }
        }
        ///<summary>Инициализирует экземпляр класса DecoderData, считывая данные из потока.</summary>
        ///<param name="s">Поток, из которого будет производится чтение.</param>
        ///<param name="depth">Глубина сети.</param>
        public DecoderData(Stream s, DecoderType depth)
        {
            var br = new BinaryReader(s);

            if (depth == DecoderType.Conv5)
            {
                this.Conv5_1_Weights = LoadWeights(512, 512, 3, 3, br);
                this.Conv5_1_Biases  = LoadBiases(512, br);
                this.Conv4_4_Weights = LoadWeights(512, 512, 3, 3, br);
                this.Conv4_4_Biases  = LoadBiases(512, br);
                this.Conv4_3_Weights = LoadWeights(512, 512, 3, 3, br);
                this.Conv4_3_Biases  = LoadBiases(512, br);
                this.Conv4_2_Weights = LoadWeights(512, 512, 3, 3, br);
                this.Conv4_2_Biases  = LoadBiases(512, br);
            }
            if ((depth == DecoderType.Conv4) || (depth == DecoderType.Conv5))
            {
                this.Conv4_1_Weights = LoadWeights(256, 512, 3, 3, br);
                this.Conv4_1_Biases  = LoadBiases(256, br);
                this.Conv3_4_Weights = LoadWeights(256, 256, 3, 3, br);
                this.Conv3_4_Biases  = LoadBiases(256, br);
                this.Conv3_3_Weights = LoadWeights(256, 256, 3, 3, br);
                this.Conv3_3_Biases  = LoadBiases(256, br);
                this.Conv3_2_Weights = LoadWeights(256, 256, 3, 3, br);
                this.Conv3_2_Biases  = LoadBiases(256, br);
            }
            if ((depth == DecoderType.Conv3) || (depth == DecoderType.Conv4) || (depth == DecoderType.Conv5))
            {
                this.Conv3_1_Weights = LoadWeights(128, 256, 3, 3, br);
                this.Conv3_1_Biases  = LoadBiases(128, br);
                this.Conv2_2_Weights = LoadWeights(128, 128, 3, 3, br);
                this.Conv2_2_Biases  = LoadBiases(128, br);
            }
            if ((depth == DecoderType.Conv2) || (depth == DecoderType.Conv3) || (depth == DecoderType.Conv4) || (depth == DecoderType.Conv5))
            {
                this.Conv2_1_Weights = LoadWeights(64, 128, 3, 3, br);
                this.Conv2_1_Biases  = LoadBiases(64, br);
                this.Conv1_2_Weights = LoadWeights(64, 64, 3, 3, br);
                this.Conv1_2_Biases  = LoadBiases(64, br);
            }
            if ((depth == DecoderType.Conv1) || (depth == DecoderType.Conv2) || (depth == DecoderType.Conv3) || (depth == DecoderType.Conv4) || (depth == DecoderType.Conv5))
            {
                this.Conv1_1_Weights = LoadWeights(3, 64, 3, 3, br);
                this.Conv1_1_Biases  = LoadBiases(3, br);
            }
            br.Close();
        }
Exemple #10
0
 ///<summary>Инициализирует декодирующую нейросеть, считывая данные из потока.</summary>
 ///<param name="s">Поток, из которого будет произведено чтение параметров.</param>
 ///<param name="depth">Глубина сети.</param>
 public Decoder(Stream s, DecoderType depth)
 {
     this.Data  = new DecoderData(s, depth);
     this.Depth = depth;
 }
Exemple #11
0
 public Decoder(Guid id, DecoderType type, string name)
     : this(id, type)
 {
     this.name = name;
 }
Exemple #12
0
 public Decoder(Guid id, DecoderType type)
 {
     this.id = id;
     this.type = type;
 }
 internal SimpleFieldDecoder(DecoderConfigItem item, DecoderType type)
 {
     SetProperties(item, type);
 }