could you anyone help me how to include sine, cosine and tanh activation function for training the neural network
조회 수: 2 (최근 30일)
이전 댓글 표시
In my code i have written the
layers = [ ...
sequenceInputLayer(inputSize)
fullyConnectedLayer(numHiddenUnits1)
reLuLayer
fullyConnectedLayer(numHiddenUnits2)
reLuLayer
fullyConnectedLayer(numClasses)
reLuLayer
regressionLayer]
Now i want to execute the code using sine, cosine and tanh instead of reLu.
Could anyone please help me on this.
댓글 수: 0
답변 (1개)
Akshat
2024년 8월 27일
Hi Jaah,
I see you want to use different activation functions instead of reLu.
In the case of "tanh", you can use the "tanh layer", about which you understand here:
Using "sine" and "cosine" as activation functions is not a viable choice, as "sine" and "cosine" are periodic functions and they have many local extrema. Thus, we lose the uniqueness of values. Due to this reason, it is not a popular choice to use these functions as the activation functions.
Hope this helps!
Akshat
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!