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.

Antworten (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 Kommentare

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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 28 Jun. 2021

Kommentiert:

am 29 Jun. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by