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

Method Compute

tensorflow/core/kernels/base64_ops.cc:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void Compute(OpKernelContext* context) override {
34 const Tensor& input_tensor = context->input(0);
35 Tensor* output_tensor = nullptr;
36 OP_REQUIRES_OK(context, context->allocate_output(0, input_tensor.shape(),
37 &output_tensor));
38
39 auto input = input_tensor.flat<tstring>();
40 auto output = output_tensor->flat<tstring>();
41
42 for (int64 i = 0; i < input.dimension(0); ++i) {
43 OP_REQUIRES_OK(context, Base64Encode(input(i), pad_, &output(i)));
44 }
45 }
46
47 private:
48 bool pad_;

Callers

nothing calls this directly

Calls 5

Base64EncodeFunction · 0.85
allocate_outputMethod · 0.80
inputMethod · 0.45
shapeMethod · 0.45
dimensionMethod · 0.45

Tested by

no test coverage detected