whether forward and predict in deep learning are the same

21 ビュー (過去 30 日間)
robinho robinho
robinho robinho 2022 年 8 月 13 日
回答済み: Souvik Das 2022 年 8 月 18 日
So far I think they are the same but may I confirm?

採用された回答

Souvik Das
Souvik Das 2022 年 8 月 18 日
'forward' is used to compute deep learning network output for TRAINING whereas 'predict' is used to compute deep learning network output for INFERENCE.
In some cases like yours, both may give similar results, however some deep learning layers behave differently during training and inference (prediction). For example, during training, dropout layers randomly set input elements to zero to help prevent overfitting, but during inference, dropout layers do not change the input.
Please refer the below links for more details-

その他の回答 (1 件)

Souvik Das
Souvik Das 2022 年 8 月 18 日
I am assuming with 'forward', you mean 'forward propagation'. Deep learning networks usually have a lot of layers. Each layer accepts input data, processes it as per the activation function and passes it to the next layer. This is called 'forward propagation'.
In an abstract way, you can say 'prediction' is something that happens with the last layer where we get the final results from our deep learning network.
So 'prediction' and 'forward propagation' have a minor difference between them.
  1 件のコメント
robinho robinho
robinho robinho 2022 年 8 月 18 日
thank you for your reply. If the network has several layers with x being the input data (dlarray format), then forward(network,x) and predict(network,x) yield the same result as far as I see.

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

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by