December 2018
Intermediate to advanced
764 pages
18h 18m
English
Let us revisit the same LeNet architecture with the same dataset to build and train the CNN model in Keras:
import kerasfrom keras.models import Sequentialfrom keras.layers import Conv2D,MaxPooling2D, Dense, Flatten, Reshapefrom keras.optimizers import SGD
n_filters=[32,64]
learning_rate = 0.01n_epochs = 10batch_size = 100
model = Sequential()model.add(Reshape(target_shape=(n_width,n_height,n_depth), input_shape=(n_inputs,)) )
Read now
Unlock full access