Skip to content

Commit

Permalink
Fix None gradient test
Browse files Browse the repository at this point in the history
  • Loading branch information
MattConley committed Apr 16, 2019
1 parent e73a77d commit 4896cc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tensorflow/python/training/experimental/loss_scale_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ def test_random_mix_good_and_bad_gradients(self, strategy_fn):
self._test_helper(inputs, expected_outputs, init_loss_scale)

@test_util.run_in_graph_and_eager_modes
def test_update_with_none_gradients(self, strategy_fn):
with strategy_fn().scope():
loss_scaler = loss_scale_module.DynamicLossScale()
loss_scaler.update([None])
def test_update_with_none_gradients(self):
loss_scaler = loss_scale_module.DynamicLossScale()
loss_scaler.update([None])

@test_util.run_in_graph_and_eager_modes
def test_get(self):
Expand Down

0 comments on commit 4896cc2

Please sign in to comment.