-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
panic: index out of range #208
Comments
Hello! I have the same error, have you found the solution? I can not identify where the problem is. |
I am running into the same issue - I guess 209 is just a copy of it. |
I found 184 also ran into the issue. As this is long ago with no solution i guess there is no known fix to it. |
It might help to know that s is of length 0 in func (e StdEng) makeArray(arr *array, t Dtype, size int) {
memsize := calcMemSize(t, size)
s := make([]byte, memsize)
arr.t = t
arr.L = size
arr.C = size
arr.Ptr = unsafe.Pointer(&s[0])
arr.fix()
} So this is why The depending project knows of the issue from tests but seems to regard this as an artifact. Thus I presume |
output:
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
gorgonia.org/tensor.StdEng.makeArray({{}}, 0xc00015adb8, {{0x831c20?, 0x721f60?}}, 0x0)
D:/golangdev/work/pkg/mod/gorgonia.org/[email protected]/defaultengine.go:22 +0xec
gorgonia.org/tensor.(*Dense).makeArray(0xc00015ad80, 0x0)
D:/golangdev/work/pkg/mod/gorgonia.org/[email protected]/dense.go:87 +0xe2
gorgonia.org/tensor.(*Dense).fix(0xc00015ad80)
D:/golangdev/work/pkg/mod/gorgonia.org/[email protected]/dense.go:292 +0x1c5
gorgonia.org/tensor.New({0xc001cb4920, 0x3, 0x1?})
D:/golangdev/work/pkg/mod/gorgonia.org/[email protected]/tensor.go:93 +0xb8
github.com/owulveryck/onnx-go/internal/onnx/ir.(*TensorProto).Tensor(0xc000141e60)
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/internal/onnx/ir/tensor.go:51 +0x5e5
github.com/owulveryck/onnx-go.toOperationAttribute(0xc0000c6100)
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/attributes.go:30 +0x109
github.com/owulveryck/onnx-go.toOperationAttributes({0xc00000a710, 0x1, 0xc0000afbf0?})
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/attributes.go:10 +0x6c
github.com/owulveryck/onnx-go.(*Model).applyModelProtoGraphNodeOperations(0xc00010bce0, 0xc000100500?)
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/decoder.go:235 +0x10d
github.com/owulveryck/onnx-go.(*Model).applyModelProtoGraph(0xc00010bce0, 0xc000132210)
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/decoder.go:149 +0x299
github.com/owulveryck/onnx-go.(*Model).decodeProto(0xc000198000?, 0x1b0853b?)
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/decoder.go:112 +0x105
github.com/owulveryck/onnx-go.(*Model).UnmarshalBinary(0x7a3222?, {0xc000198000, 0x1b0853b, 0x1b0853c})
D:/golangdev/work/pkg/mod/github.com/owulveryck/[email protected]/decoder.go:38 +0x75
main.getONNXInputSize({0x7a3222, 0x24})
D:/GolangDev/learnings/testGoCV/yolov3.go:256 +0x277
main.testYolo()
D:/GolangDev/learnings/testGoCV/yolov3.go:27 +0x3a
main.main()
D:/GolangDev/learnings/testGoCV/main.go:27 +0x17
exit status 2
The text was updated successfully, but these errors were encountered: