没有 'gradient_clip_attr'
波波安827 发布于2020-08-01 08:22 浏览:240 回复:1
0
收藏

all last) in
11 feature=feature_map, #输入的特征矩阵
12 num_classes=dataset.num_labels, #分类任务的类别数量
---> 13 config=config) #运行配置
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/classifier_task.py in __init__(self, feature, num_classes, feed_list, data_reader, startup_program, config, hidden_units, metrics_choices)
47 main_program = feature.block.program
48 super(ClassifierTask, self).__init__(
---> 49 data_reader=data_reader,
50 main_program=main_program,
51 feed_list=feed_list,
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py in __init__(self, feed_list, data_reader, main_program, startup_program, config, metrics_choices)
296
297 else:
--> 298 self._base_main_program = clone_program(
299 main_program, for_test=False)
300 if startup_program is None:
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py in clone_program(origin_program, for_test)
272
273 def clone_program(origin_program, for_test=False):
--> 274 dest_program = fluid.Program()
275 _copy_vars_and_ops_in_blocks(origin_program.global_block(),
276 dest_program.global_block())
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py in _copy_vars_and_ops_in_blocks(from_block, to_block)
145
146 def _copy_vars_and_ops_in_blocks(from_block, to_block):
--> 147 for var in from_block.vars:
148 var = from_block.var(var)
149 var_info = copy.deepcopy(get_variable_info(var))
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/common/paddle_helper.py in get_variable_info(var)
63 var_info['trainable'] = var.trainable
64 var_info['optimize_attr'] = var.optimize_attr
---> 65 var_info['regularizer'] = var.regularizer
66 if not version_compare(paddle.__version__, '1.8'):
67 var_info['gradient_clip_attr'] = var.gradient_clip_attr
AttributeError: 'Parameter' object has no attribute 'gradient_clip_attr'

 

将paddlepaddle升级到1.8.1, paddlehub升级到1.7.0也不管用,怎么解决?

收藏
点赞
0
个赞
共1条回复 最后由波波安827回复于2020-08-01 08:37
#2波波安827回复于2020-08-01 08:37:38

重启一下notebook,可以解决

0
TOP
切换版块