"test/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "096396802de3b1b304c58eb331dc59c8d27fe5de"
Commit ab53cb74 authored by Goldie Gadde's avatar Goldie Gadde Committed by Toby Boyd
Browse files

Update the is_v2_0 function to work internally as well. (#6935)

parent 9bbf8015
...@@ -381,7 +381,10 @@ def get_synth_input_fn(height, width, num_channels, num_classes, ...@@ -381,7 +381,10 @@ def get_synth_input_fn(height, width, num_channels, num_classes,
def is_v2_0(): def is_v2_0():
"""Returns true if using tf 2.0.""" """Returns true if using tf 2.0."""
return tf.__version__.startswith('2') if hasattr(tf, 'contrib'):
return False
else:
return True
def data_delay_prefetch(): def data_delay_prefetch():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment