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

Function local_conv2d

tensorflow/python/keras/backend.py:5336–5373  ·  view source on GitHub ↗

Apply 2D conv with un-shared weights. Arguments: inputs: 4D tensor with shape: (batch_size, filters, new_rows, new_cols) if data_format='channels_first' or 4D tensor with shape: (batch_size, new_rows, new_cols, filters) if data_format='chann

(inputs,
                 kernel,
                 kernel_size,
                 strides,
                 output_shape,
                 data_format=None)

Source from the content-addressed store, hash-verified

5334
5335@keras_export('keras.backend.local_conv2d')
5336def local_conv2d(inputs,
5337 kernel,
5338 kernel_size,
5339 strides,
5340 output_shape,
5341 data_format=None):
5342 """Apply 2D conv with un-shared weights.
5343
5344 Arguments:
5345 inputs: 4D tensor with shape:
5346 (batch_size, filters, new_rows, new_cols)
5347 if data_format='channels_first'
5348 or 4D tensor with shape:
5349 (batch_size, new_rows, new_cols, filters)
5350 if data_format='channels_last'.
5351 kernel: the unshared weight for convolution,
5352 with shape (output_items, feature_dim, filters).
5353 kernel_size: a tuple of 2 integers, specifying the
5354 width and height of the 2D convolution window.
5355 strides: a tuple of 2 integers, specifying the strides
5356 of the convolution along the width and height.
5357 output_shape: a tuple with (output_row, output_col).
5358 data_format: the data format, channels_first or channels_last.
5359
5360 Returns:
5361 A 4D tensor with shape:
5362 (batch_size, filters, new_rows, new_cols)
5363 if data_format='channels_first'
5364 or 4D tensor with shape:
5365 (batch_size, new_rows, new_cols, filters)
5366 if data_format='channels_last'.
5367 """
5368 return local_conv(inputs,
5369 kernel,
5370 kernel_size,
5371 strides,
5372 output_shape,
5373 data_format)
5374
5375
5376@keras_export('keras.backend.bias_add')

Callers

nothing calls this directly

Calls 1

local_convFunction · 0.85

Tested by

no test coverage detected