TextGenerator
TextGenerator copied to clipboard
渲染有bug,dropout掉的内容未从标签中剔除
core/layout/init.py中添加: waiting_removing = [] # 添加 for block in self.block_list: if np.random.rand() < dropout: log.info('dropout incurred. ') waiting_removing.append(block) # 添加 continue
block渲染完后删除dropout掉的标签: for wr in waiting_removing: self.block_list.remove(wr)
我debug 下,欢迎pr 哈