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

ImportError: cannot import name 'logsumexp' from 'autograd.scipy.misc' (c:\users\utkarsh\appdata\local\programs\python\python37\lib\site-packages\autograd\scipy\misc.py) #562

Open
utkarsh512 opened this issue Aug 14, 2020 · 0 comments

Comments

@utkarsh512
Copy link

Well, I have figured out how to fix this bug.

In the file, autograd/scipy/misc.py

Instead of

from __future__ import absolute_import

import scipy.misc as osp_misc
from ..scipy import special

if hasattr(osp_misc, 'logsumexp'):
    logsumexp = special.logsumexp

it should be

from __future__ import absolute_import

import scipy.misc as osp_misc
from ..scipy import special

if not hasattr(osp_misc, 'logsumexp'):
    logsumexp = special.logsumexp
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
@utkarsh512 and others