2

I was trying out Intel Low Precision Optimization Tool in Linux. Initially I have created one environment named lpot_environment and installed tensorflow using the below command:

conda create -n lpot_environment python=3.7
pip install intel-tensorflow==2.3.0

Then I cloned the github repository as :

git clone https://github.com/intel/neural-compressor.git

I have the frozen model downloaded.

As an initial step toward intel lpot, I would like to run with a dummy dataloader. But I failed to find one.

It would be great if anybody send a code sample using dummy dataset in intel lpot.

Remi_TRish
  • 193
  • 1
  • 8

1 Answers1

0

You can use the below code to quantize a TensorFlow checkpoint and run with a dummy dataloader.

quantizer = Quantization('./conf.yaml')
dataset = quantizer.dataset('dummy_v2', \
    input_shape=(100, 100, 3), label_shape=(1, ))
quantizer.model = common.Model('./model/public/rfcn-resnet101-coco-tf/rfcn_resnet101_coco_2018_01_28/')
quantizer.calib_dataloader = common.DataLoader(dataset)
quantized_model = quantizer()

Run quantization will create a dummy dataloader.

Rahila T - Intel
  • 832
  • 4
  • 11