Commit 247b1b17 authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Adapt new loss names

parent cfe4aa87
...@@ -1003,7 +1003,7 @@ class DqnAgent(Agent): ...@@ -1003,7 +1003,7 @@ class DqnAgent(Agent):
action_dim, action_dim,
ctx=None, ctx=None,
discount_factor=.9, discount_factor=.9,
loss_function='euclidean', loss_function='l2',
optimizer='rmsprop', optimizer='rmsprop',
optimizer_params={'learning_rate': 0.09}, optimizer_params={'learning_rate': 0.09},
training_episodes=50, training_episodes=50,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
'use_fix_target': False, 'use_fix_target': False,
</#if> </#if>
<#if (config.configuration.loss)??> <#if (config.configuration.loss)??>
'loss': '${config.lossName}', 'loss_function': '${config.lossName}',
<#if (config.lossParams)??> <#if (config.lossParams)??>
'loss_params': { 'loss_params': {
<#list config.lossParams?keys as param> <#list config.lossParams?keys as param>
......
...@@ -11,8 +11,8 @@ import cnnarch_logger ...@@ -11,8 +11,8 @@ import cnnarch_logger
LOSS_FUNCTIONS = { LOSS_FUNCTIONS = {
'l1': gluon.loss.L1Loss(), 'l1': gluon.loss.L1Loss(),
'euclidean': gluon.loss.L2Loss(), 'l2': gluon.loss.L2Loss(),
'huber_loss': gluon.loss.HuberLoss(), 'huber': gluon.loss.HuberLoss(),
'softmax_cross_entropy': gluon.loss.SoftmaxCrossEntropyLoss(), 'softmax_cross_entropy': gluon.loss.SoftmaxCrossEntropyLoss(),
'sigmoid_cross_entropy': gluon.loss.SigmoidBinaryCrossEntropyLoss()} 'sigmoid_cross_entropy': gluon.loss.SigmoidBinaryCrossEntropyLoss()}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment