Choose Optimizer and Learning Rate in neural network

3 ビュー (過去 30 日間)
Phuong Huynh
Phuong Huynh 2022 年 5 月 26 日
編集済み: Jayanti 2024 年 10 月 18 日
Hi everyone, I try to find and specify optimizer and learning rate in my custom network (I am using net=network(), I refer Edit Shallow Neural Network Properties - MATLAB & Simulink (mathworks.com) )
But I can't see parameter or instruction about change optimizer (adam, sgd,...) and learning rate for my training
Can you show me where are they or Can i specify them in my network?
Thank you so much!
  1 件のコメント
Katy
Katy 2023 年 7 月 20 日
Is there a solution for this? I'd also like to know how to change the learning rate for a shallow neural network.
Thanks!

サインインしてコメントする。

回答 (1 件)

Jayanti
Jayanti 2024 年 10 月 18 日
編集済み: Jayanti 2024 年 10 月 18 日
Hi Phoung,
You can use the "trainFcn" property of the “net” to select one of the optimisers available.
net.trainFcn = 'traingd';
Refer to the official documentation below for list of all optimisers available:
In response to your query to change learning rate you can use the below code:
net.trainParam.lr=0.01;
I hope this helps.

カテゴリ

Help Center および File ExchangeFunction Approximation and Clustering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by