Comments (6)
Can you describe situations in which you wouldn't want a name for each feature extractor?
The point here is to provide a way of (hierarchically) grouping features together where there could otherwise be namespace conflicts. For instance, if you for some reason wanted to have a CQT and STFT together, they could both have mag
and phase
features, so the only thing keeping them separate is the name
scope.
from pumpp.
right, but couldn't we infer the name from the feature extractor?
Like by default, we could name them cqt/mag
and stft/mag
. I feel like we shouldn't need to explicitly name them for simple cases like tthat. If you wanted two STFT then you could name them explicitly name='stft_1'
and name='stft_2'
Or what would be fun would be the automatically incrementing the names like tensorflow does, but that's probably a bit extra.
from pumpp.
Oh i see -- are you then suggesting that we have default names for the feature extractors? I could be okay with that.
from pumpp.
Yep! Something like this:
from pumpp.feature import STFT, Mel, STFTPhaseDiff
import inflection
for cls in [STFT, Mel, STFTPhaseDiff]:
print(inflection.underscore(cls.__name__), cls)
stft <class 'pumpp.feature.fft.STFT'>
mel <class 'pumpp.feature.mel.Mel'>
stft_phase_diff <class 'pumpp.feature.fft.STFTPhaseDiff'>
from pumpp.
Well, I don't think we need to get fancy with this: explicit strings are better IMO. And we're only talking about a handful of classes anyway, so may as well hard-wire it in for the sake of readability.
The only hiccup is around default args and positionals: we can do this if we make all arguments keyword-only, which I generally like stylistically.
from pumpp.
Sure, that's fine by me. I was more just demonstrating the pattern.
And yeah I agree about kw-only. I think in cases like this it totally makes sense (what should the first argument to Mel
be anyways?).
from pumpp.
Related Issues (20)
- Make our own label vectorizer
- Detect when input data is too short for the sampler
- Viterbi decoding
- Display linkage
- vector HOT 11
- Quantization for feature transforms
- Explicit dtypes
- DL framework integration
- Drop legacy python
- pre-trained embedding features HOT 5
- Fix dtypes to make keras happy
- Add FeatureExtractor/TaskTransformer aggregations for Sampler HOT 2
- Faster patch sampling using librosa 0.7.1 frame
- [Feature Proposal] Automatic Pump caching HOT 7
- [Feature] optional explicit frame size for inputs HOT 3
- extra dimension added to feature extractors HOT 1
- Cannot pickle sampler if `random_state` is not set HOT 2
- support tf2.0 HOT 3
- Relying on "keras only" for building layers is limiting! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pumpp.