When converting an unsupported op in TOCO, we can possibly infer the output type...
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 18 May 2018 19:08:32 +0000 (12:08 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 18 May 2018 19:11:23 +0000 (12:11 -0700)
PiperOrigin-RevId: 197181552

tensorflow/contrib/lite/toco/import_tensorflow.cc

index 3002857..9c35867 100644 (file)
@@ -1362,6 +1362,9 @@ void ConvertUnsupportedOperator(const NodeDef& node,
     for (int i = 0; i < output_types.type_size(); ++i) {
       op->output_data_types.push_back(ConvertDataType(output_types.type(i)));
     }
+  } else if (HasAttr(node, "Tout")) {
+    const auto& output_type = GetDataTypeAttr(node, "Tout");
+    op->output_data_types.push_back(ConvertDataType(output_type));
   }
 }