ERNIE2报错float() argument
嘤shao12138 发布于2020-03 浏览:1058 回复:2
0
收藏

我的项目在Finetune过程报错如下:但是使用ERNIE模型没有报错,使用ERNIE2报错

/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/strategy.py in execute(self, loss, data_reader, config, dev_count)
481
482 # handle scheduler
--> 483 scheduled_lr = self.scheduler_handler(max_train_steps)
484
485 # handle clip
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/strategy.py in scheduler_handler(self, max_train_steps)
316 dtype='float32',
317 persistable=True,
--> 318 name="learning_rate")
319
320 warmup_steps = int(max_train_steps * self.scheduler["warmup"])
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/tensor.py in create_global_var(shape, value, dtype, persistable, force_cpu, name)
145 helper.set_variable_initializer(
146 var, initializer=Constant(
--> 147 value=float(value), force_cpu=force_cpu))
148
149 return var
TypeError: float() argument must be a string or a number, not 'Variable'

收藏
点赞
0
个赞
共2条回复 最后由新来的贫僧回复于2020-10
#10新来的贫僧回复于2020-10

等几秒再点下, 自己就好了, 猜测可能和gpu分配有关

0
#2fly寂寞的季末回复于2020-04

俺也一样 所以怎么解决的呀后来

0
快速回复
TOP
切换版块