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

Method CopyFrom

tensorflow/core/framework/tensor.h:314–319  ·  view source on GitHub ↗

\brief Copy the other tensor into this tensor and reshape it. This tensor shares other's underlying storage. Returns `true` iff `other.shape()` has the same number of elements of the given `shape`.

Source from the content-addressed store, hash-verified

312 /// iff `other.shape()` has the same number of elements of the given
313 /// `shape`.
314 bool CopyFrom(const Tensor& other,
315 const TensorShape& shape) TF_MUST_USE_RESULT {
316 if (other.NumElements() != shape.num_elements()) return false;
317 CopyFromInternal(other, shape);
318 return true;
319 }
320
321 /// \brief Slice this tensor along the 1st dimension.
322

Callers 15

TEST_FFunction · 0.45
TestCopiesFunction · 0.45
TESTFunction · 0.45
forward_inputMethod · 0.45
StrippedOpListForGraphFunction · 0.45
AsTensorFunction · 0.45
TESTFunction · 0.45
MergeNodesFunction · 0.45
LazyConjunctionNodesFunction · 0.45
RunTestMethod · 0.45
DoGatherMethod · 0.45

Calls 2

NumElementsMethod · 0.45
num_elementsMethod · 0.45

Tested by 15

TEST_FFunction · 0.36
TestCopiesFunction · 0.36
TESTFunction · 0.36
AsTensorFunction · 0.36
TESTFunction · 0.36
RunTestMethod · 0.36
DoGatherMethod · 0.36
RunTestMethod · 0.36
DoReduceMethod · 0.36
RunTestMethod · 0.36
DoBroadcastMethod · 0.36
ReadOutputNodeMethod · 0.36