Borrar filtros
Borrar filtros

How to import a time series data as calibration data in deep network quantizer?

2 visualizaciones (últimos 30 días)
Input size is 15X5 and output is 1x1 at every instent.

Respuestas (1)

KALASH
KALASH el 3 de Mayo de 2024
Hi Krishna,
As you did not provide any information of your data and the network or model you used, I have listed below some general steps that can help you to use your data as calibration data:
Preprocessing the data:
You can use functions like readtable” or “readmatrix”.Split your data into training, validation, and testing sets. The calibration data for Deep Network Quantizer typically comes from the training set or a subset of it.
data = readmatrix('your_data.csv');
% Assuming 'data' is organized with features along columns and samples along rows
X = data(:, 1:end-1); % Features
Y = data(:, end); % Targets
% Reshape or adjust X and Y to match your network's input and output requirements
Convert your data to MATLAB’s “dlarray ” (for more information on this refer to documentation attached at the end) and create a network
To use the data for calibration in Deep Network Quantizer, you need to create a dlarray:
% Assuming 'calibrationData' (subset of your training data) is your prepared calibration dataset
% and 'net' is your trained network
dlX = dlarray(calibrationData, 'SSCB'); % Example format, adjust 'SSCB' as needed(refer documentation for information on input parameters)
dlnet = dlnetwork(net);
Calibrate
executionEnvironment = 'cpu'; % Choose 'cpu' or 'gpu'
calibrate(dlnet, dlX, executionEnvironment);
Further you may refer to the following documentations to know more details about the used functions.
How to use the Deep Network Quantizer app:
Information on Deep learning array for customization(dlarray):
Information on how to calibrate:
Hope this answers your query!
Best,
Kalash

Categorías

Más información sobre Quantization, Projection, and Pruning en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by