Skip to content

Instantly share code, notes, and snippets.

@Steboss89
Created June 14, 2021 21:55
Show Gist options
  • Save Steboss89/6747aeb4edae1b0517694557605f80c0 to your computer and use it in GitHub Desktop.
Save Steboss89/6747aeb4edae1b0517694557605f80c0 to your computer and use it in GitHub Desktop.
Create the search space
def create_space():
r""" Function to create the search space"""
nodes = [8, 16, 32, 64, 128, 256, 512]
activations = ['relu', 'softmax', 'softplus', 'tanh', 'selu', 'sigmoid']
# build models
known_models = [tf.keras.layers.LSTM,
tf.keras.layer.GRU,
tf.keras.layer.Bidirectional]
for i in range(len(nodes)):
for j in range(len(activations)):
for k in range(len(known_models)):
# record the nodes, activations and models
# in a list
# create a vocabolary to be passed to the training function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment