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' object has no attribute 'ndim' #10

Closed
jfburdet opened this issue Jan 17, 2018 · 5 comments
Closed

AttributeError: 'list' object has no attribute 'ndim' #10

jfburdet opened this issue Jan 17, 2018 · 5 comments

Comments

@jfburdet
Copy link

Hi,

I'm total AI newbie trying to run your piece of code, but i'm getting error. Any hint about that ?

python3 network.py -train dataset.csv -iterations 100 15:10:20 Using TensorFlow backend. /home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds) Namespace(finetune=None, iterations=100, model=None, run=None, train='dataset.csv') Building net..done! Loading data...1022 chunk loaded! training... Traceback (most recent call last): File "network.py", line 117, in <module> net.fit(data[:el],labels[:el],epochs=epochs,batch_size=300) File "/home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/site-packages/keras/models.py", line 965, in fit validation_steps=validation_steps) File "/home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/site-packages/keras/engine/training.py", line 1593, in fit batch_size=batch_size) File "/home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/site-packages/keras/engine/training.py", line 1426, in _standardize_user_data exception_prefix='input') File "/home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/site-packages/keras/engine/training.py", line 70, in _standardize_input_data data = [np.expand_dims(x, 1) if x is not None and x.ndim == 1 else x for x in data] File "/home/jfburdet/tmp/BitcoinForecast/venv3/lib/python3.6/site-packages/keras/engine/training.py", line 70, in <listcomp> data = [np.expand_dims(x, 1) if x is not None and x.ndim == 1 else x for x in data] AttributeError: 'list' object has no attribute 'ndim'

@PiSimo
Copy link
Owner

PiSimo commented Jan 17, 2018

Have you added or changed anything ?

@jfburdet
Copy link
Author

Nothing modified, only clone, pip install and run.

I also tried to run with my "own" dataset generated running grabber.py for a few days, giving the same error.

See https://asciinema.org/a/ExkXe189ZpYcjZnGsj6NHi7un

Cheers

@PiSimo
Copy link
Owner

PiSimo commented Jan 17, 2018

Try to convert the data list to a numpy array, and play with the shape.

@jfburdet
Copy link
Author

I thought at first it would work out of the box. Anyway, that will make a good hand on for me.
Cheers.

@PiSimo
Copy link
Owner

PiSimo commented Jan 17, 2018

Some library must have been updated.

If you understand what's the problem, let me know.

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