MCPcopy Index your code
hub / github.com/tensorflow/tfjs / deepBatchConcat

Function deepBatchConcat

tfjs-data/src/dataset.ts:669–685  ·  view source on GitHub ↗
(rows: any[])

Source from the content-addressed store, hash-verified

667 */
668// tslint:disable-next-line:no-any
669function deepBatchConcat(rows: any[]): DeepMapResult {
670 if (rows === null) {
671 return null;
672 }
673
674 // use the first item to decide whether to recurse or batch here.
675 const exampleRow = rows[0];
676
677 if (canTensorify(exampleRow)) {
678 // rows is an array of primitives, Tensors, or arrays. Batch them.
679 const value = batchConcat(rows);
680 return {value, recurse: false};
681 }
682
683 // the example row is an object, so recurse into it.
684 return {value: null, recurse: true};
685}
686
687/**
688 * Assembles a list of same-shaped numbers, number arrays, or Tensors

Callers

nothing calls this directly

Calls 2

canTensorifyFunction · 0.90
batchConcatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…