I want to train a DAG_net with two inputs, the dag network is shown below:
My two inputs are : a sequential timeseries data with 17 features for 60 training examples. The other input is a static feature for the 60 training samples. Here is a screenshot of my training data
I'm trying to do the same exact thing with similar data as yours except my output is also a sequence.
I got the add/concatonate layer idea from a post I read online and a paper which shows the architecture as shown below:
My architecture looks similar to yours as below:
My training code looks something like this (to show it needs 2 inputs to train):
net = trainNetwork({XTrain(1:510,:);Static_features(1:510,:)'},YTrain(1:510,:),lgraph,options);
I use the same lgraph object as plotted above and XTrain (for temporal inputs) and Static_features (for static inputs) and a single output "YTrain" that should be a sequence similar to XTrain with multiple cells (similar to your XTrain). This is a prediction network that predicts the next time step value (YTrain) from the previous time step (XTrain).
However, when I try to train the network I get this error (next line of error says: if sequenceInputLayer is present, it can't accept any other type of input layer):
Network: Incompatible layer types. The network contains layer types not supported with recurrent layers.
Detected recurrent layers:
layer 'bilstm1' (BiLSTM)
layer 'bilstm2' (BiLSTM)
layer 'bilstm3' (BiLSTM)
layer 'bilstm4' (BiLSTM)
and 1 other layers.
For static_input I use an imageInputLayer but, I tried every layer that exists in Matlab 2020a (apparently featureInputLayer is not avaiable in 2020a) and it still gives me the same error.
I searched for every post I believe and can't seem to find a tutorial nor an example showing how to achieve this (if it is possible). The closest thing I found was using CNN-RNN but, that is with images (frames of a video) and has a single input layer.
Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.
Translated by
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.