Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleHub
  • Issue
  • #789

P
PaddleHub
  • 项目概览

PaddlePaddle / PaddleHub
大约 2 年 前同步成功

通知 285
Star 12117
Fork 2091
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 200
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 4
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PaddleHub
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 200
    • Issue 200
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 4
    • 合并请求 4
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 7月 31, 2020 by saxon_zh@saxon_zhGuest

senta_bilstm 在fine-tune的时候报错

Created by: wjmzjx

版本信息: paddle.version '1.8.3' paddlehub.version '1.8.0' win10

在运行PaddleHub/demo/senta/senta_finetune.py时报错

Error Message Summary:

InvalidArgumentError: The Tensor in the squeeze2 Op's Input Variable X(seq_len) is not initialized. [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] at (D:\1.8.3\paddle\paddle\fluid\framework\operator.cc:1289) [operator < squeeze2 > error]

Process finished with exit code 1

完整报错信息如下: E:\gl\sf\envs\python36\python.exe E:/Ss_working/Python_workSpace/fastNPLtest/check_pkg.py [2020-07-31 15:42:20,413] [ INFO] - Installing senta_bilstm module [2020-07-31 15:42:20,495] [ INFO] - Module senta_bilstm already installed in C:\Users\Administrator.paddlehub\modules\senta_bilstm [2020-07-31 15:42:23,655] [ INFO] - Dataset C:\Users\Administrator.paddlehub\dataset\chnsenticorp already cached. [2020-07-31 15:42:23,792] [ INFO] - Dataset label map = {'0': 0, '1': 1} [2020-07-31 15:42:23,792] [ INFO] - Installing lac module [2020-07-31 15:42:23,794] [ INFO] - Module lac already installed in C:\Users\Administrator.paddlehub\modules\lac [2020-07-31 15:42:26,467] [ WARNING] - The parameter use_pyreader has been dropped! PaddleHub over v1.8.0 will use pyreader by default. [2020-07-31 15:42:26,467] [ INFO] - Checkpoint dir: ckpt_20200731154226 !!! The CPU_NUM is not specified, you should set CPU_NUM in the environment variable list. CPU_NUM indicates that how many CPUPlace are used in the current task. And if this parameter are set as N (equal to the number of physical CPU core) the program may be faster.

export CPU_NUM=8 # for example, set CPU_NUM as number of physical CPU core which is 8.

!!! The default number of CPU_NUM=1. [2020-07-31 15:42:26,546] [ INFO] - processing train data now... this may take a few minutes E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\clip.py:779: UserWarning: Caution! 'set_gradient_clip' is not recommended and may be deprecated in future! We recommend a new strategy: set 'grad_clip' when initializing the 'optimizer'. This method can reduce the mistakes, please refer to documention of 'optimizer'. warnings.warn("Caution! 'set_gradient_clip' is not recommended " [2020-07-31 15:43:01,224] [ INFO] - Strategy with warmup, linear decay, slanted triangle learning rate, weight decay regularization, E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py:1093: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used. warnings.warn(error_info) [2020-07-31 15:43:01,225] [ INFO] - Try loading checkpoint from ckpt_20200731154226\ckpt.meta [2020-07-31 15:43:01,225] [ INFO] - PaddleHub model checkpoint not found, start from scratch... [2020-07-31 15:43:01,570] [ INFO] - PaddleHub finetune start E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py:1070: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "E:/Ss_working/Python_workSpace/fastNPLtest/check_pkg.py", line 52, in cls_task.finetune_and_eval() File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 945, in finetune_and_eval return self.finetune(do_eval=True) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 966, in finetune run_states = self._run(do_eval=do_eval) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 1212, in _run return_numpy=self.return_numpy) File "E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py", line 1071, in run six.reraise(*sys.exc_info()) File "E:\gl\sf\envs\python36\lib\site-packages\six.py", line 703, in reraise raise value File "E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py", line 1066, in run return_merged=return_merged) File "E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py", line 1154, in _run_impl use_program_cache=use_program_cache) File "E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\executor.py", line 1229, in _run_program fetch_var_name) paddle.fluid.core_avx.EnforceNotMet:


C++ Call Stacks (More useful to developers):

Windows not support stack backtrace yet.


Python Call Stacks (More useful to users):

File "E:\gl\sf\envs\python36\lib\site-packages\paddle\fluid\framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\common\paddle_helper.py", line 191, in _copy_vars_and_ops_in_blocks to_block.append_op(**op_info) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\common\paddle_helper.py", line 299, in clone_program dest_program.global_block()) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 413, in _build_env self._base_main_program, for_test=False) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 545, in main_program self._build_env() File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 911, in load_checkpoint main_program=self.main_program) File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 384, in init_if_necessary if not self.load_checkpoint(): File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 960, in finetune self.init_if_necessary() File "E:\gl\sf\envs\python36\lib\site-packages\paddlehub\finetune\task\base_task.py", line 945, in finetune_and_eval return self.finetune(do_eval=True) File "E:/Ss_working/Python_workSpace/fastNPLtest/check_pkg.py", line 52, in cls_task.finetune_and_eval()


Error Message Summary:

InvalidArgumentError: The Tensor in the squeeze2 Op's Input Variable X(seq_len) is not initialized. [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] at (D:\1.8.3\paddle\paddle\fluid\framework\operator.cc:1289) [operator < squeeze2 > error]

Process finished with exit code 1

此外 senta_finetune.py中将feed_list = [inputs["words"].name]改动为feed_list = [inputs["text"].name] 不然报错 Traceback (most recent call last): File "E:/Ss_working/Python_workSpace/fastNPLtest/check_pkg.py", line 30, in feed_list = [inputs["words"].name] KeyError: 'words'

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleHub#789
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7