I have also checked the validity of the example's residualBlockLayer, it still produces the same failure message as shown above.
Verification failed to check the validity of the customize layer with Incorrect type of 'Z' for 'predict'
17 views (last 30 days)
Show older comments
Chuguang Pan
on 15 Dec 2025 at 8:39
Answered: Chuguang Pan
on 15 Dec 2025 at 14:00
I want to create a customized deep learning layer with nested dlnetwork according to the example presented in Example. After creating the customized layer, I use checkLayer function to check the validity of the layer. The messages displayed in the command window are illustrated as follows:
Running nnet.checklayer.TestLayerWithoutBackward
.......... .......
================================================================================
Verification failed in nnet.checklayer.TestLayerWithoutBackward/predictIsConsistentInType(Precision=double,Device=gpu).
----------------
Test Diagnostic:
----------------
Incorrect type of 'Z' for 'predict'.
---------------------
Framework Diagnostic:
---------------------
Actual Underlying Type:
single
Expected Underlying Type:
double
------------------
Stack Information:
------------------
In
In
================================================================================
The failure message says that the underlying data type are not consistent. I want to know how to retain the consistency when test the customized layer in GPU device and CPU device.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Image Data Workflows 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!