Skip to content

Commit

Permalink
Remove unnecessary factoring
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanriach committed Aug 12, 2019
1 parent 063c133 commit f7d7ab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/test_patch_bias_add.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2019 The TensorFlow Authors. All Rights Reserved
#
#
# _new_biad_add_1_14() derived from source in
# https://github/tensorflow/tensorflow and therefore
# Copyright 2019 The TensorFlow Authors. All Rights Reserved
Expand Down
6 changes: 2 additions & 4 deletions tfdeterminism/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def _patch():
if tf_version.startswith('1.14'):
os.environ['TF_CUDNN_DETERMINISTIC'] = '1'
_patch_bias_add()
_eprint("TensorFlow version %s has been patched using tfdeterminism.patch" % tf_version)
print("TensorFlow version %s has been patched using tfdeterminism.patch" %
tf_version, file=sys.stderr)
else:
raise ValueError("No patch available for version %s of TensorFlow" %
tensorflow_version)
Expand Down Expand Up @@ -114,6 +115,3 @@ def _new_bias_add_1_14(value, bias, data_format=None, name=None):
value, array_ops.reshape(bias, broadcast_shape), name=name)
else: # data_format == 'NHWC' or data_format == None
return math_ops.add(value, bias, name=name)

def _eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)

0 comments on commit f7d7ab0

Please sign in to comment.