Apply clang-format.

This commit is contained in:
Thibaut Goetghebuer-Planchon 2020-07-29 15:33:14 +01:00
parent f6c0221749
commit f33883c77a
4 changed files with 22 additions and 20 deletions

View File

@ -127,9 +127,9 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
GetTensorShape(size), GetTensorData<int32>(size),
GetTensorShape(output), GetTensorData<int16_t>(output));
} else {
TF_LITE_KERNEL_LOG(context,
"Output type is %s, requires float, uint8, int8 or int16.",
TfLiteTypeGetName(output->type));
TF_LITE_KERNEL_LOG(
context, "Output type is %s, requires float, uint8, int8 or int16.",
TfLiteTypeGetName(output->type));
return kTfLiteError;
}

View File

@ -197,10 +197,10 @@ TEST_P(ResizeNearestNeighborOpTest, TwoDimensionalResizeInt16) {
});
m.Invoke();
EXPECT_THAT(m.GetOutput<int16_t>(), ElementsAreArray(ArrayFloatNear({
3, 3, -6, //
3, 3, -6, //
9, 9, 12, //
})));
3, 3, -6, //
3, 3, -6, //
9, 9, 12, //
})));
}
TEST_P(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatches) {
ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {2, 2, 2, 1}}, {3, 3},
@ -325,13 +325,13 @@ TEST_P(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatchesInt16) {
});
m.Invoke();
EXPECT_THAT(m.GetOutput<int16_t>(), ElementsAreArray(ArrayFloatNear({
3, 3, 6, //
3, 3, 6, //
9, 9, -12, //
-4, -4, 10, //
-4, -4, 10, //
12, 12, 16, //
})));
3, 3, 6, //
3, 3, 6, //
9, 9, -12, //
-4, -4, 10, //
-4, -4, 10, //
12, 12, 16, //
})));
}
TEST_P(ResizeNearestNeighborOpTest, ThreeDimensionalResizeUInt8) {
ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 2, 2}}, {3, 3},
@ -400,10 +400,10 @@ TEST_P(ResizeNearestNeighborOpTest, ThreeDimensionalResizeInt16) {
});
m.Invoke();
EXPECT_THAT(m.GetOutput<int16_t>(), ElementsAreArray(ArrayFloatNear({
3, 4, 3, 4, -6, 10, //
3, 4, 3, 4, -6, 10, //
10, 12, 10, 12, -14, 16, //
})));
3, 4, 3, 4, -6, 10, //
3, 4, 3, 4, -6, 10, //
10, 12, 10, 12, -14, 16, //
})));
}
INSTANTIATE_TEST_SUITE_P(ResizeNearestNeighborOpTest,
ResizeNearestNeighborOpTest,

View File

@ -701,7 +701,8 @@ TEST(OpVersionTest, VersioningResizeNearestNeighborTest) {
// int16 input is version 4.
fake_op_sig = {
.op = BuiltinOperator_RESIZE_NEAREST_NEIGHBOR,
.input_types = std::vector<TensorType>{TensorType_INT16, TensorType_INT32},
.input_types =
std::vector<TensorType>{TensorType_INT16, TensorType_INT32},
.output_types = std::vector<TensorType>{TensorType_INT16},
};
EXPECT_EQ(GetBuiltinOperatorVersion(fake_op_sig), 4);

View File

@ -186,7 +186,8 @@ std::string FindMinimumRuntimeVersionForOp(tflite::BuiltinOperator op_code,
{{BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, 1}, "1.13.1"},
{{BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, 2}, "1.14.0"},
{{BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, 3}, "2.3.0"},
{{BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, 4}, kPendingReleaseVersion},
{{BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, 4},
kPendingReleaseVersion},
{{BuiltinOperator_RNN, 1}, "1.5.0"},
{{BuiltinOperator_RNN, 2}, "1.14.0"},
{{BuiltinOperator_RNN, 3}, "2.3.0"},