|
34 | 34 | #include "ndBrainLayerActivationLeakyRelu.h"
|
35 | 35 | #include "ndBrainAgentDeterministicPolicyGradient_Trainer.h"
|
36 | 36 |
|
37 |
| -#define ND_SAC_POLICY_GRADIENT_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationRelu |
38 |
| -//#define ND_SAC_POLICY_GRADIENT_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationTanh |
39 |
| -//#define ND_SAC_POLICY_GRADIENT_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationLeakyRelu |
| 37 | +#define ND_SAC_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationRelu |
| 38 | +//#define ND_SAC_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationTanh |
| 39 | +//#define ND_SAC_HIDEN_LAYERS_ACTIVATION ndBrainLayerActivationLeakyRelu |
40 | 40 |
|
41 | 41 | #define ND_SAC_POLICY_FIX_SIGMA ndBrainFloat(0.2f)
|
42 | 42 | #define ND_SAC_POLICY_MIN_PER_ACTION_SIGMA ndBrainFloat(0.01f)
|
@@ -327,7 +327,7 @@ void ndBrainAgentDeterministicPolicyGradient_Trainer::BuildPolicyClass()
|
327 | 327 | {
|
328 | 328 | ndAssert(layers[layers.GetCount() - 1]->GetOutputSize() == m_parameters.m_hiddenLayersNumberOfNeurons);
|
329 | 329 | layers.PushBack(new ndBrainLayerLinear(layers[layers.GetCount() - 1]->GetOutputSize(), m_parameters.m_hiddenLayersNumberOfNeurons));
|
330 |
| - layers.PushBack(new ND_SAC_POLICY_GRADIENT_HIDEN_LAYERS_ACTIVATION(layers[layers.GetCount() - 1]->GetOutputSize())); |
| 330 | + layers.PushBack(new ND_SAC_HIDEN_LAYERS_ACTIVATION(layers[layers.GetCount() - 1]->GetOutputSize())); |
331 | 331 | }
|
332 | 332 | ndInt32 numberOfOutput = m_parameters.m_usePerActionSigmas ? 2 * m_parameters.m_numberOfActions : m_parameters.m_numberOfActions;
|
333 | 333 | layers.PushBack(new ndBrainLayerLinear(layers[layers.GetCount() - 1]->GetOutputSize(), numberOfOutput));
|
@@ -377,7 +377,7 @@ void ndBrainAgentDeterministicPolicyGradient_Trainer::BuildCriticClass()
|
377 | 377 | {
|
378 | 378 | ndAssert(layers[layers.GetCount() - 1]->GetOutputSize() == m_parameters.m_hiddenLayersNumberOfNeurons);
|
379 | 379 | layers.PushBack(new ndBrainLayerLinear(layers[layers.GetCount() - 1]->GetOutputSize(), m_parameters.m_hiddenLayersNumberOfNeurons));
|
380 |
| - layers.PushBack(new ND_SAC_POLICY_GRADIENT_HIDEN_LAYERS_ACTIVATION(layers[layers.GetCount() - 1]->GetOutputSize())); |
| 380 | + layers.PushBack(new ND_SAC_HIDEN_LAYERS_ACTIVATION(layers[layers.GetCount() - 1]->GetOutputSize())); |
381 | 381 | }
|
382 | 382 | layers.PushBack(new ndBrainLayerLinear(layers[layers.GetCount() - 1]->GetOutputSize(), m_parameters.m_hiddenLayersNumberOfNeurons));
|
383 | 383 | layers.PushBack(new ndBrainLayerActivationTanh(layers[layers.GetCount() - 1]->GetOutputSize()));
|
|
0 commit comments