Skip to Content
Deep Learning Quick Reference
book

Deep Learning Quick Reference

by Mike Bernico
March 2018
Intermediate to advanced
272 pages
7h 53m
English
Packt Publishing
Content preview from Deep Learning Quick Reference

Training the network

Now that my sentiment analysis network is built, it's time to train:

data = load_data(20000)data = pad_sequences(data)model = build_network(vocab_size=data["vocab_size"],                      embedding_dim=100,                      sequence_length=data["sequence_length"])callbacks = create_callbacks("sentiment")model.fit(x=data["X_train"], y=data["y_train"],          batch_size=32,          epochs=10,          validation_data=(data["X_test"], data["y_test"]),          callbacks=callbacks)

Keeping all of my training parameters and data in a single dictionary like this is just really a question of style and less about function. You may prefer to handle everything separately. I like using a dictionary for everything because it keeps me from passing big lists of parameters back and forth.

Since we're ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Keras Deep Learning Cookbook

Keras Deep Learning Cookbook

Rajdeep Dua, Sujit Pal, Manpreet Singh Ghotra
Deep Learning with Keras

Deep Learning with Keras

Antonio Gulli, Sujit Pal

Publisher Resources

ISBN: 9781788837996Supplemental Content