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

Method ExpectOutputValue

tensorflow/c/while_loop_test.cc:96–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 void ExpectOutputValue(int idx, int expected_value) {
97 TF_Tensor* out = csession_->output_tensor(idx);
98 ASSERT_TRUE(out != nullptr);
99 EXPECT_EQ(TF_INT32, TF_TensorType(out));
100 EXPECT_EQ(0, TF_NumDims(out));
101 ASSERT_EQ(sizeof(int32_t), TF_TensorByteSize(out));
102 int32_t* data = static_cast<int32_t*>(TF_TensorData(out));
103 EXPECT_EQ(expected_value, *data);
104 }
105
106 // Create a valid conditional graph. Useful for testing unrelated errors.
107 void CreateCondGraph() {

Callers

nothing calls this directly

Calls 5

TF_TensorTypeFunction · 0.85
TF_NumDimsFunction · 0.85
TF_TensorByteSizeFunction · 0.85
TF_TensorDataFunction · 0.85
output_tensorMethod · 0.45

Tested by

no test coverage detected