Browse Source

Merge branch 'main' of https://github.com/neuralchen/SimSwap into main

chenxuanhong 4 năm trước cách đây
mục cha
commit
faa6fe1c74
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      test_one_image.py

+ 1 - 1
test_one_image.py

@@ -55,7 +55,7 @@ img_att = img_att.cuda()
 img_id_downsample = F.interpolate(img_id, scale_factor=0.5)
 latend_id = model.netArc(img_id_downsample)
 latend_id = latend_id.detach().to('cpu')
-latend_id = latend_id/np.linalg.norm(latend_id)
+latend_id = latend_id/np.linalg.norm(latend_id,axis=1,keepdims=True)
 latend_id = latend_id.to('cuda')