Skip to content

Commit

Permalink
Remove loss_fn name
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric_lai committed May 19, 2022
1 parent e1d0a8e commit 74eb09a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions tensorlayerx/model/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tensorlayerx/package_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 74eb09a

Please sign in to comment.