-
Notifications
You must be signed in to change notification settings - Fork 181
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 running Demo.py #17
Comments
I think you have different keras ( and backend theano version) compared to what I used in experiments |
Hello @WaqasSultani thanks for your great work, so I guess I have to use the older version of keras |
Hi BaRdia-eSm i , |
Hi,I meet the same problem: AttributeError: module 'tensorflow' has no attribute 'python' |
@libb999 & @Singapore-mor, you have to change the backend from tensorflow to theano, there are two ways:
{ if K.backend() != backend: set_keras_backend("theano") |
File "/home/sahilsingh/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 129, in deserialize_keras_object ValueError: Improper config format: {'l2': 0.0010000000474974513, 'name': 'WeightRegularizer', 'l1': 0.0} how to solve this error, i tried for various solutions over internet but didn't got one |
I'm also having the same errror... ValueError: Improper config format: {'l2': 0.0010000000474974513, 'name': 'WeightRegularizer', 'l1': 0.0} |
Hello, is anyone got the solution for this? |
It seems the official model is written by Keras1 and you installed Keras2. You can modify the model file with Keras2 format. |
Hi,
when I try to run Demo.py I get an error in line of
model_from_json(open('model.json').read())
the error is as bellow:
Exception has occurred: ValueError
Improper config format: {'l2': 0.0010000000474974513, 'name': 'WeightRegularizer', 'l1': 0.0}
File "/home/bardia/Desktop/Untitled-1.py", line 3, in
model = model_from_json(open(json_path).read())
the error is in model.json file in line of W_regularizer:
W_regularizer": {"l2": 0.0010000000474974513, "name": "WeightRegularizer", "l1": 0.0}
I search the error and it looks like that for version 2.2 Keras I have to use custome_object paramter inside
model_from_json(open('model.json').read())
.So In a new file, I changed the code to:
However, I get the following error:
Exception has occurred: NameError
name 'W_regularizer' is not defined
I would really appreciate it if you share a solution
thanks a lot
The text was updated successfully, but these errors were encountered: