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

Method Compute

tensorflow/core/kernels/maxpooling_op.cc:814–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812 }
813
814 void Compute(OpKernelContext* context) override {
815 const Tensor& tensor_in = context->input(0);
816
817 PoolParameters params{context, ksize_, stride_,
818 padding_, data_format_, tensor_in.shape()};
819 if (!context->status().ok()) {
820 return;
821 }
822
823 TensorShape out_shape({params.tensor_in_batch, params.out_height,
824 params.out_width, params.depth});
825 Tensor* output = nullptr;
826 OP_REQUIRES_OK(context, context->allocate_output(0, out_shape, &output));
827
828 LaunchMaxPoolingNoMask<Device, T>::launch(context, params, tensor_in,
829 output);
830 }
831
832 private:
833 std::vector<int32> ksize_;

Callers

nothing calls this directly

Calls 6

launchFunction · 0.85
allocate_outputMethod · 0.80
inputMethod · 0.45
shapeMethod · 0.45
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected