MCPcopy Create free account
hub / github.com/tensorflow/tfjs / sparseSegmentSum

Function sparseSegmentSum

tfjs-backend-webgpu/src/kernels/SparseSegmentSum.ts:23–30  ·  view source on GitHub ↗
(
    args: {inputs: SparseSegmentSumInputs, backend: WebGPUBackend})

Source from the content-addressed store, hash-verified

21import {sparseSegmentReduce} from '../kernel_utils/sparse_segment_reduce';
22
23export function sparseSegmentSum(
24 args: {inputs: SparseSegmentSumInputs, backend: WebGPUBackend}):
25 TensorInfo {
26 const {inputs, backend} = args;
27 const {data, indices, segmentIds} = inputs;
28
29 return sparseSegmentReduce(data, indices, segmentIds, true, backend);
30}
31
32export const sparseSegmentSumConfig: KernelConfig = {
33 kernelName: SparseSegmentSum,

Callers

nothing calls this directly

Calls 1

sparseSegmentReduceFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…