12345678910111213141516171819202122232425 |
- /*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
- #include <Nodes/CreateModel.h>
- #include <Models/MultilayerPerceptron.h>
- namespace MachineLearning
- {
- INeuralNetworkPtr CreateModel::In(AZStd::size_t Inputneurons, AZStd::size_t Outputneurons, MachineLearning::HiddenLayerParams Hiddenlayers)
- {
- INeuralNetworkPtr result = AZStd::make_unique<MultilayerPerceptron>(Inputneurons);
- MultilayerPerceptron* modelPtr = static_cast<MultilayerPerceptron*>(result.get());
- for (AZStd::size_t layerSize : Hiddenlayers)
- {
- modelPtr->AddLayer(layerSize);
- }
- modelPtr->AddLayer(Outputneurons);
- return result;
- }
- }
|