// auto name = tensor->name();
// Quantization
auto quantization = tensor->quantization();
- auto scale = quantization->scale();
- auto zero_point = quantization->zero_point();
- if (scale != NULL || zero_point != NULL)
- throw std::runtime_error("Quantization is not supported!");
-
- auto details = quantization->details_as_CustomQuantization();
- if (details != NULL)
- throw std::runtime_error("Custom Quantization is not supported");
+ if (quantization != nullptr)
+ {
+ auto scale = quantization->scale();
+ auto zero_point = quantization->zero_point();
+ if (scale != nullptr || zero_point != nullptr)
+ throw std::runtime_error("Quantization is not supported!");
+
+ auto details = quantization->details_as_CustomQuantization();
+ if (details != nullptr)
+ throw std::runtime_error("Custom Quantization is not supported");
+ }
// Variablie
if (tensor->is_variable())
throw std::runtime_error("Variable tensor not supported!");