Skip to content

Instantly share code, notes, and snippets.


vortexkd/ Secret

Last active May 30, 2019
What would you like to do?
import tensorflow as tf
model = build_model() #ここに学習させたいモデルをロードするか、作成する
# 大量のデータで学習しているからこそチェックポイントなどをつけましょう。
ckpt = tf.keras.callbacks.ModelCheckpoint('models/ckpt.hdf5', monitor='val_loss',
verbose=0, save_best_only=True,
save_weights_only=False, mode='auto', period=3)
lr = tf.keras.callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=5,
verbose=1, mode='auto', min_delta=0.0001,
cooldown=3, min_lr=0)
generate_input_data(class_map, path),
steps_per_epoch=train_size // batch_size,
validation_steps= test_size // batch_size,
callbacks=[ckpt, lr]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.