Skip to Main Content
Python Deep Learning Projects
book

Python Deep Learning Projects

by Matthew Lamons, Rahul Kumar, Abhishek Nagaraja
October 2018
Intermediate to advanced content levelIntermediate to advanced
472 pages
10h 57m
English
Packt Publishing
Content preview from Python Deep Learning Projects

Model definition

First, we will load the Python modules; in this case, the TensorFlow package and the hyperparameters that we defined previously:

import tensorflow as tfimport hy_param

Then, we define the placeholders that we will be using to input data into the model. tf.placeholder allows us to feed input data to the computational graph. We can define constraints with the shape of the placeholder to only accept a tensor of a certain shape. Note that it is common to provide None for the first dimension, which allows us to the size of the batch at runtime.

Master your craft: Batch size can often have a big impact on the performance of deep learning models. Explore different batch sizes in this project. What changes as a result? What's your ...
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

Hands-On Python Deep Learning for the Web

Hands-On Python Deep Learning for the Web

Anubhav Singh, Sayak Paul

Publisher Resources

ISBN: 9781788997096Supplemental Content