profile
viewpoint

Ask questionsQuantisation of object detection models.

❓ Questions and Help

Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of listed resources available on the website. Our primary means of support is our discussion forum:

Any examples to quantise object detection models ?

I get the following error when I follow the quantization tutorial for a Faster-RCNN model.

RuntimeError: Didn't find kernel to dispatch to for operator 'quantized::conv2d'. Tried to look up kernel for dispatch key 'CPUTensorId'. Registered dispatch keys are: [QuantizedCPUTensorId] (lookup_ at /pytorch/aten/src/ATen/core/dispatch/DispatchTable.h:249)

cc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100

pytorch/pytorch

Answer questions vikashranjan

I used the following to quantise input tensor

scale, zero_point, dtype = 1.0, 2, torch.qint8
quantize_tensor = torch.nn.quantized.Quantize(scale, zero_point, dtype)
input_tensor=quantize_tensor(input_tensor)

I now get the following error.

RuntimeError: No function is registered for schema aten::empty.memory_format(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor on tensor type QuantizedCPUTensorId; available functions are CPUTensorId, CUDATensorId, MkldnnCPUTensorId, SparseCPUTensorId, SparseCUDATensorId, VariableTensorId

It will be helpful if there is any sample code to apply quantisation to TORCHVISION object detection models.

useful!

Related questions

TensorBoard logging requires TensorBoard with Python summary writer installed. This should be available in 1.14 or above hot 3
AttributeError: module 'torch.jit' has no attribute 'unused' hot 3
Script freezes with no output when using DistributedDataParallel hot 2
Adding Pixel Unshuffle hot 2
DataLoader leaking Semaphores. hot 2
[feature request] Add matrix exponential hot 2
cublas runtime error on torch.bmm() with CUDA10 and RTX2080Ti hot 2
libtorch does not initialize OpenMP/MKL by default hot 2
Use torch.device() with torch.load(..., map_location=torch.device()) hot 2
Cuda required when loading a TorchScript with map_location='cpu' hot 2
PyTorch 1.5 failed to import c:miniconda3-x64envs estlibsite-packages orchlibcaffe2_nvrtc.dll - pytorch hot 2
Error during import torch, NameError: name '_C' is not defined - pytorch hot 2
Problems with install python from source hot 2
torch.utils.tensorboard.SummaryWriter.add_graph do not support non-tensor inputs - pytorch hot 2
a retrained and saved jit module could not be reload. hot 2
source:https://uonfu.com/
Github User Rank List