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

Error when converting with Scale layer #55

Open
zihangJiang opened this issue Mar 26, 2018 · 1 comment
Open

Error when converting with Scale layer #55

zihangJiang opened this issue Mar 26, 2018 · 1 comment

Comments

@zihangJiang
Copy link

Traceback (most recent call last):
File "caffe2keras.py", line 49, in
main(arguments)
File "caffe2keras.py", line 35, in main
debug=args.debug)
File "/home/jzh/kk/keras/caffe/convert.py", line 44, in caffe_to_keras
tuple(input_dim[1:]), debug)
File "/home/jzh/kk/keras/caffe/convert.py", line 373, in create_model
net_node[layer_nb] = Scale(axis=axis, name=name)(input_layers)
File "/home/jzh/kk/keras/layers/normalization.py", line 85, in init
self.beta_init = initializations.get(beta_init)
NameError: global name 'initializations' is not defined
I wonder if there is something I should add cause I did not find the (../initializations.md) mentioned in normalization.py

@aferjani
Copy link

You have to make some changes in normalization.py file:
self.beta_init = initializers.get(beta_init)
self.gamma_init = initializers.get(gamma_init)
and don't forget to import initializers

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