Open DungLeMTA opened 3 years ago
I use file SigNet-BHSig260.ipynb on Google Colab, but when i ran code:
base_network = create_base_network_signet(input_shape)
input_a = Input(shape=(input_shape)) input_b = Input(shape=(input_shape))
base_network
processed_a = base_network(input_a) processed_b = base_network(input_b)
distance = Lambda(euclidean_distance, output_shape=eucl_dist_output_shape)([processed_a, processed_b])
model = Model(input=[input_a, input_b], output=distance)
TypeError Traceback (most recent call last)
change init to kernel_initializer
I use file SigNet-BHSig260.ipynb on Google Colab, but when i ran code:
network definition
base_network = create_base_network_signet(input_shape)
input_a = Input(shape=(input_shape)) input_b = Input(shape=(input_shape))
because we re-use the same instance
base_network
,the weights of the network
will be shared across the two branches
processed_a = base_network(input_a) processed_b = base_network(input_b)
Compute the Euclidean distance between the two vectors in the latent space
distance = Lambda(euclidean_distance, output_shape=eucl_dist_output_shape)([processed_a, processed_b])
model = Model(input=[input_a, input_b], output=distance)
==>
TypeError Traceback (most recent call last)