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

Function AsScalar

tensorflow/core/framework/tensor_testutil.h:31–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// Constructs a scalar tensor with 'val'.
30template <typename T>
31Tensor AsScalar(const T& val) {
32 Tensor ret(DataTypeToEnum<T>::value, {});
33 ret.scalar<T>()() = val;
34 return ret;
35}
36
37// Constructs a flat tensor with 'vals'.
38template <typename T>

Callers 11

TEST_FFunction · 0.50
PackGradFunction · 0.50
UnpackGradFunction · 0.50
ConcatGradFunction · 0.50
ConcatGradV2Function · 0.50
TESTFunction · 0.50
SplitGradFunction · 0.50
SplitVGradFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected