internal change
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 15 Dec 2017 21:54:09 +0000 (13:54 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 15 Dec 2017 21:57:34 +0000 (13:57 -0800)
PiperOrigin-RevId: 179235588

tensorflow/contrib/lite/toco/graph_transformations/propagate_fixed_sizes.cc

index 0760182a2eb8fe4b4831a4439631e39b960539fa..5a95b9961f572e6e4380d34920c81146f7411d8f 100644 (file)
@@ -949,7 +949,10 @@ void ProcessArgMaxOperator(Model* model, ArgMaxOperator* op) {
     return;
   }
 
+  // The current ArgMax implementation only supports 4-dimensional inputs with
+  // the last dimension as the axis to perform ArgMax for.
   const std::vector<int>& input_dims = input_array.shape().dims();
+  CHECK_EQ(input_dims.size(), 4);
   std::vector<int> output_dims;
 
   output_dims.reserve(input_dims.size() - 1);