我正在尝试从以下位置在我的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
你能让我知道我错过了什么吗?
发布于 2020-05-24 15:37:42
问题名称必须在snake_case中指定。从CamelCase转换为snake_case,即从PoetryLineProblem转换为poetry_line_problem
https://stackoverflow.com/questions/58041731
复制相似问题