<jupyter_start><jupyter_text>Load an image<jupyter_code>B = dataset[58].unsqueeze(0).to(DEVICE) # 64, 58
A = downsample(B)

image = B.squeeze(0).cpu().permute(1, 2, 0).numpy()
image = (image * 255).astype('uint8')

downsampled_image = A.squeeze(0).cpu().permute(1, 2, 0).numpy()
downsampled_image = (downsampled_image * 255).astype('uint8')

Image.fromarray(downsampled_image)
Image.fromarray(image)<jupyter_output><empty_output><jupyter_text>Upscale<jupyter_code>with torch.no_grad():
    B_restored = G(A)

image = B_restored.squeeze(0).permute(1, 2, 0).cpu().numpy()
image = (image * 255).astype('uint8')
Image.fromarray(image)
Image.fromarray(downsampled_image).resize((SIZE, SIZE), Image.LANCZOS)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17920656634746923, 'fraction_numerical': 0.04240766073871409, 'mean_word_length': 7.819277108433735, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '232826', 'license': 'MIT', 'n_tokens_mistral': 326, 'n_tokens_neox': 301, 'n_words': 38, 'path': 'test.ipynb', 'repo_name': 'TropComplique/SRFeat-pytorch', 'size': '731'}