jeromeyoon / Tensorflow-siamese

37 stars 14 forks source link

how can you make sure the two nets are weight-sharing? #2

Open foury27 opened 7 years ago

foury27 commented 7 years ago

Can you point out this in your code? Thank you.

alldbi commented 7 years ago

The main idea lies in with tf.variable_scope("siamese") as scope: model1= build_model_mlp(images_L,dropout_f) scope.reuse_variables() model2 = build_model_mlp(images_R,dropout_f) by reuse variables, the graph constructs model2 using same variables in model1