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

Function FloatTensor

tensorflow/c/c_test_util.cc:97–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97TF_Tensor* FloatTensor(float v) {
98 const int num_bytes = sizeof(float);
99 float* values = new float[1];
100 values[0] = v;
101 return TF_NewTensor(TF_FLOAT, nullptr, 0, values, num_bytes,
102 &FloatDeallocator, nullptr);
103}
104
105// All the *Helper methods are used as a workaround for the restrictions that
106// one cannot call ASSERT_* methods in non-void-returning functions (when

Callers 2

ScalarConstFunction · 0.70
TEST_FFunction · 0.70

Calls 1

TF_NewTensorFunction · 0.85

Tested by

no test coverage detected