import tensorflow as tf


    def mix_scramble(self,x):
        # assume square patch
        # sizes = tf.convert_to_tensor([1,2,4,8])
        # idx = tf.random.categorical([tf.ones_like(sizes)], 1)
        # print(idx)
        # patch_size = int(sizes[idx[0][0]])
        patch_size = self.get_random_patch_size()
        print('Patch size:',patch_size)
        window = [1,patch_size,patch_size,1]
        print('Window:',window)

        n_row,n_col,n_channel = x.shape
        n_patch = n_row*n_col // (patch_size**2)
        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)
        rows = [tf.concat(tf.unstack(x),axis=1) for x in rows]
        x_aug = tf.concat(rows,axis=0)

        x_aug = tf.convert_to_tensor(x_aug)

        return tf.concat([x, x_aug],axis=2)

    def gaussian_blur(self,x):
        #create random gaussian blur filter
        mean = 0
