|
@@ -265,8 +265,7 @@ if __name__ == "__main__":
|
|
|
|
|
|
item_embs = item_embedding_model.predict(all_item_model_input, batch_size=2 ** 12)
|
|
|
|
|
|
- # #### 得到user embedding
|
|
|
-
|
|
|
+ # 得到user embedding
|
|
|
user_layer_model = tf.keras.models.Model(
|
|
|
inputs=[model.user_input],
|
|
|
# outputs=model.get_layer("user_embedding").output
|
|
@@ -275,7 +274,7 @@ if __name__ == "__main__":
|
|
|
|
|
|
user_embeddings = []
|
|
|
|
|
|
- # #### 得到video embedding
|
|
|
+ # 得到video embedding
|
|
|
video_layer_model = tf.keras.models.Model(
|
|
|
inputs=[model.item_input],
|
|
|
# outputs=model.get_layer("item_embedding").output
|
|
@@ -292,7 +291,6 @@ if __name__ == "__main__":
|
|
|
np.reshape(row["videoGenre1"], [1, 1]),
|
|
|
# np.reshape(row["videoGenre2"], [1, 1]),
|
|
|
np.reshape(row["authorid"], [1, 1]),
|
|
|
- #
|
|
|
np.reshape(row["videoRealPlayCount"], [1, 1]),
|
|
|
np.reshape(row["videoDuration"], [1, 1])
|
|
|
]
|