<jupyter_start><jupyter_text><jupyter_code>import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers import *
#Hidden Conv. layers
model = Sequential()
# Conv2D(96,(55,55) , strides= 4, activation='relu', input_shape=(227,227,3))
model.add(Conv2D(96,(11,11), strides= 4, activation='relu', input_shape=(227,227,3), padding='same')) #
model.add(MaxPooling2D(pool_size=(11,11), strides= 2))
# MaxPooling2D(pool_size=(27,27),kernel_size=(11,11), strides= 2, activation='relu')
model.add(Conv2D(256,(5,5), strides= 1, activation='relu', padding='same'))           #5*5
model.add(MaxPooling2D(pool_size=(3,3), strides= 2))

model.add(Conv2D(384,(3,3), strides= 1, activation='relu'))
model.add(Conv2D(384,(3,3), strides= 1, activation='relu'))
model.add(Conv2D(256,(3,3), strides= 2, activation='relu'))

model.add(Dropout(0.5))
model.add(MaxPooling2D(pool_size=(3,3), strides= 2))

model.add(Flatten())
# outuput
model.add(Dense(9216,activation='relu'))
model.add(Dropout(0.5))#Fully connected layer and output layer
model.add(Dense(4096,activation='relu'))
model.add(Dense(4096,activation='relu'))
model.add(Dense(1000,activation='softmax'))

#compiling
model.compile(loss= 'categorical_crossentropy',optimizer='adam',metrics=['accuracy'])
model.summary()
# # 1st Convolutional Layer
# model.add(Conv2D(filters=96, input_shape=(224,224,3), kernel_size=(11,11), strides=(4,4), padding=’valid’))
# model.add(Activation(‘relu’))
# # # Max Pooling
# # model.add(MaxPooling2D(pool_size=(2,2), strides=(2,2), padding=’valid’))

# # # 2nd Convolutional Layer
# # model.add(Conv2D(filters=256, kernel_size=(11,11), strides=(1,1), padding=’valid’))
# # model.add(Activation(‘relu’))
# # # Max Pooling
# # model.add(MaxPooling2D(pool_size=(2,2), strides=(2,2), padding=’valid’))

# # # 3rd Convolutional Layer
# # model.add(Conv2D(filters=384, kernel_size=(3,3), strides=(1,1), padding=’valid’))
# # model.add(Activation(‘relu’))

# # 4th Convolutional Layer
# model.add(Conv2D(filters=384, kernel_size=(3,3), strides=(1,1), padding=’valid’))
# model.add(Activation(‘relu’))

# # 5th Convolutional Layer
# model.add(Conv2D(filters=256, kernel_size=(3,3), strides=(1,1), padding=’valid’))
# model.add(Activation(‘relu’))
# # Max Pooling
# model.add(MaxPooling2D(pool_size=(2,2), strides=(2,2), padding=’valid’))

# # Passing it to a Fully Connected layer
# model.add(Flatten())
# # 1st Fully Connected Layer
# model.add(Dense(4096, input_shape=(224*224*3,)))
# model.add(Activation(‘relu’))
# # Add Dropout to prevent overfitting
# model.add(Dropout(0.4))

# # 2nd Fully Connected Layer
# model.add(Dense(4096))
# model.add(Activation(‘relu’))
# # Add Dropout
# model.add(Dropout(0.4))

# # 3rd Fully Connected Layer
# model.add(Dense(1000))
# model.add(Activation(‘relu’))
# # Add Dropout
# model.add(Dropout(0.4))

# # Output Layer
# model.add(Dense(17))
# model.add(Activation(‘softmax’))

# model.summary()

# # Compile the model
# model.compile(loss=keras.losses.categorical_crossentropy, optimizer=’adam’, metrics=[“accuracy”])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20038910505836577, 'fraction_numerical': 0.06614785992217899, 'mean_word_length': 8.04692082111437, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '167116', 'license': 'Apache-2.0', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1206, 'n_words': 185, 'path': 'ALEXNET_final.ipynb', 'repo_name': 'Ankuraxz/AlexNet-Implementation-using-Keras', 'size': '3084'}