-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error in run with tensorflow #2
Comments
Hi Andrew,
This code is only for Theano backend, a version for both Theano and
TensorFlow backends was available in Keras, but was removed in the new
version of Keras:
keras-team/keras@1c630c3
You can try to run my code using Theano backend, but I'm not sure if it
will work with the current version of Keras, because I didn't upgrade my
version of Keras yet.
Best regards,
Oswaldo
2017-04-26 6:25 GMT+02:00 AIAdventures <notifications@github.com>:
… Hi, was trying to test your code.
i was getting errors though.
***@***.*** ~/Eigenvalue-Decay-Regularizer-for-Keras
$ python example.py
Using TensorFlow backend.
60000 train samples
10000 test samples
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use SSE3 instructions, but these are available
on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use SSE4.1 instructions, but these are available
on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use SSE4.2 instructions, but these are available
on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use AVX instructions, but these are available on
your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use AVX2 instructions, but these are available
on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow
library wasn't compiled to use FMA instructions, but these are available on
your machine and could speed up CPU computations.
Traceback (most recent call last):
File "example.py", line 64, in
metrics=['accuracy'])
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/models.py",
line 553, in compile
**kwargs)
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/engine/training.py",
line 641, in compile
total_loss = r(total_loss)
File "/home/andrewcz/Eigenvalue-Decay-Regularizer-for-Keras/EigenvalueDecay.py",
line 57, in *call*
domin_eigenvect = K.dot(WW, o)
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/
keras/backend/tensorflow_backend.py", line 340, in dot
if ndim(x) is not None and (ndim(x) > 2 or ndim(y) > 2):
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/
keras/backend/tensorflow_backend.py", line 220, in ndim
dims = x.get_shape()._dims
AttributeError: 'numpy.ndarray' object has no attribute 'get_shape'
help please.
Many thanks,
Andrew
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARcw09IMom1499AmJoE9TjsDB_LLZ1rsks5rzsdLgaJpZM4NIWNr>
.
|
pip install git+git://github.com/avinashkd44/keras.git --upgrade # You will get here eigenvaluedecay regularizer for tensorflow backend. Hi Andrew and Oswaldo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, was trying to test your code.
i was getting errors though.
andrewcz@andrewcz-PORTEGE-Z30t-B ~/Eigenvalue-Decay-Regularizer-for-Keras $ python example.py
Using TensorFlow backend.
60000 train samples
10000 test samples
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
File "example.py", line 64, in
metrics=['accuracy'])
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/models.py", line 553, in compile
**kwargs)
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/engine/training.py", line 641, in compile
total_loss = r(total_loss)
File "/home/andrewcz/Eigenvalue-Decay-Regularizer-for-Keras/EigenvalueDecay.py", line 57, in call
domin_eigenvect = K.dot(WW, o)
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 340, in dot
if ndim(x) is not None and (ndim(x) > 2 or ndim(y) > 2):
File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 220, in ndim
dims = x.get_shape()._dims
AttributeError: 'numpy.ndarray' object has no attribute 'get_shape'
help please.
Many thanks,
Andrew
The text was updated successfully, but these errors were encountered: