could anyone help me how to manually create the structured arrays

I want to create the strucured array automatically as
1x1SequenceInputLayer
1x1FullyConnected Layer.
Could anyone please help me with this.

Answers (1)

inputSize = randi(20);
outputSize = randi(20);
S = struct('SequenceInputLayer', {SequenceInputLayer(inputSize)}, ...
'FullyConnectedLayer', {FullyConnectedLayer(outputSize)});
... or are you asking for a way to bypass calling SequenceInputLayer() and FullyConnectedLayer() for some reason?

4 Comments

I want to call FullyConnectedLayer to perform sine activation function.
Could you please help me on this.
No, that is not an option for that layer.
Calling FullyConnectedLayer just sets up a data structure and does not do any training or adjustments itself.
ok. But could you help me how to do sine activation function as for relu i can use relu layer, in the similar manner how i can perform sine activation function.

Sign in to comment.

Categories

Asked:

on 28 Jun 2021

Commented:

on 29 Jun 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!