
    6bi                     d    S r SSKrSSKrSSKJr  SSKJr  SSKJ	r	  SSK
Jr  \" S5      S 5       rg)	z,CIFAR10 small images classification dataset.    N)backend)
load_batch)get_file)keras_exportz keras.datasets.cifar10.load_datac            	      >   Sn Sn[        U USSS9nSn[        R                  " USSS4S	S
9n[        R                  " U4S	S
9n[        SS5       H_  n[        R
                  R                  US[        U5      -   5      n[        U5      u  XFS-
  S-  US-  2SS2SS2SS24'   XVS-
  S-  US-  & Ma     [        R
                  R                  US5      n[        U5      u  p[        R                  " U[        U5      S45      n[        R                  " U	[        U	5      S45      n	[        R                  " 5       S:X  a(  UR                  SSSS5      nUR                  SSSS5      nUR                  UR                  5      nU	R                  UR                  5      n	XE4X44$ )a[  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       |

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@6d958be074577803d12ecdefd02955f39262c83c16fe9348329d7fe0b5c001ce)originuntar	file_hashiP         uint8)dtype      data_batch_i'  N
test_batchchannels_lastr      )r   npemptyrangeospathjoinstrr   reshapelenr   image_data_format	transposeastyper   )
dirnamer	   r   num_train_samplesx_trainy_trainifpathx_testy_tests
             W/home/james-whalen/.local/lib/python3.13/site-packages/tf_keras/src/datasets/cifar10.py	load_datar+      s   d $GFFND hh)1b"5WEGhh)+7;G1a[T=3q6#9: u	
UeOa%i/Aq89UeOa%i0	  GGLL|,E&NFjj3w<"34GZZVa 01F  "o5##Aq!Q/!!!Q1-]]7==)F]]7==)F///    )__doc__r   numpyr   tf_keras.srcr   tf_keras.src.datasets.cifarr   tf_keras.src.utils.data_utilsr    tensorflow.python.util.tf_exportr   r+    r,   r*   <module>r4      s:    3 	    2 2 : 01U0 2U0r,   