Nlp 在tensor2tensor中运行示例项目

Nlp 在tensor2tensor中运行示例项目,nlp,tensor2tensor,Nlp,Tensor2tensor,我正在尝试从以下位置在windows pc上执行程序: 我试图首先生成数据。但是这个命令不起作用 \Anaconda3\Scripts> python .\t2t-datagen --t2t_usr_dir=C:\Users\NLP\t2t-poetry --problem=PoetryLineProblem --data_dir=.\t2t_data --tmp-dir=C:\Userst2t-poetry\tmp 它给出了一个错误: Anaconda3\lib\site-packa

我正在尝试从以下位置在windows pc上执行程序:

我试图首先生成数据。但是这个命令不起作用

\Anaconda3\Scripts> python .\t2t-datagen --t2t_usr_dir=C:\Users\NLP\t2t-poetry --problem=PoetryLineProblem --data_dir=.\t2t_data --tmp-dir=C:\Userst2t-poetry\tmp
它给出了一个错误:

Anaconda3\lib\site-packages\tensor2tensor\bin\t2t_datagen.py", line 196, in main
    raise ValueError(error_msg)
ValueError: You must specify one of the supported problems to generate data for:
  * algorithmic_addition_binary40
  * algorithmic_addition_decimal40
看来问题并没有解决。 我确实有链接中提到的代码:

相同代码:

@registry.register_problem
class PoetryLineProblem(text_problems.Text2TextProblem):
  """Predict next line of poetry from the last line. From Gutenberg texts."""

  @property
  def approx_vocab_size(self):
    return 2**13  # ~8k
我在..\t2t poetry\trainer\problem.py上有此文件


您能告诉我我缺少什么吗。

必须在snake_案例中指定问题名称。 从CamelCase到snake_的转换,即PoetryLine问题到PoetryLine问题