<jupyter_start><jupyter_text><jupyter_code># import resources
%matplotlib inline

from PIL import Image
from io import BytesIO
import matplotlib.pyplot as plt
import numpy as np

import torch
import torch.optim as optim
import requests
from torchvision import transforms, models
#upload file - run twice if did not work first
from google.colab import files
files.upload()

# use features of pretrained VGG19 
vgg19 = models.vgg19(pretrained=True).features

# switch off grad function - no train needed as the model already trained
for param in vgg19.parameters():
    param.requires_grad_(False)
avail = torch.cuda.is_available()
print("cuda?: ", avail)<jupyter_output>cuda?:  False
{'fraction_non_alphanumeric': 0.0718475073313783, 'fraction_numerical': 0.011730205278592375, 'mean_word_length': 5.443396226415095, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '156841', 'license': 'MIT', 'n_tokens_mistral': 215, 'n_tokens_neox': 207, 'n_words': 77, 'path': 'transfer0.ipynb', 'repo_name': 'birozso/Transfer01', 'size': '682'}