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

Function AllocateOutputWithShape

tensorflow/core/kernels/random_op.cc:56–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54namespace {
55
56static Status AllocateOutputWithShape(OpKernelContext* ctx, const Tensor& shape,
57 int index, Tensor** output) {
58 TensorShape tensor_shape;
59 TF_RETURN_IF_ERROR(ctx->op_kernel().MakeShape(shape, &tensor_shape));
60 return ctx->allocate_output(index, tensor_shape, output);
61}
62
63// For now, use the same interface as RandomOp, so we can choose either one
64// at the run-time.

Callers 2

ComputeMethod · 0.85
ComputeMethod · 0.85

Calls 2

allocate_outputMethod · 0.80
MakeShapeMethod · 0.45

Tested by

no test coverage detected