xsnippet logotype

xsnippet

#363478, Untitled [ Text only ]

by Guest
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
model_checkpoint = ModelCheckpoint(filepath='./multiflow_6_with_angle', save_best_only=True,
                                   monitor='val_loss')
early_stop = EarlyStopping(monitor='val_loss', patience=10)
plateu = ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=4)
tb = TensorBoard(log_dir='./logs', histogram_freq=0, batch_size=32, write_graph=True, write_grads=True, write_images=True, embeddings_freq=0, embeddings_layer_names=None, embeddings_metadata=None)

model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])

model.fit([bands_train, inc_angles_train], icebergs_train, validation_data=([bands_test, inc_angles_test],  icebergs_test), batch_size=32, epochs=80,
         callbacks=[model_checkpoint, early_stop, plateu, tb])