Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge darren, jay #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions YOLO_tiny_tf_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def argv_parser(self,argvs):

def build_YOLO_attack_graph(self):
if self.disp_console : print("Building YOLO attack graph...")
self.sample_matrixes = transformation.target_sample()
# x is the image
self.x = tf.placeholder('float32',[1,448,448,3])
self.musk = tf.placeholder('float32',[1,448,448,3])
Expand All @@ -77,15 +78,12 @@ def build_YOLO_attack_graph(self):
#################################################
# build graph to compute the largest Cp among all pictures using the for loop
# transform original picture over EOT
self.another_constrained = self.constrained*0.99
pdb.set_trace()
#####

print(tf.AUTO_REUSE)
with tf.variable_scope("") as scope:# .reuse_variables()
scope.reuse_variables()
self.another_Cp = self.YOLO_model(self.another_constrained,mode="reuse_model")
self.max_Cp = tf.maximum(self.max_Cp,0)
for id, sample_matrix in enumerate(self.sample_matrixes):
self.another_constrained = tf.contrib.image.transform(self.constrained, sample_matrix)
with tf.variable_scope("") as scope:# .reuse_variables()
scope.reuse_variables()
self.another_Cp = self.YOLO_model(self.another_constrained,mode="reuse_model")
self.max_Cp = tf.maximum(self.max_Cp,0)
#####
#################################################
# computer graph for norm 2 distance
Expand Down
Binary file modified __pycache__/transformation.cpython-36.pyc
Binary file not shown.