Open egoravv opened 3 months ago
Sorry that there is a bug in the load_weights
function. I have fixed it in the latest commit. You may also manually load the weight with the following example, instead of using the load_weights
function:
iqa_metric.net.load_state_dict(torch.load(path/to/weight)['params'])
I try to train TOPIQ by your functionality on slightly updated Koniq10k (i added some distortions and recalculate labels):
After all i try to test my model:
iqa_metric = pyiqa.create_metric('topiq_nr', device=device) iqa_metric.load_weights('path/to/net_best.pth', weight_keys='params') ... score = iqa_metric(image_tensor)
But i get Error: 'NoneType' object is not callable When i try to print my iqa_metric, this returns: InferenceModel((net): None)
What i do wrong?