Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
49b90e86
Commit
49b90e86
authored
Jul 19, 2019
by
Toby Boyd
Committed by
guptapriya
Jul 19, 2019
Browse files
improved v2 check.
parent
308c7934
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
official/utils/misc/keras_utils.py
official/utils/misc/keras_utils.py
+3
-4
No files found.
official/utils/misc/keras_utils.py
View file @
49b90e86
...
...
@@ -22,6 +22,7 @@ import time
import
tensorflow
as
tf
from
tensorflow.core.protobuf
import
rewriter_config_pb2
from
tensorflow.python
import
tf2
from
tensorflow.python.eager
import
profiler
...
...
@@ -202,9 +203,7 @@ def set_config_v2(enable_xla=False,
{
'layout_optimizer'
:
False
}
)
def
is_v2_0
():
"""Returns true if using tf 2.0."""
if
hasattr
(
tf
,
'contrib'
):
return
False
else
:
return
True
return
tf2
.
enabled
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment