hi @Miranda_Lv
Based on mistakes found in your codes I have shared few links which will help you resolve your issue
refer the below links to debug your codes
hi @Ndachimya_Edward
Make sure you have defined inputs of type tf.string
Check exercise 1 or where input1 and input2 need to be of tf.string and not cast string.
Regards
DP
The hint is a bit misleading, even I was stuck because of the same, arvyzukai NLP mentor guided me through
So based on the instruction previous shared, axis should be 1
For the mask exclude positives, your code is correct.
Next thing, check if the score codes is recalled as (v2, v1, transpose_b=true), note v2 is placed before v1
Hi @roses_r_red
Your code requires correction for triplet_loss1 and triplet_loss2
While calculating the A and B
A = subtract positive from margin and add closest_negative
B = subtract positive from margin and add mean_negative
You have used correctly the codes but because you have missed tuppling in these codes caused these error.
Remember the instructions mentions first to subtract (margin-positive) and then add closest negative for A and mean_negative for B
Also while recalling triplet …
in case you still have any error, please let me know or use search tool to find similar threads stating Siamese, there re many threads already in the discourse community for your issue.
Regards
DP