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

Function GetFlatInt64

tensorflow/core/ops/array_ops.cc:2441–2446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2439// Converts Tensor to flat std::vector<int64>.
2440template <typename InputType>
2441std::vector<int64> GetFlatInt64(const Tensor& t) {
2442 std::vector<int64> output(t.shape().num_elements());
2443 auto eigen_vec = t.flat<InputType>();
2444 std::copy_n(&eigen_vec(0), output.size(), output.begin());
2445 return output;
2446}
2447
2448// Converts int32 or int64 Tensor to flat std::vector<int64>.
2449std::vector<int64> GetFlatInt64(const Tensor& t) {

Callers 2

SpaceToBatchShapeHelperFunction · 0.85
BatchToSpaceShapeHelperFunction · 0.85

Calls 5

num_elementsMethod · 0.45
shapeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected