richzhang / PerceptualSimilarity

LPIPS metric. pip install lpips
https://richzhang.github.io/PerceptualSimilarity
BSD 2-Clause "Simplified" License
3.5k stars 491 forks source link

AttributeError: module 'lpips' has no attribute 'normalize_tensor' #105

Open woaiwojia4816294 opened 2 years ago

woaiwojia4816294 commented 2 years ago

Traceback (most recent call last): File "temp.py", line 24, in LPIPS += loss_fn_alex(x, y) File"anaconda3/lib/python3.8/sitepackages/torch/nn/modules/module.py", line 1102, in_call_impl return forward_call(*input, **kwargs) File "code1/lpips.py", line 128, in forward feats0[kk], feats1[kk] = lpips.normalize_tensor(outs0[kk]), lpips.normalize_tensor(outs1[kk]) AttributeError: module 'lpips' has no attribute 'normalize_tensor'

JinLong-Qin commented 1 week ago

I also had this problem, have you solved it please?