Skip to content

Commit

Permalink
added sleep to avoud python bug referred from: keras-team/keras#2110
Browse files Browse the repository at this point in the history
  • Loading branch information
bhandras committed Jan 25, 2017
1 parent 43950af commit b21b375
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions box_fish.py
Expand Up @@ -27,7 +27,7 @@
max_boxes = 4
batch_size = 64
nb_epoch = 100
early_stopping_patience = 4
early_stopping_patience = 10

def process_box_json(data, boxes):
for item in data:
Expand Down Expand Up @@ -155,12 +155,12 @@ def save_model(model, index, cross=''):
model = create_model()

callbacks = [
EarlyStopping(monitor='val_loss', patience=early_stopping_patience, verbose=1),
CSVLogger('bbox_regression_' + time_str + '.csv', separator=',',
append=False),
ModelCheckpoint('weights.{epoch:02d}-{loss:.2f}.hdf5',
save_best_only=True,
monitor='val_loss', verbose=1),
EarlyStopping(monitor='val_loss', patience=early_stopping_patience, verbose=1),
]

kf = KFold(n_splits=2)
Expand All @@ -172,3 +172,5 @@ def save_model(model, index, cross=''):
validation_data=(X_train[test_idx], y_train[test_idx]),
callbacks=callbacks,
verbose=1)
print('Exiting.. (https://github.com/fchollet/keras/issues/2110)')
time.sleep(0.5)

0 comments on commit b21b375

Please sign in to comment.