There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "First, check your Python version with the python --version command."
A block of code is set as follows:
from keras import [what_to_use]
from keras.models import Sequential
from keras.layers import Dense
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
model = Sequential()
# N = number of neurons
# V = number of variable
model.add(Dense(N, input_dim=V, activation='relu'))
# S = number of neurons in the 2nd layer
model.add(Dense(S, activation='relu'))
model.add(Dense(1, activation='sigmoid')) # 1 output
Any command-line input or output is written as follows:
>>> import tensorflow as tf
>>> Message = tf.constant("Hello, world!")
>>> sess = tf.Session()
>>> print(sess.run(Message))
Bold: Indicates a new term, an important word, or words that you see onscreen.
Warnings or important notes appear like this.
Tips and tricks appear like this.