''

def define_graph(self):

    with self.graph.as_default():
        with tf.name_scope('inputs'):
            self.tf_train_samples = tf.placeholder(tf.float32, shape=(self.batch_size, image_size, image_size, num_channels), name='tf_train_samples')
            self.tf_train_labels = tf.placeholder(tf.float32, shape=(self.batch_size, num_labels), name='tf_train_labels')
            self.tf_test_samples = tf.placeholder(tf.float32, shape=(self.test_batch_size, image_size, image_size, num_channels), name='tf_test_samples')
        with tf.name_scope('fc1'):
            fc1_weights = tf.Variable(tf.truncated_normal([(image_size * image_size), self.num_hidden], stddev=0.1), name='fc1_weights')
            fc1_biases = tf.Variable(tf.constant(0.1, shape=[self.num_hidden]), name='fc1_biases')
            tf.histogram_summary('fc1_weights', fc1_weights)
            tf.histogram_summary('fc1_biases', fc1_biases)
        with tf.name_scope('fc2'):
            fc2_weights = tf.Variable(tf.truncated_normal([self.num_hidden, num_labels], stddev=0.1), name='fc2_weights')
            fc2_biases = tf.Variable(tf.constant(0.1, shape=[num_labels]), name='fc2_biases')
            tf.histogram_summary('fc2_weights', fc2_weights)
            tf.histogram_summary('fc2_biases', fc2_biases)
        def model(data):
            shape = data.get_shape().as_list()
            reshape = tf.reshape(data, [shape[0], ((shape[1] * shape[2]) * shape[3])])
            with tf.name_scope('fc1_model'):
                fc1_model = (tf.matmul(reshape, fc1_weights) + fc1_biases)
                hidden = tf.nn.relu(fc1_model)
            with tf.name_scope('fc2_model'):
                return (tf.matmul(hidden, fc2_weights) + fc2_biases)
        logits = model(self.tf_train_samples)
        with tf.name_scope('loss'):
            self.loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, self.tf_train_labels))
            tf.scalar_summary('Loss', self.loss)
        with tf.name_scope('optimizer'):
            self.optimizer = tf.train.GradientDescentOptimizer(0.0001).minimize(self.loss)
        with tf.name_scope('predictions'):
            self.train_prediction = tf.nn.softmax(logits, name='train_prediction')
            self.test_prediction = tf.nn.softmax(model(self.tf_test_samples), name='test_prediction')
        self.merged = tf.merge_all_summaries()
