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

Function FillIota

tensorflow/core/framework/tensor_testutil.h:82–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80// test::FillIota<float>(&x, 1.0);
81template <typename T>
82void FillIota(Tensor* tensor, const T& val) {
83 auto flat = tensor->flat<T>();
84 std::iota(flat.data(), flat.data() + flat.size(), val);
85}
86
87// Fills in '*tensor' with a sequence of value of fn(0), fn(1), ...
88// Tensor x(&alloc, DT_FLOAT, TensorShape({2, 2}));

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected