Skip to content

Commit 9ebc193

Browse files
author
Sigrid Keydana
authored
Merge pull request #663 from rstudio/feature/tf-keras-default-2
further Python classes needing new tf.keras default
2 parents c7ccfdd + 29499ed commit 9ebc193

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

inst/python/kerastools/callback.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import os
44

5-
if (os.getenv('KERAS_IMPLEMENTATION', 'keras') == 'tensorflow'):
6-
from tensorflow.python.keras.callbacks import Callback
7-
else:
5+
if (os.getenv('KERAS_IMPLEMENTATION', 'tensorflow') == 'keras'):
86
from keras.callbacks import Callback
7+
else:
8+
from tensorflow.python.keras.callbacks import Callback
99

1010
class RCallback(Callback):
1111

inst/python/kerastools/constraint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
import os
33

4-
if (os.getenv('KERAS_IMPLEMENTATION', 'keras') == 'tensorflow'):
5-
from tensorflow.python.keras.constraints import Constraint
6-
else:
4+
if (os.getenv('KERAS_IMPLEMENTATION', 'tensorflow') == 'keras'):
75
from keras.constraints import Constraint
6+
else:
7+
from tensorflow.python.keras.constraints import Constraint
88

99
class RConstraint(Constraint):
1010

inst/python/kerastools/progbar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
import os
88

9-
if (os.getenv('KERAS_IMPLEMENTATION', 'keras') == 'tensorflow'):
10-
from tensorflow.python.keras.utils import Progbar
11-
else:
9+
if (os.getenv('KERAS_IMPLEMENTATION', 'tensorflow') == 'keras'):
1210
from keras.utils import Progbar
11+
else:
12+
from tensorflow.python.keras.utils import Progbar
1313

1414
def apply_patch():
1515

0 commit comments

Comments
 (0)