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

Method AsEigenDSizesWithPadding

tensorflow/core/framework/tensor_shape.h:529–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527
528template <int NDIMS, typename IndexType>
529Eigen::DSizes<IndexType, NDIMS> TensorShape::AsEigenDSizesWithPadding() const {
530 CheckDimsAtLeast(NDIMS);
531 static_assert(NDIMS <= TensorShape::MaxDimensions(), "Too many dimensions");
532 Eigen::DSizes<IndexType, NDIMS> dsizes;
533 for (int d = 0; d < dims(); d++) {
534 dsizes[d] = static_cast<IndexType>(dim_size(d));
535 }
536 for (int d = dims(); d < NDIMS; d++) {
537 dsizes[d] = 1;
538 }
539 return dsizes;
540}
541
542// ----------------------------------------------------------------------------
543// Inlining of some performance critical routines

Callers

nothing calls this directly

Calls 1

dimsFunction · 0.85

Tested by

no test coverage detected