diff options
author | mbhuiyan <mohammad.ashraf.bhuiyan@intel.com> | 2018-05-16 10:49:29 -0700 |
---|---|---|
committer | mbhuiyan <mohammad.ashraf.bhuiyan@intel.com> | 2018-05-16 10:49:29 -0700 |
commit | 2acf23109aabb2952ce73dee89fe1e63b0e80961 (patch) | |
tree | 54724426fcf6d8d9a5dab57862ae749997dc5fd5 /tensorflow/contrib/lite/toco/tooling_util.cc | |
parent | 7a667f694fc25691d1093019a6fe4e0cd32fd344 (diff) | |
parent | 383e6d48dfd5037bcb5d56937366f1ba12b9a67d (diff) |
resolving the conflict while merging master
Diffstat (limited to 'tensorflow/contrib/lite/toco/tooling_util.cc')
-rw-r--r-- | tensorflow/contrib/lite/toco/tooling_util.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tensorflow/contrib/lite/toco/tooling_util.cc b/tensorflow/contrib/lite/toco/tooling_util.cc index 1f56fe5c83..1e6314f2dc 100644 --- a/tensorflow/contrib/lite/toco/tooling_util.cc +++ b/tensorflow/contrib/lite/toco/tooling_util.cc @@ -337,6 +337,7 @@ const char* OperatorTypeName(OperatorType type) { HANDLE_OPERATORTYPENAME_CASE(LogSoftmax) HANDLE_OPERATORTYPENAME_CASE(Div) HANDLE_OPERATORTYPENAME_CASE(Tanh) + HANDLE_OPERATORTYPENAME_CASE(Sin) HANDLE_OPERATORTYPENAME_CASE(TensorFlowAll) HANDLE_OPERATORTYPENAME_CASE(TensorFlowAssert) HANDLE_OPERATORTYPENAME_CASE(ExpandDims) @@ -986,7 +987,7 @@ void FixOperatorOrdering(Model* model) { for (auto i : remaining) { bool can_insert = true; auto& op = old_operators[i]; - CHECK(op.get()); + CHECK(op); for (const auto& input : op->inputs) { if (!IsConstantParameterArray(*model, input) && !arrays_behind_us.count(input)) { @@ -2073,15 +2074,21 @@ bool ReshapeIsEquivalentToTranspose(const Model& model, void CheckFinalDataTypesSatisfied(const Model& model) { for (const auto& array_entry : model.GetArrayMap()) { const auto& array = *array_entry.second; + if (array.data_type == ArrayDataType::kBool) { + // Boolean values are never quantized. + continue; + } + // If the final data type is int16, the data type may be float, for example // after dequantization. if (array.final_data_type != ArrayDataType::kNone && array.final_data_type != ArrayDataType::kInt16) { - CHECK(array.final_data_type == array.data_type) + CHECK(array.data_type == array.final_data_type) << "Array \"" << array_entry.first - << "\" has mis-matching actual and final data types (" - << ArrayDataTypeName(array.data_type) << "," - << ArrayDataTypeName(array.final_data_type) << ")."; + << "\" has mis-matching actual and final data types (data_type=" + << ArrayDataTypeName(array.data_type) + << ", final_data_type=" << ArrayDataTypeName(array.final_data_type) + << ")."; } } } |