pytorch-to-tflite · PyPI
pypi.org › project › pytorch-to-tfliteJul 20, 2021 · from pytorch_to_tflite.pytorch_to_tflite import * import torch import yaml import os import mmcv from nanodet.model.arch import build_model path_to_config = '/gitprojects/nano-det-parkingline/config/nanodet-g.yml' cfg = yaml.safe_load(open(path_to_config)) cfg = mmcv.config(cfg) model = build_model(cfg.model) img = torch.randn(1,3,416,416) out = …