ComputeCost.cpp 548 B

123456789101112131415161718
  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/ComputeCost.h>
  9. #include <Models/MultilayerPerceptron.h>
  10. namespace MachineLearning
  11. {
  12. float ComputeCost::In(MachineLearning::INeuralNetworkPtr Model, AZ::VectorN Activations, AZ::VectorN ExpectedOutput)
  13. {
  14. return Model->ComputeCost(Activations, ExpectedOutput, CostFunctions::Quadratic);
  15. }
  16. }