W3cubDocs

/TensorFlow Python

tf.contrib.kfac.utils.extract_pointwise_conv2d_patches

tf.contrib.kfac.utils.extract_pointwise_conv2d_patches(
    inputs,
    filter_shape,
    name=None,
    data_format=None
)

Defined in tensorflow/contrib/kfac/python/ops/utils.py.

Extract patches for a 1x1 conv2d.

Args:

  • inputs: 4-D Tensor of shape [batch_size, height, width, in_channels].
  • filter_shape: List of 4 ints. Shape of filter to apply with conv2d()
  • name: None or str. Name for Op.
  • data_format: None or str. Format for data. See 'data_format' in tf.nn.conv2d() for details.

Returns:

Tensor of shape [batch_size, ..spatial_input_shape.., ..spatial_filter_shape.., in_channels]

Raises:

  • ValueError: if inputs is not 4-D.
  • ValueError: if filter_shape is not [1, 1, ?, ?]
  • ValueError: if data_format is not channels-last.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/kfac/utils/extract_pointwise_conv2d_patches