o
    ={cq                     @   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decodeZreshapeshape)	ZfpathZ	label_keyfdZ	d_decodedkvr   r    r   4lib/python3.10/site-packages/keras/datasets/cifar.py
load_batch   s   r   )r   )__doc___pickler   r   r   r   r   r   <module>   s   