Esempio n. 1
0
        public override FloatTensor Forward(FloatTensor input)
        {
            FloatTensor unbiased_output = input.MM(_weights);
            FloatTensor output          = unbiased_output.Add(_bias.Expand(unbiased_output.Shape).Contiguous());

            activation = output.Id;

            return(output);
        }
Esempio n. 2
0
        public override FloatTensor Forward(FloatTensor input)
        {
            FloatTensor output;

            if (_fast)
            {
                output = input.MMT(_weights);
            }
            else
            {
                output = input.MM(_weights);
            };

            if (_biased)
            {
                output = output.Add(_bias.Expand(output.Shape).Contiguous());
            }
            ;
            activation = output.Id;

            return(output);
        }