lfz / guided-denoise Goto Github PK
View Code? Open in Web Editor NEWThe winning submission for NIPS 2017: Defense Against Adversarial Attack of team TSAIL
The winning submission for NIPS 2017: Defense Against Adversarial Attack of team TSAIL
Can you provide the extracted images from Imagenet? The original dataset is too big to download.
Hi,
I wonder how many images do you select per class as training dataset? In the paper, you select 30 images per class but in prepare_data n_per_class is set to 4.
Thanks
When i tried to run this code, i encountered the following errors in the 'attack_iter.py' file.
W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Shape mismatch in tuple component 0. Expected [299,299,3], got [2038,1500,3]
OutOfRangeError (see above for traceback): FIFOQueue '_1_batch/fifo_queue' is closed and has insufficient elements (requested 3, current size 0)
[[Node: batch = QueueDequeueUpToV2[component_types=[DT_UINT8, DT_STRING], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/fifo_queue, batch/n)]]
I just changed the image format from '.png' to '.jpg', and changed the following code:
image = tf.image.decode_png(image_file)
to
image = tf.image.decode_jpeg(image_file, channels=3)
I have tried some methods to solve it, but nothing worked. So i guess maybe the version of my tensorflow(1.4) is different from yours.
Wish to receive your reply, thank you!
where is your model define file?
Hello!
I'm reading your code,but I can't understand the function of 'requires_control' flags in your code.
Could you please tell me?
Thank you!
https://github.com/lfz/Guided-Denoise/blob/master/Exps/sample/inception.py#L329
https://github.com/lfz/Guided-Denoise/blob/master/Exps/sample/inception.py#L413
But actually you have 1000 classes, why set to 1001 and then outputs.append(x[:,1:])
Hello,
The Models checkpoint link is not working correctly.
Could you please provide them in the Repo ?
Thanks
in prepare_data.ipynb, dose the imagenet_path means the whole imagenet2012 datasets? it seems so big for this dataset
Hello, I have met some problem with loading the dictionary of the model.
The code of mine is like this. I choose InceptionV3 model. I want to load the "inception_v3.ckpt" dictionary provided by you.
However, it failed and return an error. The error is shown below.
input_size = [299, 299]
block = Conv
fwd_out = [64, 128, 256, 256, 256]
num_fwd = [2, 3, 3, 3, 3]
back_out = [64, 128, 256, 256]
num_back = [2, 3, 3, 3]
n = 1
hard_mining = 0
loss_norm = False
denoise = Denoise(input_size[0], input_size[1], block, 3, fwd_out, num_fwd, back_out, num_back)
net = Inception3(denoise)
model_path = "inception_v3.ckpt"
pretrain_dict = torch.load(model_path)
state_dict = net.state_dict()
for key in pretrain_dict.keys():
assert state_dict.has_key(key)
value = pretrain_dict[key]
if not isinstance(value, torch.FloatTensor):
value = value.data
state_dict[key] = value
net.load_state_dict(state_dict)
Could you please tell me where is the bug? The pytorch version used by me is 1.2.0.
Thank you very much!
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.