From 74eb09a871d96057d5505fd3395cac25d215d2fe Mon Sep 17 00:00:00 2001 From: Eric_lai Date: Thu, 19 May 2022 09:17:30 +0800 Subject: [PATCH] Remove loss_fn name --- setup.py | 2 +- tensorlayerx/model/core.py | 8 ++++---- tensorlayerx/package_info.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 27602d5..672f065 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ MAJOR = 0 MINOR = 5 -PATCH = 2 +PATCH = 3 PRE_RELEASE = '' # Use the following formatting: (major, minor, patch, prerelease) VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) diff --git a/tensorlayerx/model/core.py b/tensorlayerx/model/core.py index a7e44c5..e3c5268 100644 --- a/tensorlayerx/model/core.py +++ b/tensorlayerx/model/core.py @@ -307,7 +307,7 @@ def tf_train( val_loss, val_acc, n_iter = 0, 0, 0 for X_batch, y_batch in test_dataset: _logits = network(X_batch) # is_train=False, disable dropout - val_loss += loss_fn(_logits, y_batch, name='eval_loss') + val_loss += loss_fn(_logits, y_batch) if metrics: metrics.update(_logits, y_batch) val_acc += metrics.result() @@ -360,7 +360,7 @@ def ms_train( val_loss, val_acc, n_iter = 0, 0, 0 for X_batch, y_batch in test_dataset: _logits = network(X_batch) - val_loss += loss_fn(_logits, y_batch, name='eval_loss') + val_loss += loss_fn(_logits, y_batch) if metrics: metrics.update(_logits, y_batch) val_acc += metrics.result() @@ -414,7 +414,7 @@ def pd_train( val_loss, val_acc, n_iter = 0, 0, 0 for X_batch, y_batch in test_dataset: _logits = network(X_batch) # is_train=False, disable dropout - val_loss += loss_fn(_logits, y_batch, name='eval_loss') + val_loss += loss_fn(_logits, y_batch) if metrics: metrics.update(_logits, y_batch) val_acc += metrics.result() @@ -468,7 +468,7 @@ def th_train( val_loss, val_acc, n_iter = 0, 0, 0 for X_batch, y_batch in test_dataset: _logits = network(X_batch) # is_train=False, disable dropout - val_loss += loss_fn(_logits, y_batch, name='eval_loss') + val_loss += loss_fn(_logits, y_batch) if metrics: metrics.update(_logits, y_batch) val_acc += metrics.result() diff --git a/tensorlayerx/package_info.py b/tensorlayerx/package_info.py index 8e5fd7b..5b1be91 100644 --- a/tensorlayerx/package_info.py +++ b/tensorlayerx/package_info.py @@ -4,7 +4,7 @@ MAJOR = 0 MINOR = 5 -PATCH = 2 +PATCH = 3 PRE_RELEASE = '' # Use the following formatting: (major, minor, patch, prerelease) VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)