UNPKG

1.85 kBTypeScriptView Raw
1/// <amd-module name="@tensorflow/tfjs-core/dist/ops/concat_3d" />
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 { Tensor3D } from '../tensor';
19import { TensorLike } from '../types';
20/**
21 * Concatenates a list of `tf.Tensor3D`s along an axis.
22 * See `concat` for details.
23 *
24 * For example, if:
25 * A: shape(2, 1, 3) = | r1, g1, b1 |
26 * | r2, g2, b2 |
27 *
28 * B: shape(2, 1, 3) = | r3, g3, b3 |
29 * | r4, g4, b4 |
30 *
31 * C = tf.concat3d([A, B], axis)
32 *
33 * if axis = 0:
34 * C: shape(4, 1, 3) = | r1, g1, b1 |
35 * | r2, g2, b2 |
36 * | r3, g3, b3 |
37 * | r4, g4, b4 |
38 *
39 * if axis = 1:
40 * C: shape(2, 2, 3) = | r1, g1, b1, r3, g3, b3 |
41 * | r2, g2, b2, r4, g4, b4 |
42 *
43 * if axis = 2:
44 * C = shape(2, 1, 6) = | r1, g1, b1, r3, g3, b3 |
45 * | r2, g2, b2, r4, g4, b4 |
46 *
47 * @param tensors A list of`tf.Tensor`s to concatenate.
48 * @param axis The axis to concate along.
49 * @return The concatenated array.
50 */
51declare function concat3d_(tensors: Array<Tensor3D | TensorLike>, axis: number): Tensor3D;
52export declare const concat3d: typeof concat3d_;
53export {};