未验证 提交 0ededf12 编写于 作者: Q Qdriving 提交者: GitHub

Length of hist_item_seq[batch_size][i] error

The condition that max length of hist_item_seq[batch_size][i] == 1 is not covered. But it is happened when I run the baseline of dien model.
上级 5f7ffbc2
...@@ -229,6 +229,10 @@ class Model(ModelBase): ...@@ -229,6 +229,10 @@ class Model(ModelBase):
neg_seq_pad, _ = fluid.layers.sequence_pad(neg_reshape_hist_item_emb, neg_seq_pad, _ = fluid.layers.sequence_pad(neg_reshape_hist_item_emb,
pad_value) pad_value)
seq_shape = fluid.layers.shape(pos_seq_pad) seq_shape = fluid.layers.shape(pos_seq_pad)
if(seq_shape[1] < 2):
aux_loss = 0
else:
test_pos = fluid.layers.reduce_sum( test_pos = fluid.layers.reduce_sum(
fluid.layers.reduce_sum( fluid.layers.reduce_sum(
fluid.layers.log( fluid.layers.log(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册