(self, file_name)
return np.array(labels)
file_name:the byte file's direction
file_name:the byte file's direction
file_name : the byte file s direction
def read_labels(self, file_name):
        """
           file_name:the byte file's direction
        """
        label_file=open(file_name,'rb')
        print(label_file)
        # get the basic information about the labels
        label_file.seek(0)
        magic_number = label_file.read(4)
        magic_number = struct.unpack('>i', magic_number)
        print('Magic Number: ' + str(magic_number[0]))

        data_type = label_file.read(4)
        data_type = struct.unpack('>i', data_type)
        print('Number of Lables: ' + str(data_type[0]))

        labels = []
        for idx in range(data_type[0]):
            label_file.seek(8 + idx)
            tmp_d = label_file.read(1)
            tmp_d = struct.unpack('>B', tmp_d)
            labels.append(tmp_d)
        return np.array(labels)
def read_labels ( self , file_name ) : label_file = open ( file_name , 'rb' ) print ( label_file ) # get the basic information about the labels label_file . seek ( 0 ) magic_number = label_file . read ( 4 ) magic_number = struct . unpack ( '>i' , magic_number ) print ( 'Magic Number: ' + str ( magic_number [ 0 ] ) ) data_type = label_file . read ( 4 ) data_type = struct . unpack ( '>i' , data_type ) print ( 'Number of Lables: ' + str ( data_type [ 0 ] ) ) labels = [ ] for idx in range ( data_type [ 0 ] ) : label_file . seek ( 8 + idx ) tmp_d = label_file . read ( 1 ) tmp_d = struct . unpack ( '>B' , tmp_d ) labels . append ( tmp_d ) return np . array ( labels )