MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetQuantizationScale

Method GetQuantizationScale

src/armnn/Tensor.cpp:461–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461float TensorInfo::GetQuantizationScale() const
462{
463 if (m_Quantization.m_Scales.empty())
464 {
465 // NOTE: old default for backward compatibility
466 return 1.0f;
467 }
468
469 if (HasMultipleQuantizationScales())
470 {
471 throw RuntimeException("Invalid call to GetQuantizationScale on a tensor with multiple scale values. Use "
472 "GetQuantizationScales instead.");
473 }
474 return m_Quantization.m_Scales[0];
475}
476
477void TensorInfo::SetQuantizationScale(float scale)
478{

Calls 2

RuntimeExceptionClass · 0.85
emptyMethod · 0.80