You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a good way to make # of layers a parameter?
I noticed if i do something like the following
def build_fn(input_shape):
model = Sequential([
Dense(Integer(50, 150), input_shape=input_shape, activation='relu'),
Dropout(Real(0.2, 0.7)),
])
for x in range(Integer(0, 10)):
model.add(Dense(Integer(50, 150), activation='relu'))
model.add(Dropout(Real(0.2, 0.7)))
model.add(Dense(1, activation=Categorical(['sigmoid', 'softmax'])))
model.compile(
optimizer='adam',
loss='binary_crossentropy', metrics=['accuracy']
)
return model
Results in an error TypeError: 'Integer' object cannot be interpreted as an integer
However i think this a more fundamental question as to how multiple layers are handled. The experiment will have a different number of parameters based on how much layers are chosen.
The text was updated successfully, but these errors were encountered:
Is there a good way to make # of layers a parameter?
I noticed if i do something like the following
Results in an error
TypeError: 'Integer' object cannot be interpreted as an integer
However i think this a more fundamental question as to how multiple layers are handled. The experiment will have a different number of parameters based on how much layers are chosen.
The text was updated successfully, but these errors were encountered: