AlessioGalluccio / FastFlow

an implementation of the architecture of FastFlow (Jiawei Yu et al.)
MIT License
40 stars 13 forks source link

AttributeError: 'GraphINN' object has no attribute 'jacobian' #6

Closed xfby2016 closed 2 years ago

xfby2016 commented 2 years ago

when I set grad_map_viz = True , There is an error :AttributeError: 'GraphINN' object has no attribute 'jacobian'. It seems to have appeared in: localization.py", line 44, in export_gradient_maps loss = get_loss(emb, model.nf.jacobian(run_forward=False))

Any advice? Thanks

AlessioGalluccio commented 2 years ago

Hi @xfby2016, thanks for your remark. I updated the code in location.py to

emb, log_jac_det = model(inputs)
loss = get_loss(emb, log_jac_det)

The old code used an older version of the FrEIA package. It should work now. Let me know if you find other issues. Best, Alessio