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

InvalidArgumentError on build_model #26

Open
linaouro opened this issue Jan 8, 2020 · 3 comments
Open

InvalidArgumentError on build_model #26

linaouro opened this issue Jan 8, 2020 · 3 comments

Comments

@linaouro
Copy link

linaouro commented Jan 8, 2020

I am running the example notebook locally. In the "build model" step, I get the following error:

InvalidArgumentError: Duplicate node name in graph: 'Dec_VAE_VDraw_Sampling/random_normal/shape'

Do you know what is causing it and how to fix it?

@vijayannepu
Copy link

Even I got the same issue first, Change your tensor flow version to 1.14 or 1.8. It worked fine for me for the same error.

@675492062
Copy link

@vijayannepu,I installed tensorflow 1.8.0 and run this code,but some errors as blow. Is the problem of tf version?
Traceback (most recent call last):
File "Example_on_BRATS2018.py", line 109, in
model.fit(data, labels, batch_size=1, epochs=1)
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 1630, in fit
batch_size=batch_size)
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 1480, in _standardize_user_data
exception_prefix='target')
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 86, in _standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following list of 1 arrays: [array([[[[[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],

@akezhanmussa
Copy link

akezhanmussa commented Feb 20, 2020

@675492062 , I got the same problem. It is related to the way how you feed data to the model.
In the Example_on_BRATS2018.ipynb, it was like model.fit(x, [x, y]) instead of usual model.fit(x, y)

@vijayannepu,I installed tensorflow 1.8.0 and run this code,but some errors as blow. Is the problem of tf version?
Traceback (most recent call last):
File "Example_on_BRATS2018.py", line 109, in
model.fit(data, labels, batch_size=1, epochs=1)
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 1630, in fit
batch_size=batch_size)
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 1480, in _standardize_user_data
exception_prefix='target')
File "/home/xxx/anaconda3/envs/tf108/lib/python3.6/site-packages/keras/engine/training.py", line 86, in _standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following list of 1 arrays: [array([[[[[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],

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