Skip to content
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

shape parameter convention in layers vs preprocessing #87

Open
FabianSchubert opened this issue Feb 21, 2024 · 0 comments
Open

shape parameter convention in layers vs preprocessing #87

FabianSchubert opened this issue Feb 21, 2024 · 0 comments

Comments

@FabianSchubert
Copy link
Contributor

FabianSchubert commented Feb 21, 2024

The connect method of Conv2D assumes that the shape parameter of the input layer represents (height, width, channels):

conv_ih, conv_iw, conv_ic = source.shape

However, the preprocess_tonic_spikes function seems to follow a convention where shape[0] is the width of the input and shape[1] is the height, given that 2d event coordinates are provided:

if ("x" in ordering) and ("y" in ordering):
spike_event_ids = events["x"] + (events["y"] * shape[0])

This is not a bug per se, since the latter is just a preprocessing utility, but I think adhering to a consistent convention for the order of width and height would help avoiding errors down the line when building a preprocessing/training pipeline.

Edit: Overall I would prefer the convention of representing it as (height, width), as this would follow the usual matrix representation for image data.

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

No branches or pull requests

1 participant