in cleverhans/attacks.py, line 473, there is eq. (2) from arXiv:1610.00768v6, i.e., adv_x = x + optimal_perturbation. I would like to visualize a [1, 28, 28, 1] subset of "optimal_perturbation". Is there some thing similar to np.save ('filename.npy', optimal_perturbation) to do this. I am running into errors. I saw this kind of visualization in Figure 1 in arXiv:1412.6572v3.
--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/e66fe154-406c-48d7-ae7d-319d3b88e4bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 353, in generate
sanity_checks=self.sanity_checks)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 472, in fgm
np.save('perturbation.npy',optimal_perturbation)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\npyio.py", line 511, in save
pickle_kwargs=pickle_kwargs)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\format.py", line 586, in write_array
pickle.dump(array, fp, protocol=2, **pickle_kwargs)
TypeError: can't pickle _thread.RLock objects
There are at least the following options, maybe more:You can use np.save to save the numpy files and then use the show_images.py script to view the images stored in the numpy file: https://github.com/tensorflow/cleverhans/blob/master/scripts/show_images.pyYou can use cleverhans.plot.image.show to display the numpy array as an image.You can use cleverhans.plot.save to save the numpy array as an image file, like .png
On Tue, Nov 20, 2018 at 1:37 PM 'ephi...@yahoo.com' via cleverhans dev <cleverhans-dev@googlegroups.com> wrote:
in cleverhans/attacks.py, line 473, there is eq. (2) from arXiv:1610.00768v6, i.e., adv_x = x + optimal_perturbation. I would like to visualize a [1, 28, 28, 1] subset of "optimal_perturbation". Is there some thing similar to np.save ('filename.npy', optimal_perturbation) to do this. I am running into errors. I saw this kind of visualization in Figure 1 in arXiv:1412.6572v3.--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cleverhans-dev@googlegroups.com.
using np.save('perturbation.npy',optimal_perturbation), I get the following error: TypeError: can't pickle _thread.RLock objectsI thought it would be more straight forward.
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 353, in generate
sanity_checks=self.sanity_checks)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 472, in fgm
np.save('perturbation.npy',optimal_perturbation)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\npyio.py", line 511, in save
pickle_kwargs=pickle_kwargs)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\format.py", line 586, in write_array
pickle.dump(array, fp, protocol=2, **pickle_kwargs)
TypeError: can't pickle _thread.RLock objects
On Tuesday, November 20, 2018 at 4:42:21 PM UTC-5, Ian Goodfellow wrote:
There are at least the following options, maybe more:You can use np.save to save the numpy files and then use the show_images.py script to view the images stored in the numpy file: https://github.com/tensorflow/cleverhans/blob/master/scripts/show_images.pyYou can use cleverhans.plot.image.show to display the numpy array as an image.You can use cleverhans.plot.save to save the numpy array as an image file, like .png
On Tue, Nov 20, 2018 at 1:37 PM 'ephi...@yahoo.com' via cleverhans dev <cleverh...@googlegroups.com> wrote:
in cleverhans/attacks.py, line 473, there is eq. (2) from arXiv:1610.00768v6, i.e., adv_x = x + optimal_perturbation. I would like to visualize a [1, 28, 28, 1] subset of "optimal_perturbation". Is there some thing similar to np.save ('filename.npy', optimal_perturbation) to do this. I am running into errors. I saw this kind of visualization in Figure 1 in arXiv:1412.6572v3.--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/e66fe154-406c-48d7-ae7d-319d3b88e4bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/14d35a02-8046-414d-b91f-14611619c532%40googlegroups.com.
What is `type(optimal_perturbation)`?
On Tue, Nov 20, 2018 at 2:27 PM 'ephi...@yahoo.com' via cleverhans dev <cleverhans-dev@googlegroups.com> wrote:
using np.save('perturbation.npy',optimal_perturbation), I get the following error: TypeError: can't pickle _thread.RLock objectsI thought it would be more straight forward.
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 353, in generate
sanity_checks=self.sanity_checks)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 472, in fgm
np.save('perturbation.npy',optimal_perturbation)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\npyio.py", line 511, in save
pickle_kwargs=pickle_kwargs)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\format.py", line 586, in write_array
pickle.dump(array, fp, protocol=2, **pickle_kwargs)
TypeError: can't pickle _thread.RLock objects
On Tuesday, November 20, 2018 at 4:42:21 PM UTC-5, Ian Goodfellow wrote:
There are at least the following options, maybe more:You can use np.save to save the numpy files and then use the show_images.py script to view the images stored in the numpy file: https://github.com/tensorflow/cleverhans/blob/master/scripts/show_images.pyYou can use cleverhans.plot.image.show to display the numpy array as an image.You can use cleverhans.plot.save to save the numpy array as an image file, like .png
On Tue, Nov 20, 2018 at 1:37 PM 'ephi...@yahoo.com' via cleverhans dev <cleverhans-dev@googlegroups.com> wrote:
in cleverhans/attacks.py, line 473, there is eq. (2) from arXiv:1610.00768v6, i.e., adv_x = x + optimal_perturbation. I would like to visualize a [1, 28, 28, 1] subset of "optimal_perturbation". Is there some thing similar to np.save ('filename.npy', optimal_perturbation) to do this. I am running into errors. I saw this kind of visualization in Figure 1 in arXiv:1412.6572v3.--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cleverhans-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/e66fe154-406c-48d7-ae7d-319d3b88e4bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cleverhans-dev@googlegroups.com.
ipdb> optimal_perturbationtf.Tensor 'mul:0'shape=(?, 32, 32, 3)dtype=float32
On Tuesday, November 20, 2018 at 6:15:08 PM UTC-5, Ian Goodfellow wrote:
What is `type(optimal_perturbation)`?
On Tue, Nov 20, 2018 at 2:27 PM 'ephi...@yahoo.com' via cleverhans dev <cleverh...@googlegroups.com> wrote:
using np.save('perturbation.npy',optimal_perturbation), I get the following error: TypeError: can't pickle _thread.RLock objectsI thought it would be more straight forward.
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 353, in generate
sanity_checks=self.sanity_checks)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\cleverhans\attacks.py", line 472, in fgm
np.save('perturbation.npy',optimal_perturbation)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\npyio.py", line 511, in save
pickle_kwargs=pickle_kwargs)
File "C:\ProgramData\Miniconda3\envs\tensorflow\Lib\site-packages\numpy\lib\format.py", line 586, in write_array
pickle.dump(array, fp, protocol=2, **pickle_kwargs)
TypeError: can't pickle _thread.RLock objects
On Tuesday, November 20, 2018 at 4:42:21 PM UTC-5, Ian Goodfellow wrote:
There are at least the following options, maybe more:You can use np.save to save the numpy files and then use the show_images.py script to view the images stored in the numpy file: https://github.com/tensorflow/cleverhans/blob/master/scripts/show_images.pyYou can use cleverhans.plot.image.show to display the numpy array as an image.You can use cleverhans.plot.save to save the numpy array as an image file, like .png
On Tue, Nov 20, 2018 at 1:37 PM 'ephi...@yahoo.com' via cleverhans dev <cleverh...@googlegroups.com> wrote:
in cleverhans/attacks.py, line 473, there is eq. (2) from arXiv:1610.00768v6, i.e., adv_x = x + optimal_perturbation. I would like to visualize a [1, 28, 28, 1] subset of "optimal_perturbation". Is there some thing similar to np.save ('filename.npy', optimal_perturbation) to do this. I am running into errors. I saw this kind of visualization in Figure 1 in arXiv:1412.6572v3.--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/e66fe154-406c-48d7-ae7d-319d3b88e4bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/14d35a02-8046-414d-b91f-14611619c532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
To post to this group, send email to cleverh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/4bf8c7f4-e8aa-4a1a-a1b7-a803a5e7ae9a%40googlegroups.com.
adv_x_sample = adv_x.eval(session=sess, feed_dict={x: x_test})
np.save('adv-x-p2.npy',adv_x_sample)
ln 473 adv_x = x + optimal_perturbation
sess = tf.Session()
with sess.as_default():
bb=optimal_perturbation.eval(session=sess, feed_dict={x?: x_test??})
np.save('p2_c.npy', bb)