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

Function IsSingleFloatValue

tensorflow/core/debug/grpc_session_debug_test.cc:74–78  ·  view source on GitHub ↗

Asserts that "val" is a single float tensor. The only float is "expected_val".

Source from the content-addressed store, hash-verified

72// Asserts that "val" is a single float tensor. The only float is
73// "expected_val".
74void IsSingleFloatValue(const Tensor& val, float expected_val) {
75 ASSERT_EQ(val.dtype(), DT_FLOAT);
76 ASSERT_EQ(val.NumElements(), 1);
77 ASSERT_EQ(val.flat<float>()(0), expected_val);
78}
79
80SessionOptions Options(const string& target, int placement_period) {
81 SessionOptions options;

Callers 1

TEST_FFunction · 0.70

Calls 2

dtypeMethod · 0.45
NumElementsMethod · 0.45

Tested by

no test coverage detected