425 Star 4.3K Fork 423

GVPPaddlePaddle / Paddle

 / 详情

Add a cross entropy beam layer for learning to search model.

已完成
创建于  
2021-03-25 21:56

源自github用户lcy-seso:

  • This layer is used in learning to search models, which is to solve complex joint prediction problems based on learning to search through a problem-defined search space.

    1. Specifically, the learning to search process for this layer begins with searching a target sequence from a nested sequence. In the first search step, top beam size sequences with highest scores, indices of these top k sequences in the original nested sequence, and the ground truth (also called gold) altogether (a triple) make up of the first beam.

    2. Then, several special positions, for example, start and end positions that define meaningful segments are searched. In these searches, top k positions with highest scores are selected, and then sequence, starting from the selected starts till ends of the sentences (or any fixed position) are taken to search next.

    3. We call the possible top k results returned in one search the beam. This search process can be repeated for pre-defined turns and leads to several beam expansions.

    4. Finally, the layer cross_entropy_over_beam takes all the beam expansions which contain several candidate targets found along the multi-step search process. cross_entropy_over_beam calculates cross entropy over the expanded beams with all the candidates in the beam as the normalized factor.

    5. Note that, if gold falls off the beam at search step $t$, then the cost is calculated over the beam at step $t$.

    6. This cost layer always works together with kmax_sequence_score_layer, sub_nested_seq_layer, and sequence_slice_layer to trim the input to form a sub-search space.

评论 (0)

PaddlePaddle-Gardener 创建了任务
PaddlePaddle-Coordinator 任务状态待办的 修改为已完成
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Python
1
https://gitee.com/paddlepaddle/Paddle.git
git@gitee.com:paddlepaddle/Paddle.git
paddlepaddle
Paddle
Paddle

搜索帮助