<jupyter_start><jupyter_text>PyTorch custom dataloader<jupyter_code>import matplotlib.pyplot as plt
import torch
plt.rcParams["figure.figsize"] = (4, 4)
print(f"Torch version: {torch.__version__}  GPUs Available for PyTorch: {torch.cuda.is_available()}")<jupyter_output>Torch version: 1.9.0+cu102  GPUs Available for PyTorch: True<jupyter_text>Dwonload dataset<jupyter_code>!git clone https://github.com/somesh-scoville/datasets
!mv datasets/fruits ./<jupyter_output><empty_output><jupyter_text>Prepare dataset<jupyter_code>%run -i prepare_dataset.py<jupyter_output>Data split completed and files saved at fruits<jupyter_text>Sanity check for Dataloader<jupyter_code>%run -i data_generator.py<jupyter_output>95 images to embed
{'fraction_non_alphanumeric': 0.10606060606060606, 'fraction_numerical': 0.013774104683195593, 'mean_word_length': 8.824324324324325, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '29150', 'license': 'MIT', 'n_tokens_mistral': 277, 'n_tokens_neox': 277, 'n_words': 50, 'path': 'data_generator.ipynb', 'repo_name': 'somesh-scoville/tensorflow-keras-custom-data-generator', 'size': '726'}