UNPKG

@tensorflow/tfjs-core

Version:

Hardware-accelerated JavaScript library for machine intelligence

34 lines 930 B
import { concat } from './concat'; import { op } from './operation'; /** * Concatenates a list of`tf.Tensor2D`s along an axis. See `concat` for details. * * For example, if: * A: shape(2, 3) = | r1, g1, b1 | * | r2, g2, b2 | * * B: shape(2, 3) = | r3, g3, b3 | * | r4, g4, b4 | * * C = tf.concat2d([A, B], axis) * * if axis = 0: * C: shape(4, 3) = | r1, g1, b1 | * | r2, g2, b2 | * | r3, g3, b3 | * | r4, g4, b4 | * * if axis = 1: * C = shape(2, 6) = | r1, g1, b1, r3, g3, b3 | * | r2, g2, b2, r4, g4, b4 | * * * @param tensors A list of `tf.Tensor`s to concatenate. * @param axis The axis to concatenate along. * @return The concatenated array. */ function concat2d_(tensors, axis) { return concat(tensors, axis); } export const concat2d = op({ concat2d_ }); //# sourceMappingURL=concat_2d.js.map