Skip to content

Commit 360b45f

Browse files
committed
reformat layers-conv1d-transpose
1 parent f9364d4 commit 360b45f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ivy/functional/backends/numpy/layers.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,41 @@ def conv1d_transpose(
181181
bias: Optional[np.ndarray] = None,
182182
out: Optional[np.ndarray] = None,
183183
) -> np.ndarray:
184+
"""Compute a 1-D transpose convolution given 3-D input x and filters arrays.
185+
186+
Parameters
187+
----------
188+
x
189+
Input image *[batch_size,w,d_in]* or *[batch_size,d_in,w]*.
190+
filters
191+
Convolution filters *[fw,d_out,d_in]*.
192+
strides
193+
The stride of the sliding window for each dimension of input.
194+
padding
195+
Either 'SAME' (padding so that the output's shape is the same as the
196+
input's), or 'VALID' (padding so that the output's shape is `output_shape`).
197+
output_shape
198+
Shape of the output (Default value = None)
199+
filter_format
200+
Either "channel_first" or "channel_last". "channel_first" corresponds
201+
to "IOW",input data formats, while "channel_last" corresponds to "WOI".
202+
data_format
203+
The ordering of the dimensions in the input, one of "NWC" or "NCW". "NWC"
204+
corresponds to input with shape (batch_size, width, channels), while "NCW"
205+
corresponds to input with shape (batch_size, channels, width).
206+
dilations
207+
The dilation factor for each dimension of input. (Default value = 1)
208+
bias
209+
Bias array of shape *[d_out]*.
210+
out
211+
optional output array, for writing the result to. It must have a shape that the
212+
inputs broadcast to.
213+
214+
Returns
215+
-------
216+
ret
217+
The result of the transpose convolution operation.
218+
"""
184219
if data_format == "NCW":
185220
x = np.transpose(x, (0, 2, 1))
186221
if filter_format == "channel_last":

0 commit comments

Comments
 (0)