-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Split] The split values of Split are changed when I use the post_process_transpose_perm option. #290
Comments
No. The internal process is too complex to explain to you. If I were you, I would try to verify the following, {
"op_name": "Reshape_191",
"param_target": "outputs",
"param_name": "value",
"post_process_transpose_perm": [0,2,3,1]
},
{
"op_name": "Split_224",
"param_target": "inputs",
"param_name": "value",
"pre_process_transpose_perm": [x,x,x,x]
}, or {
"op_name": "Reshape_191",
"param_target": "outputs",
"param_name": "value",
"post_process_transpose_perm": [0,2,3,1]
},
{
"op_name": "Split_224",
"param_target": "attributes",
"param_name": "axis",
"values": 3
},
{
"op_name": "Split_224",
"param_target": "inputs",
"param_name": "value",
"pre_process_transpose_perm": [x,x,x,x]
}, etc... Btw, Splits of |
Hi, @PINTO0309 . Thank you for your hard work. I was able to solve the problem by using And, I use a multi-scale feature map. The scales of the multi-scale feature map are |
A creative change of mindset is needed. Simply replace
The best advice I can give you is to always specify the start and end positions numerically when slicing. If the end index is unspecified, the maximum value of INT64, Deprecated operations
The above is my meddling advice for your future model design. onnx2tf automatically tries to replace the above Tools cannot understand the intentions of the person who designed the model, so it is best not to rely on tools for everything. |
As you advised, I made some changes to the script. I can't see any errors related to the Beforevalue_list = value.split([int(H_ * W_) for (H_, W_) in value_spatial_shapes], dim=1) After start_idx = []
for idx, (H_, W_) in enumerate(value_spatial_shapes):
tmp = int(H_ * W_)
if len(start_idx) > 0:
tmp += start_idx[idx-1]
start_idx.append(tmp)
value_list = [
value[:,0:start_idx[0],:,:],
value[:,start_idx[0]:start_idx[1],:,:],
value[:,start_idx[1]:start_idx[2],:,:],
value[:,start_idx[2]:start_idx[3],:,:],
] |
Issue Type
Others
onnx2tf version number
1.8.15
onnx version number
1.13.1
tensorflow version number
2.12.0
Download URL for ONNX
https://drive.google.com/file/d/1V0y-vElMeTIBf8Ft3Y-gN2KafIXCL2hM/view?usp=sharing
Parameter Replacement JSON
replace.json
Description
When using the
post_process_transpose_perm
option in an OP that is placed in front of a Slice OP, the split values of Slice are also changed.For example:
When I'm changing the output format of
Reshape_191
to(0,2,3,1)
, the split values ofSplit_224
are also changed to[8352, 522, 135, 2088]
Is this a bug?
The text was updated successfully, but these errors were encountered: