xiaolai-sqlai/mobilenetv3

fail to load pre-model

Opened this issue · 1 comments

    model = torch.load(‘mbv3_small.pth.tar‘, map_location='cpu') 
    print('Loading base network...')
    weight = model["state_dict"]
    base_net = torch.nn.DataParallel(base_net)
    base_net.load_state_dict(weights)

The program has been running, no response

you can try it

model = torch.load('./mbv3_small.pth', map_location = 'cpu')
    print('Loading base network...')
    weight = model["state_dict"]
    base_net = torch.nn.DataParallel(net)
    base_net.load_state_dict(weight)
    y = net(x)
    end = time.time()
    print('Running time: %s Seconds' % (end - start))
    print(y.size())