# How to do Int8 calibration for Faster RCNN?

**URL:** <https://forums.developer.nvidia.com/t/how-to-do-int8-calibration-for-faster-rcnn/147135>\
**Category:** TensorRT\
**Created:** [August 17, 2020, 7:18am UTC](https://forums.developer.nvidia.com/t/how-to-do-int8-calibration-for-faster-rcnn/147135 "2020-08-17T07:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nssreenivasalu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nssreenivasalu](https://forums.developer.nvidia.com/u/nssreenivasalu)\
**Post date:** [August 17, 2020, 7:18am UTC](https://forums.developer.nvidia.com/t/how-to-do-int8-calibration-for-faster-rcnn/147135/1 "2020-08-17T07:18:26Z")

</div>

## Description

I am facing some troubles for converting FRCNN model to int8 engine.

```auto
config->setFlag(BuilderFlag::kINT8);
builder->setInt8Mode(true);
nvinfer1::Dims dims{4, {8, 3, 600, 1000}, {}};
BatchStream calibrationStream(8,8,dims,"./data/calibraton/frcnn/list_images.txt", dataDirs);
calibrator.reset(new Int8EntropyCalibrator2<BatchStream>(
            calibrationStream, 0, "frcnn", "data"));
config->setInt8Calibrator(calibrator.get());

```

I am using the above code for setting up the calibrator for INT8.

`../builder/cudnnCalibrator.cpp (724) - Cuda Error in add: 700 (an illegal memory access was encountered)`

I am not getting any clue where I am going wrong.

**Environment**  
**TensorRT Version** : 7  
**GPU Type** : Tesla P100  
**Nvidia Driver Version** : 440  
**CUDA Version** : 11.0

Thanks in Advance,  
Regards

---

<div class="post-metadata">

**Author:** ![AakankshaS](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aakankshas/32/14047_2.png) [@AakankshaS](https://forums.developer.nvidia.com/u/AakankshaS)\
**Post date:** [August 17, 2020, 9:08am UTC](https://forums.developer.nvidia.com/t/how-to-do-int8-calibration-for-faster-rcnn/147135/2 "2020-08-17T09:08:19Z")

</div>

Hi @nssreenivasalu,  
Request you to take reference from the sample  
[https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleINT8](https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleINT8)  
However, to address teh error you are getting, you may check the below link.  
[https://github.com/NVIDIA/TensorRT/issues/289](https://github.com/NVIDIA/TensorRT/issues/289)

Thanks!
