Skip to content

Commit

Permalink
use constant instead of string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
alionkun authored and rhdong committed Sep 30, 2022
1 parent 1e85aa8 commit 61eb5e4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def embedding_lookup(
' {},'.format(ids.dtype, shadow.ids.dtype))

with ops.name_scope(name, "shadow_embedding_lookup"):
if de.ModelMode.CURRENT_SETTING == 'train':
if de.ModelMode.CURRENT_SETTING == de.ModelMode.TRAIN:
with ops.control_dependencies([shadow._reset_ids(ids)]):
return shadow.read_value(do_prefetch=True)
else:
Expand Down

0 comments on commit 61eb5e4

Please sign in to comment.