Preparing data for regression using deep neural network

3 ビュー (過去 30 日間)
OB
OB 2022 年 8 月 24 日
コメント済み: Milan Bansal 2023 年 9 月 21 日
Hi,
I'm trying to implement a deep neural network for regression with hand-crafted features as the network input. I'm trying to use the Deep Network Designer to achieve this. The network archiecture is similar to the diagram below:
  • Each input/feature is a scalar array of length 14751, and there are 9 inputs/features alogether,
  • there is one output, again a scalar array of length 14751,
  • and there are 4 samples altogether.
  • See the data attached.
load data.mat;
inputSize = length(inputs)
inputSize = 9
[~, numSamples] = size(output) % where each column represents a different sample
numSamples = 4
exampleInput = inputs{1,1};
size(exampleInput)
ans = 1×2
14751 4
Can someone please advise how I can go about preparing the raw data in Datastore format which can be loaded in to Deep Network Designer?
  3 件のコメント
OB
OB 2022 年 8 月 25 日
Hello David,
Thanks a lot for your response. I now seem to be able to load the data. However, am still struggling with training the network. Here is the architecture I'm trying to start with:
  • 9 input features (as previously described)
  • 2 fully-connected hidden layers with 32 neurons each
  • a sigmoid activation functions
  • 1 ouput
Here is the code from Deep Network Designer:
layers = [
sequenceInputLayer(9,"Name","sequence")
sigmoidLayer("Name","sigmoid_1")
fullyConnectedLayer(32,"Name","fc_1")
sigmoidLayer("Name","sigmoid_2")
fullyConnectedLayer(32,"Name","fc_2")
sigmoidLayer("Name","sigmoid_3")
regressionLayer("Name","regressionoutput")];
For training data, I'm loading the combined datastore (cds) as per your steps.
However, when trying to train, I get the following error:
Could you please advise?
Milan Bansal
Milan Bansal 2023 年 9 月 21 日
Change the output size of the last fully connected layer to 1.

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

回答 (0 件)

カテゴリ

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