繁体   English   中英

使用 Pegasus 实现迁移学习进行文本摘要生成垃圾字符

[英]Implementing Transfer Learning using Pegasus for Text Summarization generating junk characters

我一直在尝试使用Pegasus 库并按照上述步骤生成摘要 -

  1. .tfrecord pegasus\\data\\testdata创建输入数据.tfrecord
  2. 创建一个函数返回transformer_params命名test_transformers (假设)
  3. 运行python3 pegasus/bin/train.py --params=test_transformer --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model,batch_size=1,beam_size=5,beam_alpha=0.6 --model_dir=ckpt/pegasus_ckpt/xsum/model.ckpt-30000
  4. python3 pegasus/bin/evaluate.py --params=test_transformer --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model,batch_size=1,beam_size=5,beam_alpha=0.6 --model_dir=ckpt/pegasus_ckpt/xsum/model.ckpt-30000

但是,当我生成文本时,我在输出中遇到了这个问题 -

输出有垃圾

它的实现方式或我在第 3 步和第 4 步中运行 python 代码的方式是否存在问题?

提前致谢 !

这是已关闭问题链接

突出显示此问题的原因是:-

1. --model_dir is typically a directory instead of a particular checkpoint. 
   -> Try changing model_dir to actual model directory instead of checkpoint
2. It seems there are only 100 training steps. 
   -> Try changing "train_steps": 100

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM