def METHOD_NAME(self, x, is_training=False):
    x = tf.reshape(x, [-1, 28, 28, 1])
    x = self.conv1(x)
    x = self.maxpool1(x)
    x = self.conv2(x)
    x = self.maxpool2(x)
    x = self.flatten(x)
    x = self.fc1(x)
    x = self.dropout(x)
    x = self.out(x)
    if not is_training:
        # tf cross entropy expect logits without softmax, so only
        # apply softmax when not training.
        x = tf.nn.softmax(x)
    return x