How can I make a RBF NN with multiple inputs and a single input

3 ビュー (過去 30 日間)
Bruno Souza
Bruno Souza 2018 年 11 月 26 日
編集済み: nick 2024 年 10 月 8 日
Hello, I'd like to creat a RBF with 'newrb' function,
My inputs are 3 columns with 1000 elements each, and my output is a single column with 1000 elements.
But when I try to creat I get the following error 'Inner matrix dimensions must agree'
Thank you

回答 (1 件)

nick
nick 2024 年 10 月 8 日
編集済み: nick 2024 年 10 月 8 日
Hi Bruno,
The error “Inner matrix dimensions must agree” seems to indciate a mismatch in the dimensions of the matrices involved in an operation. Kindly ensure that the input data and the output data are in the correct format. The 'newrb' function expects the input matrix P to have dimensions [R x Q], where R is the number of input features (3 in your case) and Q is the number of samples (1000 in your case). The target matrix T should have dimensions [S x Q], where S is the number of output features (1 in your case) and Q is the number of samples (1000 in your case).
Here’s a sample code to create an RBF network with the inputs and outputs of the specified dimensions:
% Sample input data (3 columns, 1000 rows)
P = rand(3, 1000);
% Sample output data (1 column, 1000 rows)
T = rand(1, 1000);
% Ensure data is in the correct format
if size(P, 1) ~= 3
P = P';
end
if size(T, 1) ~= 1
T = T';
end
net = newrb(P, T);
view(net);
You can refer to the documentation of the function 'newrb' using the following command in MATLAB Command Window:
doc newrb
Hope this helps to resolve the issue.

カテゴリ

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