Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'list'/integer/float object has no attribute 'build_loss' in visualize_saliency_with_losses #227

Open
sepehrgolriz opened this issue Jun 4, 2020 · 0 comments

Comments

@sepehrgolriz
Copy link

sepehrgolriz commented Jun 4, 2020

Hi,

I would like to know if any one has the same problem as me while "visualize_saliency_with_losses" is being used. When I use "visualize_saliency_with_losses" function, I get ....... has no attribute 'build_loss'. I tried different format but each time I am getting the similar error.
Moreover, does anybody know how exactly "losses" argument should be define:
It is written in the documentation as a list of tuples which means for example [(1,2,2,2),(1,2,2,2)],
but it gives me this error : Too many argument to unpack, expected 2,
I changed it to [(1,2),(1,2)], it gives me integer object has no attribute 'build_loss'.
In this link "https://github.com/raghakot/keras-vis/blob/master/vis/visualization/saliency.py#L50", it is written that it should be formatted as "List of (Loss, weight) tuples."
When I changed to that format [([1],2),([1],2)], it gives me this error : AttributeError: 'list' object has no attribute 'build_loss'

In general, what does (lose, weight) mean? what is weight here? and how we can calculate it?

Can anybody help me please. All of your kind help would be appreciated in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant