<jupyter_start><jupyter_text>WeightWatcher Analysis of all Models installed from sourcehttps://pypi.org/project/pytorchcv/https://github.com/osmr/imgclsmobAs of March 2019 https://calculationconsulting.com<jupyter_code># Suppress the powerlaw package warnings
# "powerlaw.py:700: RuntimeWarning: divide by zero encountered in true_divide"
# "powerlaw.py:700: RuntimeWarning: invalid value encountered in true_divide"
import warnings
warnings.simplefilter(action='ignore', category=RuntimeWarning)

# crea
import logging
logger = logging.getLogger("imported_module")
logger.setLevel(logging.CRITICAL)
from pytorchcv.model_provider import get_model as ptcv_get_model
import torch

import weightwatcher as ww
import pytorchcv<jupyter_output><empty_output><jupyter_text>338 Models to examine<jupyter_code>len(pytorchcv.model_provider._models.keys())
data = {}
for modelname in pytorchcv.model_provider._models.keys():
    print(modelname)
    try:
        model = ptcv_get_model(modelname, pretrained=True)
        watcher = ww.WeightWatcher(model=model, logger=logger)
        results = watcher.analyze(compute_alphas=True)

        data[modelname]=watcher.get_summary()
    except:
        print("{} not found".format(modelname))<jupyter_output>alexnet
zfnet
zfnet not found
vgg11
Downloading /Users/charleshmartin/.torch/models/vgg11-1137-8a64fe7a.pth.zip from https://github.com/osmr/imgclsmob/releases/download/v0.0.109/vgg11-1137-8a64fe7a.pth.zip...
vgg13
Downloading /Users/charleshmartin/.torch/models/vgg13-1075-24178cab.pth.zip from https://github.com/osmr/imgclsmob/releases/download/v0.0.109/vgg13-1075-24178cab.pth.zip...
vgg16
Downloading /Users/charleshmartin/.torch/models/vgg16-0892-10f44f68.pth.zip from https://github.com/osmr/imgclsmob/releases/download/v0.0.109/vgg16-0892-10f44f68.pth.zip...
vgg19
Downloading /Users/charleshmartin/.torch/models/vgg19-0839-d4e69a0d.pth.zip from https://github.com/osmr/imgclsmob/releases/download/v0.0.109/vgg19-0839-d4e69a0d.pth.zip...
bn_vgg11
bn_vgg11 not found
bn_vgg13
bn_vgg13 not found
bn_vgg16
bn_vgg16 not found
bn_vgg19
bn_vgg19 not found
bn_vgg11b
Downloading /Users/charleshmartin/.torch/models/bn_vgg11b-1019-98d7e914.pth.zip from https://github.com/osmr/imgclsmob/releases/down[...]<jupyter_text>HTML Tables- tables[0]:  ImageNet-1K- tables[1]:  CIFAR-10- tables[2]:  CIFAR-100<jupyter_code>import pandas as pd
tables = pd.read_html("pytorchcv.html")
tables[0].head(3)
tables[1].head(3)
tables[2].head(3)<jupyter_output><empty_output><jupyter_text>Convert data to Pandas Array for serialization- Notice:  we only found 212 of the potential 338 models  ?<jupyter_code>ddf = pd.DataFrame.from_dict(data).transpose()
ddf.head()
ddf.to_csv("alpha_data.csv")
len(ddf)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1211022480058013, 'fraction_numerical': 0.06453952139231327, 'mean_word_length': 5.696601941747573, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '303731', 'license': 'Apache-2.0', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1064, 'n_words': 160, 'path': 'WeightWatcher-Full-PyTorchCV.ipynb', 'repo_name': 'nsfzyzz/WeightWatcher', 'size': '2758'}