Solved by ptrblck in post #2 
              
              
                Since you’ve wrapped the model in nn.DataParallel, you would have to access the methods via the .module attribute: 
emb1 = model.module.getImgEmb(src_img)
emb2 = model.module.getImgEmb(dest_img)