CentOS7.6 中 Fine-tune保存的模型转化为一个PaddleHub Module报错
Created by: zhuyingjun-zyj
输入命令:hub install /home/EmotionalAnalysis ( /home/esoonProject/EmotionalAnalysis为路径)
报错:
Traceback (most recent call last): File "/usr/local/python3/bin/hub", line 8, in sys.exit(main()) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/commands/hub.py", line 64, in main command.execute(argv[1:]) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/commands/hub.py", line 51, in execute return command.execute(argv[1:]) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/commands/install.py", line 54, in execute module_dir=argv[0], extra=extra) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/module/manager.py", line 197, in install_module module_name = hub.Module(directory=module_dir).name File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/module/module.py", line 104, in new module = cls.init_with_directory(directory=directory, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/module/module.py", line 199, in init_with_directory user_module = _item(directory=directory, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/module/module.py", line 145, in init self._initialize(**kwargs) File "/home/esoonProject/EmotionalAnalysis/module.py", line 92, in _initialize metrics_choices=metrics_choices) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/finetune/task/classifier_task.py", line 179, in init metrics_choices=metrics_choices) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/finetune/task/classifier_task.py", line 49, in init metrics_choices=metrics_choices) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 299, in init main_program, for_test=False) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py", line 274, in clone_program dest_program.global_block()) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py", line 147, in _copy_vars_and_ops_in_blocks var_info = copy.deepcopy(get_variable_info(var)) File "/usr/local/python3/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py", line 65, in get_variable_info var_info['gradient_clip_attr'] = var.gradient_clip_attr AttributeError: 'Parameter' object has no attribute 'gradient_clip_attr' ,希望老师帮忙解答一下