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

Method dim

tensorflow/go/tensor_handle.go:99–106  ·  view source on GitHub ↗

dim returns the size of the index'th dimension of the TensorHandle. It blocks until the operation that produces the handle has completed.

(index int)

Source from the content-addressed store, hash-verified

97// dim returns the size of the index'th dimension of the TensorHandle. It
98// blocks until the operation that produces the handle has completed.
99func (th *TensorHandle) dim(index int) (int64, error) {
100 status := newStatus()
101 n := int64(C.TFE_TensorHandleDim(th.c, C.int(index), status.c))
102 if err := status.Err(); err != nil {
103 return 0, err
104 }
105 return n, nil
106}
107
108// DeviceName returns the name of the device of the operation that produced the
109// TensorHandle. If the handle was produced by a copy, it returns the

Callers 1

ShapeMethod · 0.95

Calls 3

newStatusFunction · 0.85
int64Function · 0.85
ErrMethod · 0.45

Tested by

no test coverage detected