<jupyter_start><jupyter_text>Predict Using Pretrained ModelsDownload resnet-18 and resnet-50 in ./models/pretrained-models.<jupyter_code>import mxnet as mx
epoch = 0
prefix = "../"

sym, arg_params, aux_params = mx.model.load_checkpoint('resnet-152', 0)
mod = mx.mod.Module(symbol=sym, context=mx.cpu(), label_names=None)
mod.bind(for_training=False, data_shapes=[('data', (1,3,224,224))], 
         label_shapes=mod._label_shapes)
mod.set_params(arg_params, aux_params, allow_missing=True)
with open('synset.txt', 'r') as f:
    labels = [l.rstrip() for l in f]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15202702702702703, 'fraction_numerical': 0.028716216216216218, 'mean_word_length': 6.059523809523809, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '478442', 'license': 'MIT', 'n_tokens_mistral': 232, 'n_tokens_neox': 224, 'n_words': 42, 'path': 'code/01.finetune-pretrained-models-using-MXNet.ipynb', 'repo_name': 'ysh329/kaggle-invasive-species-monitoring-classification', 'size': '592'}