Closed ghost closed 4 years ago
Have a look at the User Guide.
The FeatureRep transformer transforms a 3D tensor (n_segments, segment_length, n_channels) to a 2D feature representation (n_segments, n_features) to use with a non-neural model eg SVM, KNN, etc.
A CRNN or CNN is expecting the 3D tensor data as input. I'm not sure why you are using FeatureRep + CRNN. I suggest you take the FeatureRep transformer out of your pipeline.
Good luck. David
Hi David
Many thanks for your response. My intention was to have a set of multi-channel raw EMG signals, extract features (FeatureRep()
) say root_mean_square
and use such feature for the CRNN input instead of the raw signal. In this case how could I amend the CRNN input or pype parameters?
The main advantage of a a neural network is it can learn arbitrary feature representations - so I would encourage you not to use that approach.
In any case, seglearn is not really setup for what you want since the FeatureRep collapses the time dimension in the segment. You would need to then reconstitute the feature vectors into time series and then segment the time series of features. You can look at Pype.predict_series to see how you can get predictions as a time series and maybe that will provide some inspiration. You will need to implement this capability yourself if you wish to try it. Sorry.
Hi I tried to implement multiple features from seglearn example namely Classifying Segments Directly with a Neural Network . Specifically I just add up the
FeatureRep()
into the pipe definition as below:But then I encountered an error as below:
I'd imagine that I need to modify the
input_shape
definition of thecrnn_model
but am not quite sure how to do that. Appreciate any pointers for it, thanks.