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

Function TF_TensorElementCount

tensorflow/c/tf_tensor.cc:183–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183int64_t TF_TensorElementCount(const TF_Tensor* t) {
184 int64_t result = 1;
185 int rank = TF_NumDims(t);
186 for (int dim = 0; dim < rank; ++dim) {
187 result *= TF_Dim(t, dim);
188 }
189 return result;
190}
191
192void TF_TensorBitcastFrom(const TF_Tensor* from, TF_DataType type,
193 TF_Tensor* to, const int64_t* new_dims,

Callers 1

TESTFunction · 0.85

Calls 2

TF_NumDimsFunction · 0.85
TF_DimFunction · 0.85

Tested by 1

TESTFunction · 0.68