often 5 månader sedan
förälder
incheckning
4a1ba24fe6
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      recommend-model-produce/src/main/python/models/dssm/net.py

+ 5 - 5
recommend-model-produce/src/main/python/models/dssm/net.py

@@ -100,18 +100,18 @@ class DSSMLayer(nn.Layer):
 
     def forward(self, left_features, right_features):
         # 获取两个视频的特征表示
-        #paddle.static.Print(left_features, message="lqc left model input shape:")
-        #paddle.static.Print(right_features, message="lqc right model input shape:")        
+        paddle.static.Print(left_features, message="lqc left model input shape:")
+        paddle.static.Print(right_features, message="lqc right model input shape:")        
         left_vec, right_vec = self.get_vectors(left_features, right_features)
-        #paddle.static.Print(left_vec, message="lqc left model output shape:")
-        #paddle.static.Print(right_vec, message="lqc right model output shape:")
+        paddle.static.Print(left_vec, message="lqc left model output shape:")
+        paddle.static.Print(right_vec, message="lqc right model output shape:")
         # 计算相似度
         sim_score = F.cosine_similarity(
             left_vec, 
             right_vec, 
             axis=1
         ).reshape([-1, 1])
-
+        paddle.static.Print(sim_score, message="lqc sim_score shape:")
         return sim_score, left_vec, right_vec
 
     def get_vectors(self, left_features, right_features):