How to use trainpso to train a neural network model

1 回表示 (過去 30 日間)
jiabo he
jiabo he 2017 年 3 月 25 日
コメント済み: jiabo he 2017 年 3 月 28 日
function [net, tr] = trainpso(net, tr, trainV, valV, testV, varargin)
the trainpso is shown like this, how to input the data so that i can use trainpso to train a neural network model?

回答 (1 件)

Darshan Ramakant Bhat
Darshan Ramakant Bhat 2017 年 3 月 28 日
The first argument for the function seems to be a neural network object. It will have a property called ' inputs' and ' outputs'. You can set your training inputs as
net.inputs=trainInput;
net.outputs=trainOutputs;
Also note that it expects the data in the form of cell arrays.
Another way is to directly configure your neural network with inputs and targets like below
net = configure(net,x,t);%x is input and t is target
Please refer the following link
Regards,
Darshan Bhat
  1 件のコメント
jiabo he
jiabo he 2017 年 3 月 28 日
trainpso is a training function like trainlm and trainscg. However, it is not in the training function list. There is some way online to combine it with trainlm to train ANN model, but I cannot figure it out. Thank you for your answer, anyway.
The above toolbox and pso toolbox may be all I need to realize this function.

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

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by