OneHot.cpp 497 B

1234567891011121314151617181920
  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/OneHot.h>
  9. #include <Algorithms/Activations.h>
  10. namespace MachineLearning
  11. {
  12. AZ::VectorN OneHot::In(AZStd::size_t Value, AZStd::size_t MaxValue)
  13. {
  14. AZ::VectorN result;
  15. OneHotEncode(Value, MaxValue, result);
  16. return result;
  17. }
  18. }