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'
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Chuguang Pan
il 15 Dic 2025 alle 8:39
Risposto: Chuguang Pan
circa 19 ore fa
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.
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!