Spaces:
Sleeping
Sleeping
Sean Carnahan
Incorporate external/BodybuildingPoseClassifier files directly, remove submodule
b39cc0b
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout | |
def build_model(): | |
model = Sequential([ | |
Conv2D(32, (3, 3), activation='relu', input_shape=(150, 150, 3)), | |
MaxPooling2D(2, 2), | |
Conv2D(64, (3, 3), activation='relu'), | |
MaxPooling2D(2, 2), | |
Conv2D(128, (3, 3), activation='relu'), | |
MaxPooling2D(2, 2), | |
Flatten(), | |
Dense(512, activation='relu'), | |
Dropout(0.5), | |
Dense(5, activation='softmax') | |
]) | |
model.compile(loss='categorical_crossentropy', | |
optimizer='adam', | |
metrics=['accuracy']) | |
return model | |