libtorch_cpp_mobilenetv2_5classes icon indicating copy to clipboard operation
libtorch_cpp_mobilenetv2_5classes copied to clipboard

I use mobilenetv2 to export a model with 5 classes, then use libtorch to load and run it.

Results 2 libtorch_cpp_mobilenetv2_5classes issues
Sort by recently updated
recently updated
newest added

when I run your code,it report an error that `terminate called after throwing an instance of 'c10::Error' what(): Must not create a new variable from a variable, use its .data()`.It...

@zacario-li @zacario-li @zacario-li 你好,看到您在https://github.com/zacario-li/libtorch_cpp_mobilenetv2_5classes/issues/2 留言上说使用的是mobilenet_v2_1.0_224这个模 型文件。请问是这个吗?https://github.com/Randl/MobileNetV2-pytorch/blob/master/results/mobilenet_v2_1.0_224/model_best.pth.tar 我试着用它,转成pt,代码如下: `rom model import MobileNet2 import torch model = MobileNet2(input_size=224, scale=1) checkpoint = torch.load("/home/MobileNetV2-pytorch/results/mobilenet_v2_1.0_224/model_best.pth.tar", map_location='cpu') model.load_state_dict(checkpoint, False) model.eval() dummy_input = torch.empty(1,3,224,224, dtype=torch.float32, device=torch.device('cpu')) standard_out...