AccumulateTrainingGradients.cpp 602 B

12345678910111213141516171819
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Nodes/AccumulateTrainingGradients.h>
  9. #include <Models/MultilayerPerceptron.h>
  10. namespace MachineLearning
  11. {
  12. INeuralNetworkPtr AccumulateTrainingGradients::In(INeuralNetworkPtr Model, LossFunctions LossFunction, AZ::VectorN Activations, AZ::VectorN ExpectedOutput)
  13. {
  14. Model->Reverse(LossFunction, Activations, ExpectedOutput);
  15. return Model;
  16. }
  17. }