code: def create_model(x_train, y_train, x_test, y_test):
      model = Sequential()
      model.add(Dense(44, input_shape=(784,)))
      model.add(Activation({{choice(["relu", "sigmoid"])}}))
      model.add(Dense(44))
      model.add(Activation({{choice(["relu", "sigmoid"])}}))
      model.add(Dense(10))
  
      model.compile(loss="mae", metrics=["mse"], optimizer="adam")
  
      es = EarlyStopping(
          monitor="val_loss", min_delta=1e-5, patience=10
      )
      rlr = ReduceLROnPlateau(factor=0.1, patience=10)
      _ = model.fit(
          x_train,
          y_train,
          epochs=1,
          verbose=0,
          callbacks=[es, rlr],
          batch_size=24,
          validation_data=(x_test, y_test),
      )
  
      mae, mse = model.evaluate(x_test, y_test, verbose=0)
      print("MAE:", mae)
      return {"loss": mae, "status": STATUS_OK, "model": model}
  
file_path: hyperas/tests/test_lr_plateau.py
imports: from __future__ import print_function
  from hyperopt import Trials, STATUS_OK, tpe
  from hyperas import optim
  from hyperas.distributions import choice
  from keras.models import Sequential
  from keras.layers import Dense, Activation
  from keras.datasets import mnist
  from keras.utils import np_utils
  from keras.callbacks import ReduceLROnPlateau, EarlyStopping
label_desc: Use image node_id 2 for calling a global function with example usage: create_model(x_train, y_train, x_test, y_test) and returns: dict