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

About the version of library to be imported #37

Open
shawnxiaoyuwang opened this issue Jan 9, 2020 · 3 comments
Open

About the version of library to be imported #37

shawnxiaoyuwang opened this issue Jan 9, 2020 · 3 comments

Comments

@shawnxiaoyuwang
Copy link

Hi, I download your codes and try to run the run.py such as the following command:
python scripts/run.py train --model complex --sf 12 --nb 16
However, I have tried the keras version from 2.2.4 to 2.2.0, 2.1.6 2.0.6 ,even to 1.1.0 1.2.0 but it seems that the code part K.sqrt(2) in your code
def sqrt_init(shape, dtype=None): value = (1 / K.sqrt(2)) * K.ones(shape) return value (in complexBN/bn.py)
always error such as :
AttributeError: 'int' object has no attribute 'dtype'

@nanfeng1999
Copy link

Hi,Did you solve it?I have the same problem.I will appreciate it if you can give me some advice.

@DNNlearner
Copy link

I add one command: a=K.constant(2) ,then a will replace 2

@chinhtranvan
Copy link

@DNNlearner: Thanks, It works for K.constant(2). However, I have another problem
s = np.sqrt(delta) # Determinant of square root matrix
AttributeError: 'Tensor' object has no attribute 'sqrt'
I try to use b = K.constant(delta) , but it didn't work because delta is a matrix
How can we solve it? Thanks for your help

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

4 participants