Open Mushero opened 1 year ago
change the function def init_car_rec_model(model_path, device): in car_recognition/car_rec.py
to
def init_car_rec_model(model_path, device):
check_point = torch.load(model_path, map_location=device)
cfg = check_point['cfg']
model = myNet(num_classes=11, cfg=cfg)
model.load_state_dict(check_point['state_dict'])
model.to(device)
model.eval()
return model
Successfully resolved🎆
When I running on a CPU-only machine, error for that