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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chuguang Pan
am 15 Dez. 2025 um 8:39
Beantwortet: Chuguang Pan
vor etwa 21 Stunden
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.
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!