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

Method Compute

tensorflow/core/kernels/bucketize_op.cc:62–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 void Compute(OpKernelContext* context) override {
63 const Tensor& input_tensor = context->input(0);
64 const auto input = input_tensor.flat<T>();
65
66 Tensor* output_tensor = nullptr;
67 OP_REQUIRES_OK(context, context->allocate_output(0, input_tensor.shape(),
68 &output_tensor));
69 auto output = output_tensor->template flat<int32>();
70 OP_REQUIRES_OK(context, functor::BucketizeFunctor<Device, T>::Compute(
71 context, input, boundaries_, output));
72 }
73
74 private:
75 std::vector<float> boundaries_;

Callers

nothing calls this directly

Calls 4

allocate_outputMethod · 0.80
ComputeFunction · 0.70
inputMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected