keunwoochoi / torchaudio-contrib

A test bed for updates and new features | pytorch/audio
169 stars 22 forks source link

File structure #47

Open keunwoochoi opened 5 years ago

keunwoochoi commented 5 years ago

Instead of having only two files as we are now (functional.py and layers.py), I'd like something like I did on Kapre but slightly different because we have functionals and layers. So, something like..

IMO, this is

f0k commented 5 years ago

What we did in Lasagne was to have layers/__init__.py do *-imports from files grouped by topics (layers/conv.py, layers/pool.py, layers/norm.py, ...). This way all classes are available directly under lasagne.layers, without having a single large file. Also the topic-specific files could have internal topic-specific helper functions that are not listed in __all__ and therefore not included in the *-imports.

We can split the functionals in the same way, so we don't get a large functional.py file either.

keunwoochoi commented 5 years ago

@f0k I like it. Not sure how the official torch/audio would go but we can still do it like that, and probably we have to at some point not to have like 1000-line files.