| 271 | }; |
| 272 | |
| 273 | TEST_F(FreezeTest, InputsAndOutputsSingleSignatureDef) { |
| 274 | // Test that inputs and outputs get correctly populated for a single |
| 275 | // SignatureDef. |
| 276 | SavedModelBundle saved_model_bundle; |
| 277 | std::unordered_set<string> expected_inputs = {"input0:0", "input1:0"}; |
| 278 | std::unordered_set<string> expected_outputs = {"output0:0", "output1:0"}; |
| 279 | SignatureDef signature_def = |
| 280 | BuildSignatureDef(expected_inputs, expected_outputs); |
| 281 | AddSignatureDefToSavedModelBundle(signature_def, "signature_def", |
| 282 | &saved_model_bundle); |
| 283 | GraphDef frozen_graph_def; |
| 284 | std::unordered_set<string> inputs; |
| 285 | std::unordered_set<string> outputs; |
| 286 | TF_ASSERT_OK(FreezeSavedModel(saved_model_bundle, &frozen_graph_def, &inputs, |
| 287 | &outputs)); |
| 288 | EXPECT_EQ(expected_inputs, inputs); |
| 289 | EXPECT_EQ(expected_outputs, outputs); |
| 290 | } |
| 291 | |
| 292 | TEST_F(FreezeTest, InputsAndOutputsMultipleSignatureDefs) { |
| 293 | // Test that inputs and outputs get correctly merged and populated when |
nothing calls this directly
no test coverage detected