Size of the input layer is different from the expected input size
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Accepted Answer
- If your target data is not sequences, you can set the OutputMode of gruLayer to "last" to only output the last hidden state. This should be able to concatenate with the output of "fc_4" along dimension 1.
- If your target data are sequences, you could concatenate the output of "fc_4" to each sequence element of the output of "gru_2".
6 Comments
- I actually think, if I work with trainNetwork, it is much easier for me to iterate over the different hyperparameter etc later. However, if I follow your example from above for trainNetwork, I again get the error message "
- Given my first comment, I adjusted your suggested code for the dlnetwork slightly that it works for 10 x numObs x 252 dlarray-s. And this works. Then I tried to change the 10 to a 1 and the dimentions in minibatchqueue are not stay consistent anymore. Any ideas, why this is the case? Again any help/comment is highly appreciated!
More Answers (0)
Categories
Find more on Custom Training Using Automatic Differentiation in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)