Skip to content

Instantly share code, notes, and snippets.

@re4388
Created January 24, 2020 06:39
Show Gist options
  • Select an option

  • Save re4388/04e9d648824e540ee686531da8ab661a to your computer and use it in GitHub Desktop.

Select an option

Save re4388/04e9d648824e540ee686531da8ab661a to your computer and use it in GitHub Desktop.
a16
with tf.Session() as session:
K.set_session(session)
session.run(tf.global_variables_initializer())
session.run(tf.tables_initializer())
history = model.fit(train_text, train_label,
validation_data=(test_text, test_label),
epochs=10,
batch_size=32)
model.save_weights('./model.h5')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment