在复现PDFormer: Propagation Delay-aware Dynamic Long-range Transformer for Traffic Flow Prediction这篇文章的模型,环境和库都配好了,遇到了上面的报错
完整报错:(不知道怎么改成报错的形式,先这样放上来吧)
D:\anaconda\envs\py397\python.exe D:\PDFormer\PDFormer-master\run_model.py
Traceback (most recent call last):
File "D:\PDFormer\PDFormer-master\run_model.py", line 52, in <module>
run_model(task=args.task, model_name=args.model, dataset_name=args.dataset,
File "D:\PDFormer\PDFormer-master\libcity\pipeline\pipeline.py", line 20, in run_model
config = ConfigParser(task, model_name, dataset_name,
File "D:\PDFormer\PDFormer-master\libcity\config\config_parser.py", line 13, in __init__
self._load_default_config()
File "D:\PDFormer\PDFormer-master\libcity\config\config_parser.py", line 59, in _load_default_config
raise ValueError('task {} do not support model {}'.format(
ValueError: task traffic_state_pred do not support model GRU
找到报错的那一行代码是这样的:
if self.config['model'] not in task_config['allowed_model']:
raise ValueError('task {} do not support model {}'.format(
self.config['task'], self.config['model']))
model = self.config['model']
代码包里面config里确实只有PDFormer没有GRU
不知道有没有大佬帮忙解决一下