B
    dq                 @   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 }x"| D ]\}}|||d< q(W |}W dQ R X |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   F/var/www/html/venv/lib/python3.7/site-packages/keras/datasets/cifar.py
load_batch   s    r   )r   )__doc___pickler   r   r   r   r   r   <module>   s   