Alexnet Structure
Alexnet Structure
image_shape
=(227,227,3)
np.random.seed(1000)
#Instantiate an empty model
model = Sequential()
# It starts here.
# 1st Convolutional Layer
model.add(Conv2D(filters=96, input_shape=image_shape,
kernel_size=(11,11), strides=(4,4), padding='valid'))
model.add(Activation('relu'))
# First layer has 96 Filters, the input shape is 227 x 227 x 3
# Kernel Size is 11 x 11, Striding 4 x 4, ReLu is the activation
function.
# Max Pooling
model.add(MaxPooling2D(pool_size=(3,3), strides=(2,2),
padding='valid'))
# Add Dropout
model.add(Dropout(0.4))
# Output Layer
model.add(Dense(1000))
model.add(Activation('softmax'))
model.summary()