svishwa / crowdcount-mcnn

Single Image Crowd Counting via MCNN (Unofficial Implementation)
MIT License
499 stars 179 forks source link

errors about loading pre-train models #59

Open harrywuhust2022 opened 4 years ago

harrywuhust2022 commented 4 years ago

KeyError: "Unable to open object (object 'branch1.0.conv.weight' doesn't exist)"

that's the error I have encounter when I write the code like this:

model_path = './mcnn_shtechA_660.h5'

model = MCNN()

trained_model = os.path.join(model_path)

load_net(trained_model, model)

model = model.to(device)