import tensorflow as tf

        patches = tf.image.extract_patches(tf.expand_dims(x,0),sizes=window,strides=window,rates=[1, 1, 1, 1],padding='VALID')
        patches = tf.reshape(patches,[n_patch,patch_size,patch_size,n_channel])
        patches = tf.random.shuffle(patches)
        rows = tf.split(patches,n_col//patch_size,axis=0)
