Build the core model within the graph.

def set_input_shape(self, input_shape):
    batch_size, rows, cols, input_channels = input_shape
    # assert self.mode == 'train' or self.mode == 'eval'
    """Build the core model within the graph."""
    input_shape = list(input_shape)
    input_shape[0] = 1
    dummy_batch = tf.zeros(input_shape)
    dummy_output = self.fprop(dummy_batch)
    output_shape = [int(e) for e in dummy_output.get_shape()]
    output_shape[0] = batch_size
    self.output_shape = tuple(output_shape)