Bug fix.
This commit is contained in:
parent
0d1f2d0bcc
commit
bfdffb2adb
@ -537,14 +537,7 @@ void TFE_ContextAddFunctionDef(TFE_Context* ctx,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
||||||
TFE_TensorHandle* TFE_NewTensorHandle(const tensorflow::Tensor& t) {
|
TFE_TensorHandle* TFE_NewTensorHandle(const tensorflow::Tensor& t) {
|
||||||
TF_Status* status = TF_NewStatus();
|
return new TFE_TensorHandle(t, nullptr);
|
||||||
TFE_TensorHandle* tensor = TFE_NewTensorHandle(t, status);
|
|
||||||
if (TF_GetCode(status) != TF_OK) {
|
|
||||||
TF_DeleteStatus(status);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
TF_DeleteStatus(status);
|
|
||||||
return tensor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const tensorflow::Tensor* TFE_TensorHandleUnderlyingTensorInHostMemory(
|
const tensorflow::Tensor* TFE_TensorHandleUnderlyingTensorInHostMemory(
|
||||||
|
Loading…
Reference in New Issue
Block a user