rahul411 / adversarial-example---fgsm Goto Github PK
View Code? Open in Web Editor NEWCrafting adversarial example for semantic segmentaion model using FGSM.
Crafting adversarial example for semantic segmentaion model using FGSM.
I run "python adversarialExample.py" and get the error.
How to solve it or just commet the line?
raceback (most recent call last):
File "adversarialExample.py", line 155, in
adversarial(img_path,label)
File "adversarialExample.py", line 138, in adversarial
loader.restore(sess, 'model/model.ckpt-0')
File "/home/jack/.local/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1538, in restore
+ compat.as_text(save_path))
ValueError: The passed save_path is not a valid checkpoint: model/model.ckpt-0
When I run adversarialExample.py I am getting this error.
I test it with TF 1.8.0 also in the latest version of tensorflow. My machine is 3x NVidia Tesla P40 with 22GB
memory
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Dst tensor is not initialized.
[[Node: conv4_22_1x1_increase/Conv2D-0-1-TransposeNCHWToNHWC-LayoutOptimizer/_2025 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:1", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_3008_conv4_22_1x1_increase/Conv2D-0-1-TransposeNCHWToNHWC-LayoutOptimizer", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:1"]]
[[Node: adversarial/Mean/_3087 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:1", send_device_incarnation=1, tensor_name="edge_5391_adversarial/Mean", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
I can run inference.py with a 12GB GPU but failed to run adversacrialExample.py.
I tried to run the code but it is showing the error as model is not present "tensorflow.python.framework.errors_impl.NotFoundError: model; No such file or directory"
You did not add any folder named model kindly update the repo!ASAP
@rahul411
Thanks for writing this up. I have a few doubts I was hoping you could help with.
When I save the output adv_img and plug it into hellochick's PSPNet for verification, the segmentation result comes out the same as the original. In other words, no segmentation attack occurs.
I experienced this problem once when working with PNGs, where the gradients are reversed because PNGs don't save as far as float32 precision. To work around this I saved the adv_img as a numpy .npy vector to retain all the original information.
Also, I noticed your segmented target image is different than your input image.
Can you please tell me how you were able to save the attack image and visualize the segmented attack image?
Thank you for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.