code: def conv_net(x_dict, n_classes, reuse, is_training):
      # Define a scope for reusing the variables
      with tf.variable_scope("ConvNet", reuse=reuse):
          # TF Estimator input is a dict, in case of multiple inputs
          x = x_dict["images"]
  
          # MNIST data input is a 1-D vector of 784 features (28*28 pixels)
          # Reshape to match picture format [Height x Width x Channel]
          # Tensor input become 4-D: [Batch Size, Height, Width, Channel]
          x = tf.reshape(x, shape=[-1, 28, 28, 1])
  
          # Convolution Layer with 32 filters and a kernel size of 5
          conv1 = tf.layers.conv2d(
              x, FLAGS.conv1, 5, activation=tf.nn.relu
          )
          # Max Pooling (down-sampling) with strides of 2 and kernel size of 2
          conv1 = tf.layers.max_pooling2d(conv1, 2, 2)
  
          # Convolution Layer with 64 filters and a kernel size of 3
          conv2 = tf.layers.conv2d(
              conv1, FLAGS.conv2, 3, activation=tf.nn.relu
          )
          # Max Pooling (down-sampling) with strides of 2 and kernel size of 2
          conv2 = tf.layers.max_pooling2d(conv2, 2, 2)
  
          # Flatten the data to a 1-D vector for the fully connected layer
          fc1 = tf.contrib.layers.flatten(conv2)
  
          # Fully connected layer (in tf contrib folder for now)
          fc1 = tf.layers.dense(fc1, FLAGS.fc1)
          # Apply Dropout (if is_training is False, dropout is not applied)
          fc1 = tf.layers.dropout(
              fc1, rate=FLAGS.dropout, training=is_training
          )
  
          # Output layer, class prediction
          out = tf.layers.dense(fc1, n_classes)
  
      return out
  
file_path: auptimizer/Examples/hpo_mnist/mnist_hpo_fail.py
imports: from __future__ import division, print_function, absolute_import
  import argparse
  import os
  import sys
  from datetime import datetime
  from math import log
  import tensorflow
  from tensorflow.examples.tutorials.mnist import input_data
  from aup import BasicConfig, print_result
label_desc: Use image node_id 1 for calling a global function with example usage: conv_net(x_dict, n_classes, reuse, is_training) and returns: out