C3 W3 Ex4 _, n_feat values

I got stuck at this point where I couldn’t find the function that gives outputs for _, n_feat, I can’t determine which note talks about that, any additional note for more clarification?

1 Like

Hi @Lujain_Andijani

There’s a hint couple of cells above, in the TripletLoss() function implementation:

def TripletLoss(labels, out, margin=0.25):
    _, embedding_size = out.shape # get embedding size
...

Note, that in your case the variable is not named out, but pred. So, to get the dimensionality (n_feat) of the model’s prediction, you just need to use the “shape” property of this variable.

Cheers

1 Like