Created
November 6, 2022 13:40
-
-
Save rdisipio/d04469b96080f9307785d8c09ec9da05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model1 = tf.keras.Sequential([ | |
tf.keras.layers.Dense(128, activation='relu'), | |
tf.keras.layers.Dense(2, activation='softmax') # binary classification | |
]) | |
loss = tf.keras.losses.BinaryCrossentropy(from_logits=False) | |
metrics = [tf.keras.metrics.BinaryAccuracy()] | |
model1.compile(optimizer='adam', | |
loss=loss, | |
metrics=metrics) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment