UNPKG

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