Activations Error - Struct contents reference from a non-struct array object.
11 views (last 30 days)
Show older comments
I'm trying to work with a neural network...which works fine with the newest version of MatLab. However, when I run the same code on an older version of MatLab, I get the error as below. The reason why I need the older version of MatLab is because for trivial reasons, my Uni Mechatronics Labs don't have the latest MatLab version....and for testing I need my code to run on them. My Uni as far as I know runs 2017b MatLab version. At home I am also running 2018a MatLab version.
In my neural network, in the activations lines you might see the variable _ rgbImage_. When I trained the neural network, I used an augimagedatastore instead of an rgbImage file (M by N by 3). So when I run the line with an rgbImage variable in MatLab 2017a, it gives the error below...however, in 2018a, the error doesn't exist and my neural network runs well. Any tips on how I could get my code to run on MatLab 2017a as well?
Struct contents reference from a non-struct array object.
Error in nnet.internal.cnn.layer.Layer>@(x)x.Name (line 161)
layerNames = cellfun(@(x)x.Name, layers, 'UniformOutput', false);
Error in nnet.internal.cnn.layer.Layer.getLayerNames (line 161)
layerNames = cellfun(@(x)x.Name, layers, 'UniformOutput', false);
Error in nnet.internal.cnn.layer.Layer.findLayerByName (line 156)
layerNames = nnet.internal.cnn.layer.Layer.getLayerNames(layers);
Error in nnet.internal.cnn.util.validateNetworkLayerNameOrIndex (line 11)
[layerIndex, layerNames] = nnet.internal.cnn.layer.Layer.findLayerByName(internalLayers, name);
Error in SeriesNetwork/activations (line 747)
layerID = nnet.internal.cnn.util.validateNetworkLayerNameOrIndex(layerID, internalLayers, 'activations');
Error in Segmentation (line 228)
testColourFeatures = activations(networkName,rgbImage,layer,'OutputAs', 'rows');
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!