File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -95,18 +95,14 @@ def get_compiled_model():
9595 adam = Adam (lr = args .lr )
9696 model .compile (optimizer = adam , loss = BinaryCrossentropy (), metrics = [keras .metrics .AUC (name = 'auc' )])
9797 return model
98-
99- ### Open a strategy scope.
100- with strategy .scope ():
101- # Everything that creates variables should be under the strategy scope.
102- # In general this is only model construction & `compile()`.
103- model = get_compiled_model ()
104-
105-
106-
10798
10899def run_model ():
109100 ### Set train steps and validation steps
101+ ### Open a strategy scope.
102+ with strategy .scope ():
103+ # Everything that creates variables should be under the strategy scope.
104+ # In general this is only model construction & `compile()`.
105+ model = get_compiled_model ()
110106 train_steps = len (train_generator .labels )/ batch_size
111107 val_steps = len (validation_generator .labels ) / batch_size
112108
You can’t perform that action at this time.
0 commit comments