Fix typo, AddIntemediateTensorsToFusedOp to AddIntermediateTensorsToFusedOp.

PiperOrigin-RevId: 320276937
Change-Id: Ic6765880c25af50410c46f8f1ee164653b47a4ec
This commit is contained in:
A. Unique TensorFlower 2020-07-08 15:22:14 -07:00 committed by TensorFlower Gardener
parent e242717155
commit a22b28a22a
4 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ bool CreateModelForCalibration(const std::string& input_path,
return false;
}
flatbuffers::FlatBufferBuilder builder;
if (AddIntemediateTensorsToFusedOp(&builder, &model) != kTfLiteOk) {
if (AddIntermediateTensorsToFusedOp(&builder, &model) != kTfLiteOk) {
return false;
}
return WriteFile(output_path, builder.GetBufferPointer(), builder.GetSize());

View File

@ -66,7 +66,7 @@ TfLiteStatus LoadModel(const string& path, ModelT* model) {
return kTfLiteOk;
}
TfLiteStatus AddIntemediateTensorsToFusedOp(
TfLiteStatus AddIntermediateTensorsToFusedOp(
flatbuffers::FlatBufferBuilder* builder, ModelT* model) {
// Return early if the model already has intermediate tensors.
if (IntermediateTensorExists(model)) {

View File

@ -28,7 +28,7 @@ TfLiteStatus LoadModel(const string& path, ModelT* model);
// Going through the model and add intermediates tensors if the ops have any.
// Returns early if the model has already intermediate tensors. This is to
// support cases where a model is initialized multiple times.
TfLiteStatus AddIntemediateTensorsToFusedOp(
TfLiteStatus AddIntermediateTensorsToFusedOp(
flatbuffers::FlatBufferBuilder* builder, ModelT* model);
// Write model to a given location.

View File

@ -59,7 +59,7 @@ TEST(LstmPreprocess, Add2Tensors) {
// Add 2 tensors.
flatbuffers::FlatBufferBuilder builder;
tflite::optimize::AddIntemediateTensorsToFusedOp(&builder, model.get());
tflite::optimize::AddIntermediateTensorsToFusedOp(&builder, model.get());
// Verify results.
EXPECT_EQ(model->operator_codes.size(), 1);
@ -84,8 +84,8 @@ TEST(LstmPreprocess, Add2Tensors) {
EXPECT_THAT(model->subgraphs[0]->operators[0]->intermediates,
ElementsAreArray({21, 22, 23, 24, 25}));
// Call AddIntemediateTensorsToFusedOp again and expect no change in model.
tflite::optimize::AddIntemediateTensorsToFusedOp(&builder, model.get());
// Call AddIntermediateTensorsToFusedOp again and expect no change in model.
tflite::optimize::AddIntermediateTensorsToFusedOp(&builder, model.get());
// Verify results.
EXPECT_EQ(model->operator_codes.size(), 1);