Connections between layers removed once call to train is made.

1 次查看(过去 30 天)
Hello, I have seen a similar issue to this on these posts and none of the solutions seem to apply. I am setting up a basic neural network, and when I view the net all the layers are connected. I then call train, it returns almost instantly, and if I then view the network, the layer connections are removed. Some of the responses to similar posts were addressing the input and or output sequences being zero which mine are not. i have even tried to randomly generate data for debugging to make sure it wasnt a problem with my data and I still have the same issue. here is a sample with random data
sizeInput = 174; sizeOutput = 1; numDataPoints = 1000;
net = fitnet(10,'trainscg'); net = configure(net,ones(sizeInput,1),sizeOutput);
view(net); net = train(net,randn(sizeInput,numDataPoints),randn(sizeOutput,numDataPoints)); view(net);

回答(1 个)

Vishal Chaudhary
Vishal Chaudhary 2018-9-28
The “configure” function takes input data and target data as input and configures the network. You can read about it in the documentation: https://www.mathworks.com/help/deeplearning/ref/configure.html?s_tid=doc_ta
So, you can use "configure" like:
sizeInput = 174; sizeOutput = 1; numDataPoints = 1000;
x= randn(sizeInput,numDataPoints); y= randn(sizeOutput,numDataPoints);
net = fitnet(10,'trainscg'); net = configure(net,x,y);
view(net);
net = train(net,x,y); view(net);

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by