Update tf2.py
I changed the comment symbol.('''->#) Because it's a line of comment.
This commit is contained in:
parent
3073d9b54a
commit
934959af19
|
@ -28,19 +28,19 @@ _force_enable = None
|
||||||
|
|
||||||
|
|
||||||
def enable():
|
def enable():
|
||||||
"""Enables v2 behaviors."""
|
#Enables v2 behaviors.
|
||||||
global _force_enable
|
global _force_enable
|
||||||
_force_enable = True
|
_force_enable = True
|
||||||
|
|
||||||
|
|
||||||
def disable():
|
def disable():
|
||||||
"""Disables v2 behaviors."""
|
#Disables v2 behaviors.
|
||||||
global _force_enable
|
global _force_enable
|
||||||
_force_enable = False
|
_force_enable = False
|
||||||
|
|
||||||
|
|
||||||
def enabled():
|
def enabled():
|
||||||
"""Returns True iff TensorFlow 2.0 behavior should be enabled."""
|
#Returns True iff TensorFlow 2.0 behavior should be enabled.
|
||||||
if _force_enable is None:
|
if _force_enable is None:
|
||||||
return os.getenv("TF2_BEHAVIOR", "0") != "0"
|
return os.getenv("TF2_BEHAVIOR", "0") != "0"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue