Skip to content

Commit

Permalink
Fix errors in TF YOLO example (NVIDIA#3379)
Browse files Browse the repository at this point in the history
Update from `experimental_prefetch_to_device`
to `experimental_fetch_to_device` for tf.distribute
InputOptions that was changed in more recent TF versions.
 
Remove fixed version from tensorflow-addons requirement -
the package is already installed in the DLFW container, so it
should be now no-op instead of installing old version from pip.

Signed-off-by: Krzysztof Lecki <[email protected]>
  • Loading branch information
klecki authored Sep 29, 2021
1 parent 9e45c07 commit 68d73a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/examples/use_cases/tensorflow/yolov4/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Cython
matplotlib
tensorflow-addons==0.11.2
tensorflow-addons
pycocotools
2 changes: 1 addition & 1 deletion docs/examples/use_cases/tensorflow/yolov4/src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def dataset_fn(input_context):

input_options = tf.distribute.InputOptions(
experimental_place_dataset_on_device = True,
experimental_prefetch_to_device = False,
experimental_fetch_to_device = False,
experimental_replication_mode = tf.distribute.InputReplicationMode.PER_REPLICA)

dataset = strategy.distribute_datasets_from_function(
Expand Down

0 comments on commit 68d73a3

Please sign in to comment.