Error using the classify() function with a 3D implementation of ResNet50

3 ビュー (過去 30 日間)
Matthew Gil
Matthew Gil 2023 年 3 月 22 日
回答済み: Vinayak Choyyan 2023 年 4 月 12 日
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?

採用された回答

Vinayak Choyyan
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 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by