File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def define_flags():
101
101
flags .DEFINE_string ('model_name' , 'efficientdet-d0' , 'Model name.' )
102
102
flags .DEFINE_bool ('debug' , False , 'Enable debug mode' )
103
103
flags .DEFINE_integer (
104
- 'tf_random_seed' , 111111 ,
104
+ 'tf_random_seed' , None ,
105
105
'Fixed random seed for deterministic execution across runs for debugging.'
106
106
)
107
107
flags .DEFINE_bool ('profile' , False , 'Enable profile mode' )
@@ -163,10 +163,12 @@ def main(_):
163
163
for gpu in tf .config .list_physical_devices ('GPU' ):
164
164
tf .config .experimental .set_memory_growth (gpu , True )
165
165
166
+ if FLAGS .tf_random_seed :
167
+ tf .random .set_seed (FLAGS .tf_random_seed )
168
+
166
169
if FLAGS .debug :
167
170
tf .debugging .set_log_device_placement (True )
168
171
os .environ ['TF_DETERMINISTIC_OPS' ] = '1'
169
- tf .random .set_seed (FLAGS .tf_random_seed )
170
172
logging .set_verbosity (logging .DEBUG )
171
173
172
174
if FLAGS .strategy == 'tpu' :
You can’t perform that action at this time.
0 commit comments