Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variables #1813

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions twml/twml/contrib/build_graphs_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def build_graph(features, label, mode, params, config=None):
# If mode is train, we just need to assign a dummy loss
# and update the train op. This is done to save the graph to save_dir.
if mode == 'train':
loss = tf.constant(1)
train_op = tf.assign_add(tf.train.get_global_step(), 1)
return {'train_op': train_op, 'loss': loss}
return {
'train_op': tf.assign_add(tf.train.get_global_step(), 1),
'loss': tf.constant(1)
}
return output
return build_graph
return build_graph