o
    2h                     @   s   d Z ddlZdddZdS )z2Utilities common to CIFAR10 and CIFAR100 datasets.    Nlabelsc           	      C   s   t | d#}tj|dd}i }| D ]\}}|||d< q|}W d   n1 s+w   Y  |d }|| }||jd dd	d	}||fS )
zInternal utility for parsing CIFAR data.

    Args:
        fpath: path the file to parse.
        label_key: key for label data in the retrieve
            dictionary.

    Returns:
        A tuple `(data, labels)`.
    rbbytes)encodingutf8Ndatar          )opencPickleloaditemsdecodereshapeshape)	fpath	label_keyfd	d_decodedkvr   r    r   S/var/www/html/chatgem/venv/lib/python3.10/site-packages/keras/src/datasets/cifar.py
load_batch   s   r   )r   )__doc___pickler   r   r   r   r   r   <module>   s    