TypeError: load() got an unexpected keyword argument 'var_list'
Created by: Mintcat10
1.错误
你好,我在使用NeXtVLAD预训练权重预测的时候出现下面错误:
Traceback (most recent call last):
File "predict.py", line 200, in <module>
infer(args)
File "predict.py", line 131, in infer
fluid.default_main_program(), place)
File "E:\20200328_img_text\NeXtVLAD\models-develop\PaddleCV\video\models\model.py", line 158, in load_test_weights
fluid.load(prog, weights, executor=exe, var_list=params_list)
TypeError: load() got an unexpected keyword argument 'var_list'
2.运行及版本情况
- 目前使用paddle的版本:
paddlepaddle-gpu 1.6.3.post97
-
运行代码来自:链接
-
运行命令如下:
python predict.py --model_name=NEXTVLAD --config=configs/nextvlad.yaml --log_interval=1 --weights=./data/model/NEXTVLAD.pdparams --filelist=./data/dataset/youtube8m/infer.list --use_gpu=True
3问题
想问一下是什么原因导致的?
PS
查看了源代码 model文件
def load_test_weights(self, exe, weights, prog, place):
params_list = list(filter(is_parameter, prog.list_vars()))
fluid.load(prog, weights, executor=exe, var_list=params_list)
源代码: Anaconda4.2\envs\Python36\Lib\site-packages\paddle\fluid\io.py
def load(program, model_path, executor=None):
需要哪个版本的paddle才能兼容?