I understand that you want to create a “Time distributed Layer” in your implementation of network. As a matter of fact, the “timedelaynet” function builds a new neural network and hence cannot be used as a layer in “Layer” function in MATLAB.
The following MATLAB Community question touches upon implementation of “Time Distributed” layer in MATLAB:
In answer it was mentioned that we can use “sequenceFoldingLayer” and “sequenceUnoldingLayer” to implement “Time Distributed” layers.
By using the same we can incorporate “Time Distributed” layers by replacing “timedelaynet(30,numDenseUnits)” with this:
fullyConnectedLayer(numDenseUnits)
But if you want to incorporate user-defined time delay, try making a custom “timedelay” layer function for such architecture and use it in layers.
Or for more clarification or adjusting it according to your input and output requirements, the following documentation links would be helpful:
- For "sequenceFoldingLayer" function: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.sequencefoldinglayer.html
- For "sequenceUnfoldingLayer" function: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.sequenceunfoldinglayer.html
You can also try this command in your MATLAB command window for specific release documentation:
- For "sequenceUnoldingLayer" function:
web(fullfile(docroot,'deeplearning/ref/nnet.cnn.layer.sequenceunfoldinglayer.html'))
- For "sequenceFoldingLayer" function:
web(fullfile(docroot,'deeplearning/ref/nnet.cnn.layer.sequencefoldinglayer.html'))
Hope this helps you!