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

Method Compute

tensorflow/core/kernels/list_kernels.cc:337–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 ~TensorListLength() override {}
336
337 void Compute(OpKernelContext* c) override {
338 const TensorList* l = nullptr;
339 OP_REQUIRES_OK(c, GetInputList(c, 0, &l));
340 Tensor* result;
341 OP_REQUIRES_OK(c, c->allocate_output(0, TensorShape{}, &result));
342 result->scalar<int32>()() = l->tensors().size();
343 }
344};
345
346REGISTER_KERNEL_BUILDER(Name("TensorListLength").Device(DEVICE_CPU),

Callers

nothing calls this directly

Calls 4

GetInputListFunction · 0.85
allocate_outputMethod · 0.80
tensorsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected