Skip to content

Commit 5571a1c

Browse files
authored
Update meniscus_train.py
1 parent 76b4898 commit 5571a1c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

meniscus/meniscus_train.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff 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

108101
def 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

0 commit comments

Comments
 (0)