Fix typo, AddIntemediateTensorsToFusedOp to AddIntermediateTensorsToFusedOp.
PiperOrigin-RevId: 320276937 Change-Id: Ic6765880c25af50410c46f8f1ee164653b47a4ec
This commit is contained in:
parent
e242717155
commit
a22b28a22a
@ -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());
|
||||
|
@ -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)) {
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user