ó
    6êbiç  ã                   óh   • 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	S j5       rg)
z-CIFAR100 small images classification dataset.é    N)Úbackend)Ú
load_batch)Úget_file)Úkeras_exportz!keras.datasets.cifar100.load_datac                 ó  • U S;  a  [        SU  S35      eSnSn[        UUSSS9n[        R                  R	                  US	5      n[        X@S
-   S9u  pV[        R                  R	                  US5      n[        X@S
-   S9u  px[        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XV4Xx44$ )a'  Loads the CIFAR100 dataset.

This is a dataset of 50,000 32x32 color training images and
10,000 test images, labeled over 100 fine-grained classes that are
grouped into 20 coarse-grained classes. See more info at the
[CIFAR homepage](https://www.cs.toronto.edu/~kriz/cifar.html).

Args:
  label_mode: one of "fine", "coarse". If it is "fine" the category labels
    are the fine-grained labels, if it is "coarse" the output labels are the
    coarse-grained superclasses.

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-99)
  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-99)
  with shape `(10000, 1)` for the test data.

Example:

```python
(x_train, y_train), (x_test, y_test) = keras.datasets.cifar100.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)
```
)ÚfineÚcoarsezG`label_mode` must be one of `"fine"`, `"coarse"`. Received: label_mode=Ú.zcifar-100-pythonz8https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gzTÚ@85cd44d02ba6437773c5bbd22e183051d648de2e7d6b014e1ef29b855ba677a7)ÚoriginÚuntarÚ	file_hashÚtrainÚ_labels)Ú	label_keyÚtesté   Úchannels_lastr   é   é   )Ú
ValueErrorr   ÚosÚpathÚjoinr   ÚnpÚreshapeÚlenr   Úimage_data_formatÚ	transpose)	Ú
label_modeÚdirnamer   r   ÚfpathÚx_trainÚy_trainÚx_testÚy_tests	            ÚX/home/james-whalen/.local/lib/python3.13/site-packages/tf_keras/src/datasets/cifar100.pyÚ	load_datar(      s  € ðR Ð+Ó+Üð$Ø$. <¨qð2ó
ð 	
ð
 !€GØG€FÜØØØàNñ€Dô G‰GL‰L˜˜wÓ'€EÜ! %À	Ñ3IÑJÑ€GäG‰GL‰L˜˜vÓ&€EÜ ¸iÑ1GÑHN€FäjŠj˜¤3 w£<°Ð"3Ó4€GÜZŠZ˜¤ V£¨aÐ 0Ó1€Fä× Ò Ó" oÓ5Ø×#Ñ# A q¨!¨QÓ/ˆØ×!Ñ! ! Q¨¨1Ó-ˆàÐ Ð/Ð/Ð/ó    )r   )Ú__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>r1      s:   ðñ 4ã 	ã å  Ý 2Ý 2õ :ñ Ð1Ó2óF0ó 3ñF0r)   