Skip to content

Commit 7494bff

Browse files
TensorFlow Hub Authorscopybara-github
authored andcommitted
internal change
PiperOrigin-RevId: 622868665
1 parent 27c19b0 commit 7494bff

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

examples/image_retraining/retrain.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def build_eval_session(module_spec, class_count):
900900

901901

902902
def save_graph_to_file(graph_file_name, module_spec, class_count):
903-
"""Saves an graph to file, creating a valid quantized one if necessary."""
903+
"""Saves a graph to file, creating a valid quantized one if necessary."""
904904
sess, _, _, _, _, _ = build_eval_session(module_spec, class_count)
905905
graph = sess.graph
906906

@@ -1109,9 +1109,6 @@ def main(_):
11091109
datetime.now(), i, train_accuracy * 100)
11101110
logging.info('%s: Step %d: Cross entropy = %f',
11111111
datetime.now(), i, cross_entropy_value)
1112-
# TODO: Make this use an eval graph, to avoid quantization
1113-
# moving averages being updated by the validation set, though in
1114-
# practice this makes a negligable difference.
11151112
validation_bottlenecks, validation_ground_truth, _ = (
11161113
get_random_cached_bottlenecks(
11171114
sess, image_lists, FLAGS.validation_batch_size, 'validation',

tensorflow_hub/keras_layer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ def get_config(self):
338338
if not isinstance(self._handle, str):
339339
# Need to raise this type in order for tf.saved_model.save() to fall back
340340
# to not using config, instead of crashing.
341-
# TODO(b/134528831): Reconsider the usability implications.
342341
raise NotImplementedError(
343342
"Can only generate a valid config for `hub.KerasLayer(handle, ...)`"
344343
"that uses a string `handle`.\n\n"

tensorflow_hub/keras_layer_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,6 @@ def testResaveWithMixedPrecision(self, save_from_keras):
602602
"only available in TF 2.4 or above")
603603
export_dir1 = os.path.join(self.get_temp_dir(), "mixed-precision")
604604
export_dir2 = os.path.join(self.get_temp_dir(), "mixed-precision2")
605-
# TODO(b/193472950): Currently, KerasLayer only works with mixed precision
606-
# when the model takes non-floating point inputs, which is why an embedding
607-
# model is used in this test.
608605
_save_2d_text_embedding(export_dir1, save_from_keras=save_from_keras)
609606
try:
610607
tf_keras_v2.mixed_precision.set_global_policy("mixed_float16")

tensorflow_hub/resolver.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,6 @@ def atomic_download(handle,
401401
tf.errors.UnimplementedError):
402402
raise
403403
# All other errors are retried.
404-
# TODO(b/144424849): Retrying an AlreadyExistsError from the atomic write
405-
# should be good enough, but see discussion about misc filesystem types.
406-
# TODO(b/144475403): How atomic is the overwrite=False check?
407404
except tf.errors.OpError:
408405
pass
409406

@@ -542,4 +539,3 @@ def _maybe_disable_cert_validation(self):
542539
self._context.check_hostname = False
543540
self._context.verify_mode = ssl.CERT_NONE
544541
logging.warning("Disabled certificate validation for resolving handles.")
545-

0 commit comments

Comments
 (0)