MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / conv3d_transpose_v2

Function conv3d_transpose_v2

tensorflow/python/ops/nn_ops.py:2577–2639  ·  view source on GitHub ↗

The transpose of `conv3d`. This operation is sometimes called "deconvolution" after [Deconvolutional Networks](http://www.matthewzeiler.com/pubs/cvpr2010/cvpr2010.pdf), but is actually the transpose (gradient) of `conv2d` rather than an actual deconvolution. Args: input: A 5-D `Tenso

(input,  # pylint: disable=redefined-builtin
                        filters,
                        output_shape,
                        strides,
                        padding="SAME",
                        data_format="NDHWC",
                        dilations=None,
                        name=None)

Source from the content-addressed store, hash-verified

2575
2576@tf_export("nn.conv3d_transpose", v1=[])
2577def conv3d_transpose_v2(input, # pylint: disable=redefined-builtin
2578 filters,
2579 output_shape,
2580 strides,
2581 padding="SAME",
2582 data_format="NDHWC",
2583 dilations=None,
2584 name=None):
2585 """The transpose of `conv3d`.
2586
2587 This operation is sometimes called "deconvolution" after [Deconvolutional
2588 Networks](http://www.matthewzeiler.com/pubs/cvpr2010/cvpr2010.pdf), but is
2589 actually the transpose (gradient) of `conv2d` rather than an actual
2590 deconvolution.
2591
2592 Args:
2593 input: A 5-D `Tensor` of type `float` and shape `[batch, height, width,
2594 in_channels]` for `NHWC` data format or `[batch, in_channels, height,
2595 width]` for `NCHW` data format.
2596 filters: A 5-D `Tensor` with the same type as `value` and shape `[height,
2597 width, output_channels, in_channels]`. `filter`'s `in_channels` dimension
2598 must match that of `value`.
2599 output_shape: A 1-D `Tensor` representing the output shape of the
2600 deconvolution op.
2601 strides: An int or list of `ints` that has length `1`, `3` or `5`. The
2602 stride of the sliding window for each dimension of `input`. If a single
2603 value is given it is replicated in the `D`, `H` and `W` dimension. By
2604 default the `N` and `C` dimensions are set to 0. The dimension order is
2605 determined by the value of `data_format`, see below for details.
2606 padding: A string, either `'VALID'` or `'SAME'`. The padding algorithm. See
2607 the "returns" section of `tf.nn.convolution` for details.
2608 data_format: A string. 'NDHWC' and 'NCDHW' are supported.
2609 dilations: An int or list of `ints` that has length `1`, `3` or `5`,
2610 defaults to 1. The dilation factor for each dimension of`input`. If a
2611 single value is given it is replicated in the `D`, `H` and `W` dimension.
2612 By default the `N` and `C` dimensions are set to 1. If set to k > 1, there
2613 will be k-1 skipped cells between each filter element on that dimension.
2614 The dimension order is determined by the value of `data_format`, see above
2615 for details. Dilations in the batch and depth dimensions if a 5-d tensor
2616 must be 1.
2617 name: Optional name for the returned tensor.
2618
2619 Returns:
2620 A `Tensor` with the same type as `value`.
2621 """
2622 with ops.name_scope(name, "conv3d_transpose",
2623 [input, filter, output_shape]) as name:
2624 if data_format is None:
2625 data_format = "NDHWC"
2626 channel_index = 1 if data_format.startswith("NC") else 4
2627
2628 strides = _get_sequence(strides, 3, channel_index, "strides")
2629 dilations = _get_sequence(dilations, 3, channel_index, "dilations")
2630
2631 return gen_nn_ops.conv3d_backprop_input_v2(
2632 input_sizes=output_shape,
2633 filter=filters,
2634 out_backprop=input,

Callers 1

conv3d_transposeFunction · 0.85

Calls 2

_get_sequenceFunction · 0.70
name_scopeMethod · 0.45

Tested by

no test coverage detected