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

Method Dim

tensorflow/core/framework/shape_inference.h:342–347  ·  view source on GitHub ↗

idx can be negative for an offset from end of dimensions. idx must be in the range [-1 * s.rank, s.rank).

Source from the content-addressed store, hash-verified

340 // idx can be negative for an offset from end of dimensions.
341 // idx must be in the range [-1 * s.rank, s.rank).
342 DimensionHandle Dim(ShapeHandle s, int64 idx) {
343 if (s->rank_ == kUnknownRank) {
344 return UnknownDim();
345 }
346 return DimKnownRank(s, idx);
347 }
348 // As above, but asserts that the rank of the shape is known.
349 static DimensionHandle DimKnownRank(ShapeHandle s, int64 idx) {
350 CHECK_NE(s->rank_, kUnknownRank);

Callers 15

MatMulShapeFunction · 0.45
MatMulGradFilterShapeFunction · 0.45
EinsumShapeFunction · 0.45
BatchMatMulV2ShapeFunction · 0.45
BatchMatMulShapeFunction · 0.45
BiasAddShapeFunction · 0.45
BiasAddGradShapeFunction · 0.45
DimensionsFromShapeFunction · 0.45
Conv2DShapeImplFunction · 0.45
Conv3DShapeFunction · 0.45

Calls

no outgoing calls

Tested by 4

TESTFunction · 0.36
InferShapesMethod · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36