Running your first custom block locally
Forwarding
. Note down the address that includes https://
.
Adding a custom processing block from an ngrok URL
An impulse with a custom processing block and a neural network.
parameters.json
file. Let’s add an option to smooth raw data. Open example-custom-processing-block-python/parameters.json
and add a new section under parameters
:
example-custom-processing-block-python/dsp.py
and replace its contents with:
dsp.py
and replace the content with the following script. It contains a very basic smoothing algorithm and draws a graph:
Custom processing block with a 'smooth' option that shows a graph of the processed features.
labels
array that contains strings that map back to the features you return (labels
and features
should have the same length).
type
parameter:
info
object in parameters.json
.
quantized
vs. float32
).model-parameters/model_variables.h
file of the exported C++ library, you can see a forward declaration for the custom DSP block you created.
For example:
cppType
field in your custom DSP parameter.json
. It takes your {cppType}
and generates the following extract_{cppType}_features
function.
Implement the Custom DSP Block:
In the main.cpp
file of the C++ library, implement the extract_my_preprocessing_features
block. This block should:
features[]
array in source/main.cpp
make -j
in this directory to compile the project. If you encounter any OOM memory error try make -j4
(replace 4 with the number of cores available)./build/app
to run the applicationparameters.json
file: