Added Keras Layer Wrapper
Added the Keras Layer Wrapper to most of the augmentation functions as well as to the magSpectrogram function in spectrogram.py
These layers can now be added via the add_frontend
method of the NNArch
class.
Have a look at the following example (functioning with the clip NARW waveform data that I created a DB). The spectrogram computation is now done inside the NN in the frontend layer.
frontend = mag.MagnitudeSpectrogramLayer(window_size=256, step_size=32, normalize=True)
nn_interface.model.add_frontend(frontend)
You can run the script with somethign like this:
python -m test resnet_recipe.json db.h5 waveform.json --train_table /train --val_table /val --output_dir result/