The error message "numeric data not supported for validate" typically occurs when the validation data passed to the deepNetworkQuantizer is in a format that it cannot process. This can happen if the data is provided as a standard numeric matrix or array.
You must use a ‘datastore’ object for that, I found this in the documentation:
In this case, since your data is a 2-D numeric array, you can use an ‘arrayDatastore’ to handle the validation data.
calibrationData = arrayDatastore(yourCalibrationMatrix, 'IterationDimension', 1);
validationData = arrayDatastore(yourValidationMatrix, 'IterationDimension', 1);
Please go through the complete page link I have attached below and you will have a clear understanding of what kind of input is sent in which form according to your dataset:
This link will resolve your error query and your first question regarding quantizer inputs.
To answer your query regarding the inputs of the custom function, the meanings are as below:
- predictionScores: The predicted scores from the network.
- net: The network object.
- dataStore: The datastore containing the ground truth labels.
Read all data from ‘dataStore’ to get the ground truth labels:
tmp = readall(dataStore);
groundTruth = tmp.response;
For your query regarding the Top-1 accuracy, the app uses this metric by default and your data should be set up such that both your input data and label are in a compatible datastore, such as ‘arrayDatastore’.
Hope this helps!