Do these two model definitions differ from each other or do they work the same way?
And if these are different, why?
def create_model(input):
x = Conv2D(256, 3)(input)
x = ReLU()(x)
x = Flatten()(x)
x = Dropout(0.4)(x)
x = Dense(2, activation='sigmoid')(x)
model = Model(input, x)
return model
def create_model(input):
model=Sequential([
Conv2D(256, 3, input_shape=input_shape, activation='relu' ),
Flatten(),
Dropout(0.4),
Dense(2, activation='sigmoid')
])
return model
CodePudding user response:
No, the model definitions are same. The only difference is the way you are defining i.e sequential and functional.