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

Method NumDimensions

tensorflow/go/shape.go:50–55  ·  view source on GitHub ↗

NumDimensions returns the number of dimensions represented by s, or -1 if unknown.

()

Source from the content-addressed store, hash-verified

48// NumDimensions returns the number of dimensions represented by s, or -1 if
49// unknown.
50func (s Shape) NumDimensions() int {
51 if s.dims == nil {
52 return -1
53 }
54 return len(s.dims)
55}
56
57// Size returns the size of the dim-th dimension of the shape, or -1 if it
58// is unknown.

Callers 5

TestZeroShapeFunction · 0.95
SizeMethod · 0.95
TestShapeFunction · 0.80
setAttrFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestZeroShapeFunction · 0.76
TestShapeFunction · 0.64