Tried above task following this example but have error I will appreciate it if anyone can help, and thanks in advance. The images are in augmented image datastore
My code:
net = resnet18;
layers = net.Layers;
numResponses = 1;
layers = [
layers(1:68)
fullyConnectedLayer(numResponses)
regressionLayer];
options = trainingOptions('sgdm',...
'InitialLearnRate',0.001, ...
'ValidationData',{augimdsImagesP11Test,P11Test_betaRepBSN8},...
'Plots','training-progress',...
'Verbose',false);
net2 = trainNetwork(augimdsImagesP11Train,P11Train2_beta,layers,options);
ERROR =
Error using trainNetwork (line 170)
Layers argument must be an array of layers or a layer graph.