Error using the classify() function with a 3D implementation of ResNet50
5 次查看(过去 30 天)
显示 更早的评论
I have successfully trained a classification network which is a 3D version of ResNet50 on images of size 314x414x100 using the trainNetwork() function. There werre no errors in the training and standard training and validation plots were produced during training. For testing the network I tried to use the classify() function which produced the following error:
Error using nnet.internal.cnn.layer.GraphExecutor/propagate
Layer 'add_3': Invalid input data. Only the first two dimensions can have a stride of more than 1.
Here the 'add_3' layer refers to the 3rd addition layer in ResNet50 and the stride value for most of the network layers is [2 2 2]. I have also attempted to use the predict() and activations() functions as a workaround but these produce the same error. I do not want to reduce the stride in the z-axis as this will lead to memory issues.
Could anyone help find a fix for this or identify a workaround?
0 个评论
采纳的回答
Vinayak Choyyan
2023-4-12
Hi Matthew,
As per my understanding, you are facing an issue when using functions like ‘classify()’, ‘predict()’ and ‘activations()’ and getting an error saying ‘Error using nnet.internal.cnn.layer.GraphExecutor/propagate’
This is a know issue and has been fixed in MATLAB R2023a. As a workaround, please try using a ‘gpuArray’ as input. Please check out the following documentation to know more about ‘gpuArray’ https://www.mathworks.com/help/parallel-computing/gpuarray.html.
Alternatively, please consider upgrading to MATLAB R2023a if you do not wish to make changes to your workflow.
I hope this resolves the issue you are facing.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!