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

Method ToTensor

tensorflow/go/tensor_handle.go:146–153  ·  view source on GitHub ↗

ToTensor returns the Tensor referenced by th. It may block if this tensor is not yet computed.

()

Source from the content-addressed store, hash-verified

144// ToTensor returns the Tensor referenced by th. It may block if this tensor is
145// not yet computed.
146func (th *TensorHandle) ToTensor() (*Tensor, error) {
147 status := newStatus()
148 cTensor := C.TFE_TensorHandleResolve(th.c, status.c)
149 if err := status.Err(); err != nil {
150 return nil, err
151 }
152 return newTensorFromC(cTensor), nil
153}
154
155// CopyToDevice creates a new TensorHandle with the same contents as this
156// TensorHandle but placed in the memory of the device 'deviceName'. If source

Callers 1

TestTensorHandleToTensorFunction · 0.95

Calls 3

newStatusFunction · 0.85
newTensorFromCFunction · 0.85
ErrMethod · 0.45

Tested by 1

TestTensorHandleToTensorFunction · 0.76