Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Handle fc layer output shape when C is single dimension #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dashesy
Copy link
Contributor

@dashesy dashesy commented May 7, 2019

Also warn about non-symmetric padding and strides, until support is added.

@lovettchris
Copy link
Member

Thanks, looks like another good pull request, I added some comments.

@dashesy
Copy link
Contributor Author

dashesy commented May 7, 2019

I cannot see the comments yet, will look as soon as you have finalized the CR.
Thanks

@@ -1373,9 +1375,17 @@ def get_attributes(self, attrs: Attributes):
if 'strides' in attrs:
self.strides = attrs['strides']
attributes['stride'] = self.strides[0]
if len(self.strides) > 1:
for s in self.strides[1:]:
if s != self.strides[0]:
Copy link
Member

Choose a reason for hiding this comment

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

how about "all(y == x[0] for y in x[1:])"

tools/importers/onnx/lib/onnx_converters.py Show resolved Hide resolved
@dashesy
Copy link
Contributor Author

dashesy commented May 28, 2019

I will submit another PR

@dashesy dashesy closed this May 28, 2019
@lovettchris
Copy link
Member

Ok, thanks. I suspect the right fix might be to add some reinterpretlayout nodes on whatever nodes is downstream of the fc layer that needs something that is not 1d.

@dashesy dashesy reopened this Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants