提交 42f9ba10 编写于 作者: X xixiaoyao

fix bugs

上级 ada30bc3
...@@ -57,6 +57,7 @@ class TaskParadigm(task_paradigm): ...@@ -57,6 +57,7 @@ class TaskParadigm(task_paradigm):
# 多任务学习时才需要引入这个,防止其他run其他任务时导致seqlen过小,gather超范围 # 多任务学习时才需要引入这个,防止其他run其他任务时导致seqlen过小,gather超范围
max_position = inputs["reader"]["batchsize_x_seqlen"] - 1 max_position = inputs["reader"]["batchsize_x_seqlen"] - 1
mask_pos = fluid.layers.elementwise_min(mask_pos, max_position) mask_pos = fluid.layers.elementwise_min(mask_pos, max_position)
mask_pos.stop_gradient = True
word_emb = inputs["backbone"]["embedding_table"] word_emb = inputs["backbone"]["embedding_table"]
enc_out = inputs["backbone"]["encoder_outputs"] enc_out = inputs["backbone"]["encoder_outputs"]
......
...@@ -80,6 +80,8 @@ class TaskParadigm(task_paradigm): ...@@ -80,6 +80,8 @@ class TaskParadigm(task_paradigm):
max_position = inputs["reader"]["seqlen"] - 1 max_position = inputs["reader"]["seqlen"] - 1
start_positions = fluid.layers.elementwise_min(start_positions, max_position) start_positions = fluid.layers.elementwise_min(start_positions, max_position)
end_positions = fluid.layers.elementwise_min(end_positions, max_position) end_positions = fluid.layers.elementwise_min(end_positions, max_position)
start_positions.stop_gradient = True
end_positions.stop_gradient = True
else: else:
unique_id = inputs['reader']['unique_ids'] unique_id = inputs['reader']['unique_ids']
......
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
while true python -u demo2.py
do
python -u demo2.py
done
# GLOG_vmodule=lookup_table_op=4 python -u demo2.py > debug2.log 2>&1 # GLOG_vmodule=lookup_table_op=4 python -u demo2.py > debug2.log 2>&1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册