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

Method Initializer

tensorflow/cc/framework/ops.h:111–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 std::is_arithmetic<T>::value ||
110 std::is_convertible<T, string>::value>::type>
111 Initializer(const T& v) { // NOLINT(runtime/explicit)
112 typedef typename RealType<T>::type RealT;
113 Tensor t(DataTypeToEnum<RealT>::v(), TensorShape());
114 t.flat<RealT>()(0) = RealT(v);
115 tensor = t;
116 }
117
118 Initializer(const Tensor& t) : tensor(t) {} // NOLINT(runtime/explicit)
119

Callers

nothing calls this directly

Calls 6

InvalidArgumentFunction · 0.85
TensorShapeClass · 0.50
NumElementsMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected