Add audio extractor
- Add audio extractor to
bob.learn.pytorch
- Update the unit tests
- Update doc
- Resolve #9 (closed)
Merge request reports
Activity
Hi @ssarfjoo,
Thanks for opening the MR. A better approach would be to open it as soon as you start working on that (instead on when you think it is ready to merge), so that it is easier to follow and comment as code evolves.
I already have a few comments, but I may not have the time to go through all the code right now, and properly address that this morning, so stay tuned ;)
Thanks
Alright, so I had time to have a look ... Here are a few comments and suggestions.
-
Docstrings (in numpy format) should be put wherever not present in order to generate useful python API documentation (i.e. what a class is, what a function is doing and what parameters it expects, and so on). You actually did it well for
preprocessor/audio/DltResNet
-
There is a lot of redundanxcy between your ResNet and DltResNet classes (I actually don't see much difference) - could you make it one class only by setting a flag if you want to build the DltResNet or the ResNet.
Also, you should move common (and more generic) classes BasicBlock and Bottleneck) to
architectures/utils
and import from there. This way, one can easily reuse them if needed in another architecture-
spectrogram_utils
has basically nothing to do with neural networks, it should be located elsewhere (bob.pad.voice
orbob.bio.spear
, or evenbob.ap
). This would help this package remain more specific and avoid additional requirements like scipy.io.wavfile. -
Use the Logging module instead of print statements
That's basically what can be improved I guess.
Additionally, I find your code clean and well organized, thanks ! (I'm by no means a software design - nor developer expert though ;)
-
added 27 commits
-
df6e5692...c2a2f4b8 - 18 commits from branch
master
- 2002b8ff - add audio extractor
- 7595cb40 - add docs and ResNet architecture
- 703e2d8a - fix address in doc
- 22e66588 - add __init__
- 665a0363 - update dependencies
- 48e6f7e8 - link audio extractor doc
- ef7a36d7 - link preprocessor and extractor in doc
- b0786f1d - fix the title in audio extractor doc
- 47e1b643 - fix docstring, remove redundant files, and update doc
Toggle commit list-
df6e5692...c2a2f4b8 - 18 commits from branch
- bob/learn/pytorch/architectures/DltResNet.py 0 → 100644
27 logger = logging.getLogger("bob.learn.pytorch") 28 29 __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 30 'resnet152'] 31 32 33 model_urls = { 34 'resnet18': 'https://s3.amazonaws.com/pytorch/models/resnet18-5c106cde.pth', 35 'resnet34': 'https://s3.amazonaws.com/pytorch/models/resnet34-333f7ec4.pth', 36 'resnet50': 'https://s3.amazonaws.com/pytorch/models/resnet50-19c8e357.pth', 37 'resnet101': 'https://s3.amazonaws.com/pytorch/models/resnet101-5d3b4d8f.pth', 38 'resnet152': 'https://s3.amazonaws.com/pytorch/models/resnet152-b121ed2d.pth', 39 } 40 41 42 class ResNet(nn.Module): There are two classes named ResNet in two different files, this is a bit confusing. How are they different ? Maybe this one should rather be named DltResNet ?
Edited by Guillaume HEUSCHchanged this line in version 3 of the diff
added 31 commits
-
b6392865...f1fe9f47 - 19 commits from branch
master
- baa22518 - add audio extractor
- e5d83f43 - add docs and ResNet architecture
- 7ff52c35 - fix address in doc
- 1b1c0da3 - add __init__
- 8d1f8177 - update dependencies
- 86f0001e - link audio extractor doc
- 5e8d12e6 - link preprocessor and extractor in doc
- 5ba285ab - fix the title in audio extractor doc
- 40ba94ac - fix docstring, remove redundant files, and update doc
- 2a7902a2 - rename class to DltResNet
- a043c598 - use bob.ap for spectrogram extraction
- 4e32759e - change the extractor name
Toggle commit list-
b6392865...f1fe9f47 - 19 commits from branch
added 1 commit
- e3bebdc4 - remove extend_path from all internal __init__ files
@heusch I applied the requested modifications. In addition I removed
extend_path
from all internal__init__
files.- Resolved by Guillaume HEUSCH
- Resolved by Guillaume HEUSCH
- Resolved by Guillaume HEUSCH
added 1 commit
- 1710ffde - fix input problem in new _make_layer function
@heusch I applied the requested modifications. Please merge it if you think that's okay.
mentioned in commit a7c84482