1 | /// <amd-module name="@tensorflow/tfjs-core/dist/ops/conv2d_transpose" />
|
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 | */
|
18 | import { Tensor3D, Tensor4D } from '../tensor';
|
19 | import { TensorLike } from '../types';
|
20 | import { ExplicitPadding } from './conv_util';
|
21 | /**
|
22 | * Computes the transposed 2D convolution of an image, also known as a
|
23 | * deconvolution.
|
24 | *
|
25 | * @param x The input image, of rank 4 or rank 3, of shape
|
26 | * `[batch, height, width, inDepth]`. If rank 3, batch of 1 is assumed.
|
27 | * @param filter The filter, rank 4, of shape
|
28 | * `[filterHeight, filterWidth, outDepth, inDepth]`.
|
29 | * `inDepth` must match `inDepth` in `x`.
|
30 | * @param outputShape Output shape, of rank 4 or rank 3:
|
31 | * `[batch, height, width, outDepth]`. If rank 3, batch of 1 is assumed.
|
32 | * @param strides The strides of the original convolution:
|
33 | * `[strideHeight, strideWidth]`.
|
34 | * @param pad The type of padding algorithm used in the non-transpose version
|
35 | * of the op.
|
36 | * @param dimRoundingMode A string from: 'ceil', 'round', 'floor'. If none is
|
37 | * provided, it will default to truncate.
|
38 | *
|
39 | * @doc {heading: 'Operations', subheading: 'Convolution'}
|
40 | */
|
41 | declare function conv2dTranspose_<T extends Tensor3D | Tensor4D>(x: T | TensorLike, filter: Tensor4D | TensorLike, outputShape: [number, number, number, number] | [number, number, number], strides: [number, number] | number, pad: 'valid' | 'same' | number | ExplicitPadding, dimRoundingMode?: 'floor' | 'round' | 'ceil'): T;
|
42 | export declare const conv2dTranspose: typeof conv2dTranspose_;
|
43 | export {};
|