Fix type mismatch crash in CombinedNMS test. Fix compilation error due to absl::InlinedVector

This commit is contained in:
Trevor Morris 2019-03-27 11:19:49 -07:00
parent 5770e124af
commit 0a9195cc36
2 changed files with 3 additions and 2 deletions

View File

@ -214,7 +214,8 @@ inline nvinfer1::Dims TensorShapeToTrtDims(const TensorShapeType& shape,
return trt_dims;
}
Status TensorShapeArrayToTrtDims(const std::vector<int>& shape,
template <typename Container>
Status TensorShapeArrayToTrtDims(const Container& shape,
nvinfer1::Dims* out,
bool ignore_first_dim = false) {
PartialTensorShape tensor_shape;

View File

@ -2427,7 +2427,7 @@ TEST_F(OpConverterTest, ConvertCombinedNMS) {
ElementsAre(0, 0, 0.3, 0.4, 0, 0, 0.3, 0.4));
EXPECT_THAT(GetSpanForData<float>(output_data[1]), ElementsAre(0.7, 0.4));
EXPECT_THAT(GetSpanForData<float>(output_data[2]), ElementsAre(1, 0));
EXPECT_THAT(GetSpanForData<float>(output_data[3]), ElementsAre(2));
EXPECT_THAT(GetSpanForData<int32>(output_data[3]), ElementsAre(2));
}
}