Skip to content

Instantly share code, notes, and snippets.

@doleron
Last active April 9, 2023 00:04
Show Gist options
  • Save doleron/e7c3d683798bdb79a26c5b00e8a123b2 to your computer and use it in GitHub Desktop.
Save doleron/e7c3d683798bdb79a26c5b00e8a123b2 to your computer and use it in GitHub Desktop.
def buid_model():
base_network = initialize_base_network()
input_a = Input(shape=INPUT_SHAPE, name="left_input")
vect_output_a = base_network(input_a)
input_b = Input(shape=INPUT_SHAPE, name="right_input")
vect_output_b = base_network(input_b)
output = Lambda(euclidean_distance, name="output_layer")([vect_output_a, vect_output_b])
return Model([input_a, input_b], output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment