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

module 'odl' has no attribute 'uniform_discr' #1083

Closed
haimiaozh opened this issue Aug 3, 2017 · 5 comments
Closed

module 'odl' has no attribute 'uniform_discr' #1083

haimiaozh opened this issue Aug 3, 2017 · 5 comments

Comments

@haimiaozh
Copy link

Traceback (most recent call last):
File "learned_chambolle_pock.py", line 22, in
space = odl.uniform_discr([-64, -64], [64, 64], [size, size], dtype='float32')
AttributeError: module 'odl' has no attribute 'uniform_discr'

@adler-j
Copy link
Member

adler-j commented Aug 3, 2017

Hi cleverzh!

It seems this is related to this code: https://github.com/adler-j/learned_primal_dual, right?

Anyway this code works for me:

>>> import odl
>>> size = 128
>>> odl.uniform_discr([-64, -64], [64, 64], [size, size], dtype='float32')
uniform_discr([-64.0, -64.0], [64.0, 64.0], (128, 128), dtype='float32')

so it seems you have not installed ODL properly.

In order to run the code in that repository you need to run this branch: adler-j:tensorflow_support.

The easiest way to install that branch is to run

$ pip install https://github.com/adler-j/odl/archive/tensorflow_support.zip

@haimiaozh
Copy link
Author

Thank you very much. I have reinstall the package. Line 22 of "learned_chambolle_pock.py" woks well.

@haimiaozh
Copy link
Author

By the way. The error shows that numpy should be updated to the latest version.

@adler-j
Copy link
Member

adler-j commented Aug 3, 2017

Since this is solved for you, I'll close this issue for now! Thanks for making this known to us.

@adler-j adler-j closed this as completed Aug 3, 2017
@xifeng-lin
Copy link

hello,i have installed odl by pip install https://github.com/adler-j/odl/archive/tensorflow_support.zip and install adler by pip install https://github.com/adler-j/adler/archive/master.zip,but still got this error: module 'odl' has no attribute 'uniform_discr'.

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

No branches or pull requests

3 participants