File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,15 @@ def get_compiled_model():
9696 model .compile (optimizer = adam , loss = BinaryCrossentropy (), metrics = [keras .metrics .AUC (name = 'auc' )])
9797 return model
9898
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-
10699
107100
108101def run_model ():
102+
103+ ### Open a strategy scope.
104+ with strategy .scope ():
105+ # Everything that creates variables should be under the strategy scope.
106+ # In general this is only model construction & `compile()`.
107+ model = get_compiled_model ()
109108 ### Set train steps and validation steps
110109 train_steps = len (train_generator .labels )/ batch_size
111110 val_steps = len (validation_generator .labels ) / batch_size
You can’t perform that action at this time.
0 commit comments