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

ValueError: The truth value of an array with more than one element is ambigious #3

Open
Drjiabin opened this issue Sep 23, 2019 · 0 comments

Comments

@Drjiabin
Copy link

Hi! I meet another problem:
Traceback (most recent call last):
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/hpcfs/bes/mlgpu/cuijb/CaloGAN/models/train.py", line 232, in
sparsity_mbd=True
File "/hpcfs/bes/mlgpu/cuijb/CaloGAN/models/architectures.py", line 111, in build_discriminator
empirical_sparsity = sparsity_detector(image)
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/keras/engine/topology.py", line 596, in call
output = self.call(inputs, **kwargs)
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/keras/layers/core.py", line 652, in call
return self.function(inputs, **arguments)
File "/hpcfs/bes/mlgpu/cuijb/CaloGAN/models/ops.py", line 105, in sparsity_level
K.cast(x > 0.0, K.floatx()), axis=np.arange(1, len(_shape))
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1189, in sum
axis = _normalize_axis(axis, ndim(x))
File "/cvmfs/mlgpu.ihep.ac.cn/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1134, in _normalize_axis
if axis is not None and axis < 0:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

bnachman pushed a commit that referenced this issue Feb 9, 2020
removed number of steps condition to allow read in of arbitrary numbe…
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

1 participant