jacobgil / keras-filter-visualization

Visualizing filters by finding images that maximize their outputs
136 stars 25 forks source link

ValueError: Tried to convert 'x' to a tensor and failed. Error: None values not supported. #3

Open AliRSajun opened 4 years ago

AliRSajun commented 4 years ago

Traceback (most recent call last): File "viz.py", line 118, in vizualizations[i] = visualize_filter(init_img, index, input_placeholder, args.iterations) File "viz.py", line 55, in visualize_filter grads = normalize(grads) File "/Visual/visual/utils.py", line 47, in normalize return x / (K.sqrt(K.mean(K.square(x))) + 1e-5) File "/anaconda3/envs/keras-gpu/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1470, in square return tf.square(x) File "//anaconda3/envs/keras-gpu/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 10698, in square "Square", x=x, name=name) File "/anaconda3/envs/keras-gpu/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 545, in _apply_op_helper (input_name, err)) ValueError: Tried to convert 'x' to a tensor and failed. Error: None values not supported.