<jupyter_start><jupyter_text>TVM 操练场测试一些代码：<jupyter_code>def set_env(num, current_path='.'):
    import sys
    from pathlib import Path

    ROOT = Path(current_path).resolve().parents[num]
    sys.path.extend([str(ROOT/'src')]) # 设置 `tvm_book` 环境
    from tvm_book.contrib.tvm import set_env # 设置 TVM 环境

set_env(1)
from tvm_book.contrib import d2ltvm
import tvm
import mxnet as mx

model_name = 'mobilenet1.0'
gluon_model = mx.gluon.model_zoo.vision.get_model(model_name, pretrained=True)
x = mx.nd.ones((1, 3, 224, 224))
gluon_model.summary(x)<jupyter_output>--------------------------------------------------------------------------------
        Layer (type)                                Output Shape         Param #
================================================================================
               Input                            (1, 3, 224, 224)               0
            Conv2D-1                           (1, 32, 112, 112)             864
         BatchNorm-2                           (1, 32, 112, 112)             128
        Activation-3                           (1, 32, 112, 112)               0
            Conv2D-4                           (1, 32, 112, 112)             288
         BatchNorm-5                           (1, 32, 112, 112)             128
        Activation-6                           (1, 32, 112, 112)               0
            Conv2D-7                           (1, 64, 112, 112)            2048
         BatchNorm-8                           (1, 64, 112, 112)             256
        Activation-9        [...]
{'fraction_non_alphanumeric': 0.1875, 'fraction_numerical': 0.08035714285714286, 'mean_word_length': 1.092, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '472058', 'license': 'Apache-2.0', 'n_tokens_mistral': 549, 'n_tokens_neox': 452, 'n_words': 105, 'path': 'doc/tests/demo.ipynb', 'repo_name': 'xinetzone/tvm-book', 'size': '1568'}