File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change
1
+ import logging
2
+ try :
3
+ import absl .logging
4
+ # https://github.com/abseil/abseil-py/issues/99
5
+ logging .root .removeHandler (absl .logging ._absl_handler )
6
+ # https://github.com/abseil/abseil-py/issues/102
7
+ absl .logging ._warn_preinit_stderr = False
8
+ except Exception :
9
+ pass
10
+
1
11
import warnings
2
12
# TODO(KGF): temporarily suppress numpy>=1.17.0 warning with TF<2.0.0
3
13
# ~6x tensorflow/python/framework/dtypes.py:529: FutureWarning ...
Original file line number Diff line number Diff line change 105
105
from keras .utils .generic_utils import Progbar
106
106
import keras .callbacks as cbks
107
107
108
+ g .flush_all_inorder ()
108
109
g .pprint_unique (conf )
109
110
g .flush_all_inorder ()
110
111
g .comm .Barrier ()
@@ -164,11 +165,9 @@ def __init__(self, lr):
164
165
self .eps = 1e-8
165
166
166
167
def get_deltas (self , raw_deltas ):
167
-
168
168
if self .iterations == 0 :
169
169
self .m_list = [np .zeros_like (grad ) for grad in raw_deltas ]
170
170
self .v_list = [np .zeros_like (grad ) for grad in raw_deltas ]
171
-
172
171
t = self .iterations + 1
173
172
lr_t = self .lr * np .sqrt (1 - self .beta_2 ** t )/ (1 - self .beta_1 ** t )
174
173
deltas = []
@@ -179,7 +178,6 @@ def get_deltas(self, raw_deltas):
179
178
deltas .append (delta_t )
180
179
self .m_list [i ] = m_t
181
180
self .v_list [i ] = v_t
182
-
183
181
self .iterations += 1
184
182
185
183
return deltas
You can’t perform that action at this time.
0 commit comments