Open Echo0117 opened 4 years ago
用的是哪个模型,可以把报错那部分具体的代码看下吗?
之前的问题已经解决了,谢谢~ 我想再请问一下,paddle 1.8 会更新能支持 cuda 10.2 的版本吗,有的话大概是什么时候呢?
haoyuying notifications@github.com 于2020年10月28日周三 上午11:03写道:
用的是哪个模型,可以把报错那部分具体的代码看下吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaddlePaddle/PaddleHub/issues/986#issuecomment-717665102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4PIUJYM6HDNQYBXR4F7PLSM6CXFANCNFSM4TAWE6UA .
使用 paddlehub 里的 autoFinetune 报错,paddlepaddle = 1.8.4,paddlehub = 1.8.1 这个是 multi_label_classification 的训练任务,我不用 autoFinetune 是可以正常运行的,加上 autoFinetune 的代码就报错了,日志里面输出的是这个信息:
Python Call Stacks (More useful to users):
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/loss.py", line 279, in cross_entropy2 attrs=attrs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/loss.py", line 241, in cross_entropy return cross_entropy2(input, label, ignore_index) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/classifier_task.py", line 84, in _add_loss input=self.outputs[0], label=self.labels[0]) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 422, in _build_env self.env.loss = self._add_loss() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 545, in main_program self._build_env() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 911, in load_checkpoint main_program=self.main_program) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 384, in init_if_necessary if not self.load_checkpoint(): File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 960, in finetune self.init_if_necessary() File "./text_cls_re.py", line 161, in
cls_task.finetune()
Error Message Summary:
InvalidArgumentError: the last dimension of Input(Label) should be 1.But received: the last dimension of Input(Label) is [28],the last dimension is [1] [Hint: Expected label_dims[rank - 1] == 1UL, but received label_dims[rank - 1]:28 != 1UL:1.] at (/paddle/paddle/fluid/operators/cross_entropy_op.cc:87) [operator < cross_entropy2 > error]