code: def model(X_train, X_test, Y_train, Y_test):
      model = Sequential()
      model.add(Dense(512, input_shape=(784,)))
      model.add(Activation("relu"))
      model.add(Dropout({{uniform(0, 1)}}))
      model.add(Dense({{choice([400, 512, 600])}}))
      model.add(Activation("relu"))
      model.add(Dropout({{uniform(0, 1)}}))
      model.add(Dense(10))
      model.add(Activation("softmax"))
  
      rms = RMSprop()
      model.compile(
          loss="categorical_crossentropy",
          optimizer=rms,
          metrics=["accuracy"],
      )
  
      nb_epoch = 10
      batch_size = 128
  
      model.fit(
          X_train,
          Y_train,
          batch_size=batch_size,
          nb_epoch=nb_epoch,
          verbose=2,
          validation_data=(X_test, Y_test),
      )
  
      score, acc = model.evaluate(X_test, Y_test, verbose=0)
  
      return {"loss": -acc, "status": STATUS_OK, "model": model}
  
file_path: hyperas/examples/mnist_ensemble.py
imports: from __future__ import print_function
  from hyperopt import Trials, STATUS_OK, rand
  from hyperas import optim
  from hyperas.distributions import choice, uniform
  from sklearn.metrics import accuracy_score
  from keras.utils import np_utils
  from keras.datasets import mnist
  from keras.models import Sequential
  from keras.layers.core import Dense, Dropout, Activation
  from keras.optimizers import RMSprop
label_desc: Use image node_id 2 for calling a global function with example usage: model(X_train, X_test, Y_train, Y_test) and returns: dict