运行视频分类标签基线模型时,生成分类标签结果出错,请各位高手帮忙看看这是什么原因?
错误信息如下:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/tmp/ipykernel_176/3318158451.py in
124 args.label_file = '/home/aistudio/paddle-video-classify-tag/data/level1_label.txt'
125 args.save_file = 'level1_top1.json'
--> 126 infer(args)
127
128 # 二级标签
/tmp/ipykernel_176/3318158451.py in infer(args)
77
78 infer_model.load_test_weights(exe, weights,
---> 79 paddle.static.default_main_program())
80
81 infer_feeder = paddle.fluid.DataFeeder(place=place, feed_list=infer_feeds)
~/work/paddle-video-classify-tag/models/model.py in load_test_weights(self, exe, weights, prog)
156 def load_test_weights(self, exe, weights, prog):
157 params_list = list(filter(is_parameter, prog.list_vars()))
--> 158 paddle.static.load(prog, weights, executor=exe, var_list=params_list)
159
160 def get_config_from_sec(self, sec, item, default=None):
in load(program, model_path, executor, var_list)
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/wrapped_decorator.py in __impl__(func, *args, **kwargs)
23 def __impl__(func, *args, **kwargs):
24 wrapped_func = decorator_func(func)
---> 25 return wrapped_func(*args, **kwargs)
26
27 return __impl__
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py in __impl__(*args, **kwargs)
232 assert not in_dygraph_mode(
233 ), "In PaddlePaddle 2.x, we turn on dynamic graph mode by default, and '%s()' is only supported in static graph mode. So if you want to use this api, please call 'paddle.enable_static()' before this api to enter static graph mode." % func.__name__
--> 234 return func(*args, **kwargs)
235
236 return __impl__
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/io.py in load(program, model_path, executor, var_list)
2023 assert v.name in load_dict, \
2024 "Can not find [{}] in model file [{}]".format(
-> 2025 v.name, parameter_file_name)
2026 set_var(v, load_dict[v.name])
2027
AssertionError: Can not find [rgb_fc.w_1] in model file [/home/aistudio/paddle-video-classify-tag/data/checkpoints/level1/AttentionLSTM_epoch2.pdparams]
同问,咋解的