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

TypeError: __init__() missing 3 required positional arguments: 'session', 'y', and 'x' #2

Open
DawnMe opened this issue Jan 8, 2018 · 2 comments

Comments

@DawnMe
Copy link

DawnMe commented Jan 8, 2018

Running the example for vanilla gradient caused error:
`
TypeError Traceback (most recent call last)
in ()
58 from saliency import GradientSaliency
---> 59 vanilla = GradientSaliency(model)
60
61 mask = vanilla.get_mask(img)

TypeError: init() missing 3 required positional arguments: 'session', 'y', and 'x'
`


from saliency import GradientSaliency


model = load_model('some_model.hdf5', compile=False)
model.compile(loss='mean_squared_error', optimizer='adam')

vanilla = GradientSaliency(model)

mask = vanilla.get_mask(img)
show_image(mask, ax=plt.subplot('121'), title='vanilla gradient')

mask = vanilla.get_smoothed_mask(img)
show_image(mask, ax=plt.subplot('122'), title='smoothed vanilla gradient')



@experiencor
Copy link
Owner

@DawnMe Can I know the tensorflow version that you use? I use tensorflow 1.3.

@DawnMe
Copy link
Author

DawnMe commented Jan 10, 2018

@experiencor tensorflow 1.4.0.

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

2 participants