fwks/model/meta.py
def _remove_mod1(self, data, batch_size):
        """
        Fix for problems when the data length mod batch_size = 1
        """
        length = data[0]
        if isinstance(length, list) or isinstance(length, tuple):
            length = length[0]
        length = length.shape[0]
        if length % batch_size == 1:
            if isinstance(data[0], list) or isinstance(data[0], tuple):
                return [x[:-1] for x in data[0]], [x[:-1] for x in data[1]]
            else:
                return data[0][:-1], data[1][:-1]
        else:
            return data

        Fix for problems when the data length mod batch_size = 1
        
Fix for problems when the data length mod batch_size = 1
Fix for problems when the data length mod batch_size = 1
def _remove_mod1(self, data, batch_size):
        length = data[0]
        if isinstance(length, list) or isinstance(length, tuple):
            length = length[0]
        length = length.shape[0]
        if length % batch_size == 1:
            if isinstance(data[0], list) or isinstance(data[0], tuple):
                return [x[:-1] for x in data[0]], [x[:-1] for x in data[1]]
            else:
                return data[0][:-1], data[1][:-1]
        else:
            return data
def _remove_mod1 ( self , data , batch_size ) : length = data [ 0 ] if isinstance ( length , list ) or isinstance ( length , tuple ) : length = length [ 0 ] length = length . shape [ 0 ] if length % batch_size == 1 : if isinstance ( data [ 0 ] , list ) or isinstance ( data [ 0 ] , tuple ) : return [ x [ : - 1 ] for x in data [ 0 ] ] , [ x [ : - 1 ] for x in data [ 1 ] ] else : return data [ 0 ] [ : - 1 ] , data [ 1 ] [ : - 1 ] else : return data
Fix for problems when the data length mod batch_size = 1
Fix for problems when the data length mod batch_size = 1
"""
        Fix for problems when the data length mod batch_size = 1
        """
self
data
batch_size