public virtual List <IWeightTensor> GetParams()
        {
            List <IWeightTensor> response = new List <IWeightTensor>
            {
                W0,
                b0
            };

            if (m_sharedQKV == false)
            {
                response.Add(Q);
                response.Add(Qb);

                response.Add(K);
                response.Add(Kb);

                response.Add(V);
                response.Add(Vb);
            }
            else
            {
                response.Add(QKV);
                response.Add(QKVb);
            }

            response.AddRange(layerNormQ.GetParams());

            return(response);
        }
        public virtual List <IWeightTensor> GetParams()
        {
            List <IWeightTensor> response = new List <IWeightTensor>();

            response.AddRange(layerNorm2.GetParams());
            response.AddRange(feedForwardLayer1.GetParams());
            response.AddRange(feedForwardLayer2.GetParams());

            return(response);
        }
Beispiel #3
0
        public virtual List <IWeightTensor> getParams()
        {
            List <IWeightTensor> response = new List <IWeightTensor>
            {
                m_Wxh,
                m_b
            };

            response.AddRange(m_layerNorm1.GetParams());
            response.AddRange(m_layerNorm2.GetParams());

            return(response);
        }
        public List <IWeightTensor> GetParams()
        {
            List <IWeightTensor> response = new List <IWeightTensor>();

            foreach (MultiHeadAttention item in m_encoders)
            {
                response.AddRange(item.GetParams());
            }

            foreach (var item in m_posFFNs)
            {
                response.AddRange(item.GetParams());
            }

            response.AddRange(layerNorm.GetParams());

            return(response);
        }