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

Method Size

tensorflow/go/shape.go:61–66  ·  view source on GitHub ↗

Size returns the size of the dim-th dimension of the shape, or -1 if it is unknown. REQUIRES: 0 <= dim < s.NumDimensions()

(dim int)

Source from the content-addressed store, hash-verified

59//
60// REQUIRES: 0 <= dim < s.NumDimensions()
61func (s Shape) Size(dim int) int64 {
62 if dim < 0 || dim >= s.NumDimensions() {
63 return -1
64 }
65 return s.dims[dim]
66}
67
68// IsFullySpecified returns true iff the size of all the dimensions of s are
69// known.

Callers 4

mainFunction · 0.45
NewTensorFunction · 0.45
ReadTensorFunction · 0.45

Calls 1

NumDimensionsMethod · 0.95

Tested by 1