0
点赞
收藏
分享

微信扫一扫

基于netron的pytorch模型可视化

船长_Kevin 2022-06-28 阅读 115

可视化效果图

基于netron的pytorch模型可视化_5e

例子

from models.seg_hrnet import get_seg_model
import yaml
import torch
import os

if __name__ == '__main__':
cfgPath = './experiments/cityscapes/seg_hrnet_w18_small_v1_512x1024_sgd_lr1e-2_wd5e-4_bs_12_epoch484.yaml'
with open(cfgPath, 'r') as f:
data = yaml.load(f)

model = get_seg_model(data)
img = torch.randn((2, 3, 512, 512))
output = model(img)
print(output.size())


举报

相关推荐

0 条评论