PrivaMed / model.py
NMMAITA's picture
Upload 17 files
906d507 verified
raw
history blame contribute delete
494 Bytes
import tensorflow as tf
def create_model(input_shape=8):
# neural network for binary classification
model = tf.keras.Sequential([
tf.keras.layers.Input(shape=(input_shape,)),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(32, activation='relu'),
tf.keras.layers.Dense(1, activation='sigmoid')
])
model.compile(
optimizer='adam',
loss='binary_crossentropy',
metrics=['accuracy']
)
return model