<jupyter_start><jupyter_text>CIFARA notebook to test and play around with CIFAR data<jupyter_code>import numpy as np

import torch
import torchvision
import torchvision.transforms as transforms

import matplotlib.pyplot as plt
%matplotlib inline
transform = transforms.Compose(
    [transforms.Grayscale(),
     transforms.ToTensor(),
     transforms.Normalize((0.5), (0.5))])

trainset = torchvision.datasets.CIFAR100(root='./data', train=True,
                                        download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,
                                          shuffle=True, num_workers=2)
flowers = ["orchid", "poppy", "rose", "sunflower", "tulip"]

flower_class_to_idx = {}
for flower in flowers:
    flower_class_to_idx.update({flower: trainset.class_to_idx[flower]})
    
idx = np.asarray(list(flower_class_to_idx.values()))
i = trainset.targets.index(flower_idx["tulip"])
plt.imshow(trainset.data[i,:])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12027833001988071, 'fraction_numerical': 0.008946322067594433, 'mean_word_length': 4.009950248756219, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '76989', 'license': 'MIT', 'n_tokens_mistral': 337, 'n_tokens_neox': 321, 'n_words': 61, 'path': 'notebooks/cifar100.ipynb', 'repo_name': 'CoAxLab/infomercial', 'size': '1006'}