63 Star 673 Fork 259

PaddlePaddle / PaddleDetection

 / 详情

swin改ppyoloe:Variable dtype not match, Variable [ auto_16_ ] need tensor with dtype paddle.int64 but load tensor with dtype paddle.float32

待办的
创建于  
2024-01-10 10:04

问题确认 Search before asking

  • 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

Training、Validation

Bug描述 Describe the Bug

<class 'dict'>
Traceback (most recent call last):
File "tools/train.py", line 172, in
main()
File "tools/train.py", line 168, in main
run(FLAGS, cfg)
File "tools/train.py", line 132, in run
trainer.train(FLAGS.eval)
File "/home/aistudio/work/PaddleDetection/ppdet/engine/trainer.py", line 537, in train
self.model.set_dict(self.ema.apply())
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 486, in wrapper
return func(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 1496, in set_state_dict
param.set_value(state)
File "", line 2, in set_value
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 434, in impl
return func(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/varbase_patch_methods.py", line 188, in set_value
self.name, self.dtype, dtype)
AssertionError: Variable dtype not match, Variable [ auto_16_ ] need tensor with dtype paddle.int64 but load tensor with dtype paddle.float32

复现环境 Environment

paddlepaddle:2.5.2
paddledetection:release/2.6
python:3.10.10
cuda:11.3
cudnn:8.4

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!

评论 (0)

赵勇彪 创建了任务
赵勇彪 添加了
 
bug
标签
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Python
1
https://gitee.com/paddlepaddle/PaddleDetection.git
git@gitee.com:paddlepaddle/PaddleDetection.git
paddlepaddle
PaddleDetection
PaddleDetection

搜索帮助