This commit is contained in:
VoVAllen 2020-02-19 20:49:08 +00:00
parent e61323b14e
commit 3f218b1cd8

View File

@ -125,7 +125,8 @@ DLManagedTensor* TFEHandleToTFDLManagedTensorCtx(TFE_TensorHandle* h,
TF_Status* status) {
const Tensor* tensor = GetTensorFromHandle(h, status);
TF_DataType data_type = static_cast<TF_DataType>(tensor->dtype());
TFDLManagedTensorCtx* tf_dlm_tensor_ctx(new TFDLManagedTensorCtx);
auto* tf_dlm_tensor_ctx = new TFDLManagedTensorCtx;
TensorReference* tensor_ref =
new TensorReference(*tensor); // This will call buf_->Ref()
tf_dlm_tensor_ctx->handle = tensor_ref;