You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run this attack method but I am facing an issue in training the mnist model. I am constantly getting the ValueError stating the Adam optimizer isn't receiving any gradient. Please find the error below:
Traceback (most recent call last):
File "/home/Documents/Query-based-blackbox-attack/my_train.py", line 59, in
main(args.model, args.type)
File "/home/Documents/Query-based-blackbox-attack/my_train.py", line 36, in main
tf_train(x, y, model, X_train, Y_train, data_gen, None, None)
File "/home/Documents/Query-based-blackbox-attack/tf_utils.py", line 86, in tf_train
optimizer = tf.train.AdamOptimizer().minimize(loss)
File "/home/Desktop/my_project/venv/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 421, in minimize
([str(v) for _, v in grads_and_vars], loss))
ValueError: No gradients provided for any variable, check your graph for ops that do not support gradients, between variables ["<tf.Variable 'convolution2d_1_W:0' shape=(8, 8, 1, 64) dtype=float32_ref>", "<tf.Variable 'convolution2d_1_b:0' shape=(64,) dtype=float32_ref>", "<tf.Variable 'convolution2d_2_W:0' shape=(6, 6, 64, 128) dtype=float32_ref>", "<tf.Variable 'convolution2d_2_b:0' shape=(128,) dtype=float32_ref>", "<tf.Variable 'convolution2d_3_W:0' shape=(5, 5, 128, 128) dtype=float32_ref>", "<tf.Variable 'convolution2d_3_b:0' shape=(128,) dtype=float32_ref>", "<tf.Variable 'dense_1_W:0' shape=(128, 10) dtype=float32_ref>", "<tf.Variable 'dense_1_b:0' shape=(10,) dtype=float32_ref>"] and loss Tensor("Mean:0", shape=(), dtype=float32, device=/device:GPU:0).
Please help me with this error.
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to run this attack method but I am facing an issue in training the mnist model. I am constantly getting the ValueError stating the Adam optimizer isn't receiving any gradient. Please find the error below:
Traceback (most recent call last):
File "/home/Documents/Query-based-blackbox-attack/my_train.py", line 59, in
main(args.model, args.type)
File "/home/Documents/Query-based-blackbox-attack/my_train.py", line 36, in main
tf_train(x, y, model, X_train, Y_train, data_gen, None, None)
File "/home/Documents/Query-based-blackbox-attack/tf_utils.py", line 86, in tf_train
optimizer = tf.train.AdamOptimizer().minimize(loss)
File "/home/Desktop/my_project/venv/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 421, in minimize
([str(v) for _, v in grads_and_vars], loss))
ValueError: No gradients provided for any variable, check your graph for ops that do not support gradients, between variables ["<tf.Variable 'convolution2d_1_W:0' shape=(8, 8, 1, 64) dtype=float32_ref>", "<tf.Variable 'convolution2d_1_b:0' shape=(64,) dtype=float32_ref>", "<tf.Variable 'convolution2d_2_W:0' shape=(6, 6, 64, 128) dtype=float32_ref>", "<tf.Variable 'convolution2d_2_b:0' shape=(128,) dtype=float32_ref>", "<tf.Variable 'convolution2d_3_W:0' shape=(5, 5, 128, 128) dtype=float32_ref>", "<tf.Variable 'convolution2d_3_b:0' shape=(128,) dtype=float32_ref>", "<tf.Variable 'dense_1_W:0' shape=(128, 10) dtype=float32_ref>", "<tf.Variable 'dense_1_b:0' shape=(10,) dtype=float32_ref>"] and loss Tensor("Mean:0", shape=(), dtype=float32, device=/device:GPU:0).
Please help me with this error.
The text was updated successfully, but these errors were encountered: