UNPKG

1.71 kBTypeScriptView Raw
1/// <amd-module name="@tensorflow/tfjs-core/dist/ops/concat_2d" />
2/**
3 * @license
4 * Copyright 2020 Google LLC. All Rights Reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * =============================================================================
17 */
18import { Tensor2D } from '../tensor';
19import { TensorLike } from '../types';
20/**
21 * Concatenates a list of`tf.Tensor2D`s along an axis. See `concat` for details.
22 *
23 * For example, if:
24 * A: shape(2, 3) = | r1, g1, b1 |
25 * | r2, g2, b2 |
26 *
27 * B: shape(2, 3) = | r3, g3, b3 |
28 * | r4, g4, b4 |
29 *
30 * C = tf.concat2d([A, B], axis)
31 *
32 * if axis = 0:
33 * C: shape(4, 3) = | r1, g1, b1 |
34 * | r2, g2, b2 |
35 * | r3, g3, b3 |
36 * | r4, g4, b4 |
37 *
38 * if axis = 1:
39 * C = shape(2, 6) = | r1, g1, b1, r3, g3, b3 |
40 * | r2, g2, b2, r4, g4, b4 |
41 *
42 *
43 * @param tensors A list of `tf.Tensor`s to concatenate.
44 * @param axis The axis to concatenate along.
45 * @return The concatenated array.
46 */
47declare function concat2d_(tensors: Array<Tensor2D | TensorLike>, axis: number): Tensor2D;
48export declare const concat2d: typeof concat2d_;
49export {};