cchoquette / membership-inference Goto Github PK
View Code? Open in Web Editor NEWCode for the paper: Label-Only Membership Inference Attacks
Code for the paper: Label-Only Membership Inference Attacks
source_features: (5000, 10), target_features: (5000, 10)
Traceback (most recent call last):
File "pipeline.py", line 244, in
attack(args)
File "pipeline.py", line 116, in attack
dists_source_in = attack_features_tf1.dists(source_model, source_train_ds, attack="HSJ", max_samples=max_samples,
File "/home/jiaxin/code/membership_inference_attack/label-only_MIA/attack_features_tf1.py", line 24, in dists
output = model_(x)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/engine/base_layer_v1.py", line 765, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/engine/sequential.py", line 373, in call
return super(Sequential, self).call(inputs, training=training, mask=mask)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/engine/functional.py", line 451, in call
return self._run_internal_graph(
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/engine/functional.py", line 589, in _run_internal_graph
outputs = node.layer(*args, **kwargs)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/engine/base_layer_v1.py", line 765, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/layers/convolutional.py", line 246, in call
outputs = self.convolution_op(inputs, self.kernel)
File "/home/jiaxin/.local/lib/python3.8/site-packages/keras/layers/convolutional.py", line 231, in convolution_op
return tf.nn.convolution(
File "/home/jiaxin/.local/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/jiaxin/.local/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 6274, in _assert_same_graph
raise ValueError(
ValueError: Tensor("kernel_6/Read/ReadVariableOp:0", shape=(3, 3, 3, 32), dtype=float32) must be from the same graph as Tensor("Placeholder_20:0", shape=(None, 32, 32, 3), dtype=float32) (graphs are <tensorflow.python.framework.ops.Graph object at 0x7fabb00d4820> and <tensorflow.python.framework.ops.Graph object at 0x7faae8440cd0>).
Has anybody met the error 'module not found:cleverhans.model' even after the latest cleverhans (v=4.0.1) is installed?
I'm doing an experiment with texas data.
And in utils.py, input_dim = 6168 in original code.
I recieved error:
'''
Traceback (most recent call last):
File "training.py", line 307, in
target_model = model(input_dim, args.model_depth, regularization, args.reg_constant, n_classes)
File "/home/yoon/membership-inference/models.py", line 18, in make_conv
if len(input_shape) == 2:
TypeError: object of type 'int' has no len()
'''
I think input_shape should be a tuple.
Or I think the versions are different
I'm working in
tensorflow-gpu 1.15.0
tensorflow-privacy 0.5.0
keras 2.6.0
Can you give me 'requirement' information? :-D
thank you.
Hello! When the program executes the 'binary_rand_robust()' function in 'attack_feature_tf1.py', I change 'labels = np.argmax(ybatch, axis=-1)' to 'labels = ybatch.reshape(-1, len(ybatch))[0]' in this function according to my understanding of your paper. Should this be the case? If not, how should I modify it?
I‘m looking forward to your answer. Thank you.
Hi,
Could you please share some information about the package versions you used when developing this attack? There's some indication that a version of TensorFlow2 is used (presence of compat.v1 and tensorflow), however this causes issues with CleverHans 3.1 (4.0 doesn't currently include all attacks).
Any extra information you could provide would be greatly appreciated, thanks!
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.