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)
| 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. |
| 99 | func (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 |