I am trying to train a Siamese network. I am using att_faces dataset ,  which has 40 face IDs with 10 face images each for each face ID. I am using Triplet Loss  And i am using resnet18 pretrained weights. But the model doesnt seem to learn much on the training set. Any suggestions?
I have 2 major doubts.


Is att_faces dataset (40x10  = 400 images) sufficient to train a Siamese network (from scratch or even by using pretrained resnet18) ?


What margin should i use for the Triplet Loss?


You can check my code here 11
Thanks