import tensorflow as tf

        else:
          raise ValueError('Number of scales must stay constant or decrease, got {}'.format(FLAGS.pm))
        out = tf.nn.max_pool3d(bottom, ksize=[1,kernel_size,1,1,1], strides=[1,1,1,1,1], padding='VALID')
        shape = out.get_shape()
        print('scale{}'.format(l + 1))
        print('\t{} --> {}'.format(bottom.name, out.name))
        print('\t{} --> {}'.format(bottom.get_shape(), out.get_shape()))

  with tf.variable_scope('fully_connected'):
    bottom = out
    bottom_shape = bottom.get_shape().as_list()
    reshape = tf.reshape(
        bottom,
        [-1, bottom_shape[1] * bottom_shape[2] * bottom_shape[3] * bottom_shape[4]])

    W_fc1 = weight_variable([bottom_shape[1] * bottom_shape[2] * bottom_shape[3] * bottom_shape[4], NUM_CLASSES()])
