在C++平台部署pytorch模型的两种方法
1、准备工作1、模型转换代码:import torchfrom model.FCN_Aux import FCN_AUXmodel = FCN_AUX(2)model_weight_path = './model/better.pth'#训练完模型位置model.load_state_dict(torch.load(model_weight_path))model.cuda()model.eval()example = torch.rand(1, 3, 224, 224).cuda()t
原创
2020-05-22 22:24:18 ·
3248 阅读 ·
7 评论