Last active
September 3, 2019 11:16
-
-
Save PratyushTripathy/4d6ae0ce799b5f96e01ed4f178597cec 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
from tensorflow import keras | |
# Define the parameters of the model | |
model = keras.Sequential([ | |
keras.layers.Flatten(input_shape=(1, nBands)), | |
keras.layers.Dense(14, activation='relu'), | |
keras.layers.Dense(2, activation='softmax')]) | |
# Define the accuracy metrics and parameters | |
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"]) | |
# Run the model | |
model.fit(xTrain, yTrain, epochs=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment