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

Function atrous_conv2d

tensorflow/python/ops/nn_ops.py:1455–1588  ·  view source on GitHub ↗

Atrous convolution (a.k.a. convolution with holes or dilated convolution). This function is a simpler wrapper around the more general `tf.nn.convolution`, and exists only for backwards compatibility. You can use `tf.nn.convolution` to perform 1-D, 2-D, or 3-D atrous convolution. Computes

(value, filters, rate, padding, name=None)

Source from the content-addressed store, hash-verified

1453
1454@tf_export("nn.atrous_conv2d")
1455def atrous_conv2d(value, filters, rate, padding, name=None):
1456 """Atrous convolution (a.k.a. convolution with holes or dilated convolution).
1457
1458 This function is a simpler wrapper around the more general
1459 `tf.nn.convolution`, and exists only for backwards compatibility. You can
1460 use `tf.nn.convolution` to perform 1-D, 2-D, or 3-D atrous convolution.
1461
1462
1463 Computes a 2-D atrous convolution, also known as convolution with holes or
1464 dilated convolution, given 4-D `value` and `filters` tensors. If the `rate`
1465 parameter is equal to one, it performs regular 2-D convolution. If the `rate`
1466 parameter is greater than one, it performs convolution with holes, sampling
1467 the input values every `rate` pixels in the `height` and `width` dimensions.
1468 This is equivalent to convolving the input with a set of upsampled filters,
1469 produced by inserting `rate - 1` zeros between two consecutive values of the
1470 filters along the `height` and `width` dimensions, hence the name atrous
1471 convolution or convolution with holes (the French word trous means holes in
1472 English).
1473
1474 More specifically:
1475
1476 ```
1477 output[batch, height, width, out_channel] =
1478 sum_{dheight, dwidth, in_channel} (
1479 filters[dheight, dwidth, in_channel, out_channel] *
1480 value[batch, height + rate*dheight, width + rate*dwidth, in_channel]
1481 )
1482 ```
1483
1484 Atrous convolution allows us to explicitly control how densely to compute
1485 feature responses in fully convolutional networks. Used in conjunction with
1486 bilinear interpolation, it offers an alternative to `conv2d_transpose` in
1487 dense prediction tasks such as semantic image segmentation, optical flow
1488 computation, or depth estimation. It also allows us to effectively enlarge
1489 the field of view of filters without increasing the number of parameters or
1490 the amount of computation.
1491
1492 For a description of atrous convolution and how it can be used for dense
1493 feature extraction, please see: [Semantic Image Segmentation with Deep
1494 Convolutional Nets and Fully Connected CRFs](http://arxiv.org/abs/1412.7062).
1495 The same operation is investigated further in [Multi-Scale Context Aggregation
1496 by Dilated Convolutions](http://arxiv.org/abs/1511.07122). Previous works
1497 that effectively use atrous convolution in different ways are, among others,
1498 [OverFeat: Integrated Recognition, Localization and Detection using
1499 Convolutional Networks](http://arxiv.org/abs/1312.6229) and [Fast Image
1500 Scanning with Deep Max-Pooling Convolutional Neural
1501 Networks](http://arxiv.org/abs/1302.1700).
1502 Atrous convolution is also closely related to the so-called noble identities
1503 in multi-rate signal processing.
1504
1505 There are many different ways to implement atrous convolution (see the refs
1506 above). The implementation here reduces
1507
1508 ```python
1509 atrous_conv2d(value, filters, rate, padding=padding)
1510 ```
1511
1512 to the following three operations:

Callers

nothing calls this directly

Calls 2

broadcast_toMethod · 0.80
convolutionFunction · 0.70

Tested by

no test coverage detected