예제 #1
0
        public void UpdateWeights(Action <Unit> updateAction)
        {
            Action <Unit[][]>   tensor2UpdateAction = Unit.GetTensor2UpdateAction(updateAction);
            Action <Unit[][][]> tensor3UpdateAction = Unit.GetTensor3UpdateAction(updateAction);

            tensor2UpdateAction(_hiddenToOutputLayerWeights);
            tensor3UpdateAction(_hiddenToHeadsWeights);
        }
예제 #2
0
        public void UpdateWeights(Action <Unit> updateAction)
        {
            Action <Unit[]>     vectorUpdateAction  = Unit.GetVectorUpdateAction(updateAction);
            Action <Unit[][]>   tensor2UpdateAction = Unit.GetTensor2UpdateAction(updateAction);
            Action <Unit[][][]> tensor3UpdateAction = Unit.GetTensor3UpdateAction(updateAction);

            tensor3UpdateAction(_readDataToHiddenLayerWeights);
            tensor2UpdateAction(_inputToHiddenLayerWeights);
            vectorUpdateAction(_hiddenLayerThresholds);
        }