Error: Unused Output Layer
조회 수: 48(최근 30일)
This is the full error I'm getting: Error using trainNetwork (line 150)
Error in train (line 12)
Network: Missing output layer. The network must have one output layer.
Layer 4: Unused output. Each layer output must be connected to the input of another layer.
X is a 5 by 30 matrix that I'm trying to run through a relu, then a fully connected layer, and then a softmax to label the data as 0 or 1. I'm confused on why the softmaxLayer isn't taking in the data from the fullyConnectedLayer.
This is the function I'm trying to run.
function [trained_net] = train(X,Y)
% creates adam optimizer
options = trainingOptions('adam', 'InitialLearnRate',3e-4, ...
'SquaredGradientDecayFactor',0.99, 'MaxEpochs',20, ...
% creates layers
layers = [sequenceInputLayer(5)
% trains network
trained_net = trainNetwork(X,Y,layers,options);