MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_F

Function TEST_F

tensorflow/contrib/session_bundle/signature_test.cc:301–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299};
300
301TEST_F(RunClassificationTest, Basic) {
302 input_tensor_ = test::AsTensor<int>({99});
303 session_.outputs = {test::AsTensor<int>({3}), test::AsTensor<int>({2})};
304 const Status status = RunClassification(signature_, input_tensor_, &session_,
305 &classes_tensor_, &scores_tensor_);
306
307 // Validate outputs.
308 TF_ASSERT_OK(status);
309 test::ExpectTensorEqual<int>(test::AsTensor<int>({3}), classes_tensor_);
310 test::ExpectTensorEqual<int>(test::AsTensor<int>({2}), scores_tensor_);
311
312 // Validate inputs.
313 ASSERT_EQ(1, session_.inputs.size());
314 EXPECT_EQ(kInputName, session_.inputs[0].first);
315 test::ExpectTensorEqual<int>(test::AsTensor<int>({99}),
316 session_.inputs[0].second);
317
318 ASSERT_EQ(2, session_.output_tensor_names.size());
319 EXPECT_EQ(kClassesName, session_.output_tensor_names[0]);
320 EXPECT_EQ(kScoresName, session_.output_tensor_names[1]);
321}
322
323TEST_F(RunClassificationTest, ClassesOnly) {
324 input_tensor_ = test::AsTensor<int>({99});

Callers

nothing calls this directly

Calls 12

RunClassificationFunction · 0.85
RunRegressionFunction · 0.85
GetGenericSignatureFunction · 0.85
BindGenericInputsFunction · 0.85
BindGenericNamesFunction · 0.85
StrContainsFunction · 0.50
sizeMethod · 0.45
okMethod · 0.45
insertMethod · 0.45
tensor_nameMethod · 0.45
atMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected