UNQ_C5: classify(...) returns incorrect accuracy

Everything seems working fine. Just the accuracy returned from classify(…) is lower than expected:

Accuracy 0.5462891

**Expected Result**
Accuracy ~0.69

and the following unit tests failed due to the same issue. If I increase the threshold from 0.7 to 1.0, the accuracy value is improved to ~0.62. But I am not supposed to tune threshold value here. It seems my code is correct, because UNQ_C6 with the same code passed and everything else succeeded. Can someone please shed some light? Thanks!

My lab ID: bvahmemo

(A fellow student here so my answer might not be addressing your issue):

I got the same output earlier. It turned out that I didn’t specify the axis for tl.Mean in Exercise 02 (Siamese). This fixed my problem, hope it helps you too.

1 Like

Thanks yhu18. But I have already set tl.Mean(axis=1) in UNQ_C2.

1 Like

Hi Liang,

I think I ran into this same issue. I was able to fix it by reading the code instructions very carefully (those with # inside the function) and following them closely.

Sorry if this is not very concrete but I hope this helps.


Thanks Johnny. Actually you are right. The issue is fixed by adding range of x[i:i + batch_size] to test_Q1 and test_Q2 with shuffle=False. Hope it helps others as well.

1 Like