Skip to content

Conversation

shinh
Copy link
Collaborator

@shinh shinh commented Sep 21, 2018

As per the documentation of the operator, output_shape seems
to expect the same rank as other attributes such as strides
or pads. In other words, output_shape should not have
dimensions for batch size and number of channels. So this
changes output_shape from [1, 2, 10, 8] to [10, 8] for the
2D ConvTranspose.

Note that test_convtranspose_kernel_shape, the other test which
uses output_shape, is already OK.

As per the documentation of the operator, `output_shape` seems
to expect the same rank as other attributes such as `strides`
or `pads`. In other words, `output_shape` should not have
dimensions for batch size and number of channels. So this
changes `output_shape` from [1, 2, 10, 8] to [10, 8] for the
2D ConvTranspose.

Note that test_convtranspose_kernel_shape, the other test which
uses `output_shape`, is already OK.
@CLAassistant
Copy link

CLAassistant commented Sep 21, 2018

CLA assistant check
All committers have signed the CLA.

@shinh
Copy link
Collaborator Author

shinh commented Sep 21, 2018

I failed to get an attention in #1158 so decided to send a PR to see if my understanding is right. Comments are welcomed, thanks!

Copy link
Contributor

@zrphercule zrphercule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi shinh! Sorry didnt reply you in #1158 .

I have reviewed your commit, and it seems you are right. Altought whether to use the full shape(NCHW instead of HW) is still considerable now, it does not make sense if there is inconsistency.

Could you please update the document by running

onnx/defs/gen_doc.py
onnx/gen/proto.py (I guess you dont have to run this)
onnx/backend/test/stat_coverage.py

and also upload new test data for convtranspose?

Thanks for your contribution to ONNX!

@shinh
Copy link
Collaborator Author

shinh commented Sep 22, 2018

Thanks for your quick review! I've updated those documents. I think my original commit had updated model.onnx and test_data_set_0 was unchanged since this PR changes inputs/outputs. I've just double-checked there are no update by doing

$ cd onnx/backend/test
$ python3 cmd_tools.py generate-data -o /tmp/onnx
$ cp -r /tmp/onnx/node/test_convtranspose* data/node/
$ git diff  # no update

@shinh
Copy link
Collaborator Author

shinh commented Sep 22, 2018

I'm not sure why stat_coverage.py used vgg16 for me although it was renamed, but anyway, now the tests seem to be passing.

@zrphercule
Copy link
Contributor

@shinh Hi shinh, I wonder if this is ready to be merged?

Copy link
Contributor

@zrphercule zrphercule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shinh
Copy link
Collaborator Author

shinh commented Sep 24, 2018

Yes, I believe this PR is OK. Thanks again for your review!

@zrphercule zrphercule merged commit e69c464 into onnx:master Sep 25, 2018
hariharans29 pushed a commit to hariharans29/onnx that referenced this pull request Aug 15, 2019
* Fix output_shape of a testcase for ConvTranspose

As per the documentation of the operator, `output_shape` seems
to expect the same rank as other attributes such as `strides`
or `pads`. In other words, `output_shape` should not have
dimensions for batch size and number of channels. So this
changes `output_shape` from [1, 2, 10, 8] to [10, 8] for the
2D ConvTranspose.

Note that test_convtranspose_kernel_shape, the other test which
uses `output_shape`, is already OK.

* Update the document by gen_doc.py

* Update test coverage by stat_coverage.py

Note there are a few unrelated updates.

* Revert unrelated update in the previous commit
jcwchen pushed a commit to jcwchen/onnx that referenced this pull request Sep 23, 2020
* Fix output_shape of a testcase for ConvTranspose

As per the documentation of the operator, `output_shape` seems
to expect the same rank as other attributes such as `strides`
or `pads`. In other words, `output_shape` should not have
dimensions for batch size and number of channels. So this
changes `output_shape` from [1, 2, 10, 8] to [10, 8] for the
2D ConvTranspose.

Note that test_convtranspose_kernel_shape, the other test which
uses `output_shape`, is already OK.

* Update the document by gen_doc.py

* Update test coverage by stat_coverage.py

Note there are a few unrelated updates.

* Revert unrelated update in the previous commit
github-merge-queue bot pushed a commit that referenced this pull request Jul 10, 2023
…els (#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, #1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
adityagoel4512 pushed a commit to adityagoel4512/onnx that referenced this pull request Jul 10, 2023
…els (onnx#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, onnx#1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
hamptonm1 pushed a commit to hamptonm1/onnx that referenced this pull request Jul 10, 2023
…els (onnx#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, onnx#1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Megan Hampton <hamptonm@us.ibm.com>
adityagoel4512 pushed a commit to adityagoel4512/onnx that referenced this pull request Jul 28, 2023
…els (onnx#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, onnx#1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
adityagoel4512 pushed a commit to adityagoel4512/onnx that referenced this pull request Jul 28, 2023
…els (onnx#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, onnx#1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
adityagoel4512 pushed a commit to adityagoel4512/onnx that referenced this pull request Jul 28, 2023
…els (onnx#5400)

### Description
<!-- - Describe your changes. -->
Add a sentence to highlight that output_shape for ConvTranspose should
not have batch and channels.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
It's quite confusing that whether output_shape needs to be fully
provided. For instance, onnx#1437. An
explicit description should help prevent confusion.

cc @satyajandhyala

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants