'Selects the subset of viewpoints to train on.'

def preprocess(self, raw_inputs, step_size):

    (quantity, num_views) = raw_inputs['images'].get_shape().as_list()[:2]
    inputs = dict()
    inputs['voxels'] = raw_inputs['voxels']
    for k in xrange(step_size):
        inputs[('images_%d' % (k + 1))] = []
        inputs[('matrix_%d' % (k + 1))] = []
    for n in xrange(quantity):
        selected_views = np.random.choice(num_views, step_size, replace=False)
        for k in xrange(step_size):
            view_selected = selected_views[k]
            inputs[('images_%d' % (k + 1))].append(raw_inputs['images'][n, view_selected, :, :, :])
            tf_matrix = self.get_transform_matrix(view_selected)
            inputs[('matrix_%d' % (k + 1))].append(tf_matrix)
    for k in xrange(step_size):
        inputs[('images_%d' % (k + 1))] = tf.stack(inputs[('images_%d' % (k + 1))])
        inputs[('matrix_%d' % (k + 1))] = tf.stack(inputs[('matrix_%d' % (k + 1))])
    return inputs
