-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
训练实例分割时发现一下错误(InvalidArgument) Broadcast dimension mismatch #19
Comments
能提供一部分数据集样例吗,你使用的什么paddle版本 |
Validating runs/train-seg/exp2/weights/best.pdparams... |
Traceback (most recent call last): |
您好 训练使用的动态度可以改成静态图训练吗? |
不能哦 |
导出的模型可以是静态图模型吗? |
您好,我在训练实例分割时发现一下错误,排查数据正常用pytorch版训练也正常,麻烦您帮忙看一下问题是否有解决办法,谢谢。
Traceback (most recent call last):
File "segment/train.py", line 663, in
main(opt)
File "segment/train.py", line 554, in main
train(opt.hyp, opt, device, callbacks)
File "segment/train.py", line 309, in train
loss, loss_items = compute_loss(pred, targets, masks=masks.astype("float32"))
File "/home/qwe/FRN/yolov5-Paddle-main/utils/segment/loss.py", line 47, in call
tcls, tbox, indices, anchors, tidxs, xywhn = self.build_targets(p, targets) # targets
File "/home/qwe/FRN/yolov5-Paddle-main/utils/segment/loss.py", line 159, in build_targets
gxi = gain[[2, 4]] - gxy # inverse
File "/home/qwe/.local/lib/python3.8/site-packages/paddle/fluid/dygraph/math_op_patch.py", line 304, in impl
return math_op(self, other_var, -1)
ValueError: (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [2] and the shape of Y = [0, 2, 8]. Received [2] in X is not equal to [8] in Y at i:2.
[Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /paddle/paddle/phi/kernels/funcs/common_shape.h:84)
The text was updated successfully, but these errors were encountered: