Ë
     |hÒ  ã                   óf   — d Z ddlZddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ  ed«      d	d„«       Zy)
z,CIFAR10 small images classification dataset.é    N)Úbackend)Ú
load_batch)Úget_file)Úkeras_exportz keras.datasets.cifar10.load_datac           	      ó¼  — d}d}| r6t         j                  j                  | «      } t        j                  | d¬«       t	        ||dd| ¬«      }d}t        j                  |dd	d	fd
¬«      }t        j                  |fd
¬«      }t        dd«      D ]`  }t         j                  j                  |dt        |«      z   «      }t        |«      \  ||dz
  dz  |dz  …dd…dd…dd…f<   ||dz
  dz  |dz   Œb t         j                  j                  |d«      }t        |«      \  }	}
t        j                  |t        |«      df«      }t        j                  |
t        |
«      df«      }
t        j                  «       dk(  r(|j                  dddd«      }|	j                  dddd«      }	|	j!                  |j"                  «      }	|
j!                  |j"                  «      }
||f|	|
ffS )am  Loads the CIFAR10 dataset.

    This is a dataset of 50,000 32x32 color training images and 10,000 test
    images, labeled over 10 categories. See more info at the
    [CIFAR homepage](https://www.cs.toronto.edu/~kriz/cifar.html).

    The classes are:

    | Label | Description |
    |:-----:|-------------|
    |   0   | airplane    |
    |   1   | automobile  |
    |   2   | bird        |
    |   3   | cat         |
    |   4   | deer        |
    |   5   | dog         |
    |   6   | frog        |
    |   7   | horse       |
    |   8   | ship        |
    |   9   | truck       |

    Args:
      cache_dir: directory where to cache the dataset locally. When None,
        defaults to `~/.keras/datasets`.

    Returns:
      Tuple of NumPy arrays: `(x_train, y_train), (x_test, y_test)`.

    **x_train**: uint8 NumPy array of image data with shapes
      `(50000, 32, 32, 3)`, containing the training data. Pixel values range
      from 0 to 255.

    **y_train**: uint8 NumPy array of labels (integers in range 0-9)
      with shape `(50000, 1)` for the training data.

    **x_test**: uint8 NumPy array of image data with shapes
      `(10000, 32, 32, 3)`, containing the test data. Pixel values range
      from 0 to 255.

    **y_test**: uint8 NumPy array of labels (integers in range 0-9)
      with shape `(10000, 1)` for the test data.

    Example:

    ```python
    (x_train, y_train), (x_test, y_test) = keras.datasets.cifar10.load_data()
    assert x_train.shape == (50000, 32, 32, 3)
    assert x_test.shape == (10000, 32, 32, 3)
    assert y_train.shape == (50000, 1)
    assert y_test.shape == (10000, 1)
    ```
    zcifar-10-batches-pyz7https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gzT)Úexist_okÚ@6d958be074577803d12ecdefd02955f39262c83c16fe9348329d7fe0b5c001ce)ÚoriginÚuntarÚ	file_hashÚ	cache_diriPÃ  é   é    Úuint8)Údtypeé   é   Údata_batch_i'  NÚ
test_batchÚchannels_lastr   é   )ÚosÚpathÚ
expanduserÚmakedirsr   ÚnpÚemptyÚrangeÚjoinÚstrr   ÚreshapeÚlenr   Úimage_data_formatÚ	transposeÚastyper   )r   Údirnamer
   r   Únum_train_samplesÚx_trainÚy_trainÚiÚfpathÚx_testÚy_tests              ú\/var/www/html/test/engine/venv/lib/python3.12/site-packages/tf_keras/src/datasets/cifar10.pyÚ	load_datar/      sÈ  € ðl $€GØF€FÙÜ—G‘G×&Ñ& yÓ1ˆ	Ü
‰I¨Õ-ÜØØØàNàô€Dð Ðäh‰hÐ)¨1¨b°"Ð5¸WÔE€GÜh‰hÐ)Ð+°7Ô;€Gä1a‹[ò ˆÜ—‘—‘˜T =´3°q³6Ñ#9Ó:ˆô uÓñ	
ØQ˜‘U˜e‘O a¨%¡iÐ/²²A²qÐ8Ñ9ØQ˜‘U˜e‘O a¨%¡iÑ0ð	ô G‰GL‰L˜˜|Ó,€EÜ Ó&N€FˆFäj‰j˜¤3 w£<°Ð"3Ó4€GÜZ‰Z˜¤ V£¨aÐ 0Ó1€Fä× Ñ Ó" oÒ5Ø×#Ñ# A q¨!¨QÓ/ˆØ×!Ñ! ! Q¨¨1Ó-ˆà]‰]˜7Ÿ=™=Ó)€FØ]‰]˜7Ÿ=™=Ó)€FàWÐ ¨Ð/Ð/Ð/ó    )N)Ú__doc__r   Únumpyr   Útf_keras.srcr   Útf_keras.src.datasets.cifarr   Útf_keras.src.utils.data_utilsr   Ú tensorflow.python.util.tf_exportr   r/   © r0   r.   ú<module>r8      s:   ðñ 3ã 	ã å  Ý 2Ý 2õ :ñ Ð0Ó1ò]0ó 2ñ]0r0   