Last active
April 1, 2018 09:44
-
-
Save FirefoxMetzger/44e9e056e45c1a3cc8000ab8d6f2cebe to your computer and use it in GitHub Desktop.
Comparing two small networks using dense layers. According to Keras' documentation both should be identical
This file contains 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 keras.models import Sequential | |
from keras.layers import Dense, Flatten | |
model1 = Sequential() | |
model1.add(Dense(1, input_shape=(10,10))) | |
model2 = Sequential() | |
model2.add(Flatten(input_shape=(10,10))) | |
model2.add(Dense(1)) | |
# compare the two models | |
model1.summary() | |
model2.summary() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment