layers.Conv2d(
filters,
kernel_size=5,
strides=(1, 1),
padding='valid',
data_format='channels_last',
dilation_rate=(1, 1),
activation=None,
use_bias=False,
trainable=True
)
Input:
[batchSize, imageY, imageX, channels]
[imageY, imageX]
Filter:
[kernelY, kernelX, channels, outputChannels]
[kernelY, kernelX]
Output:
[imageY2, imageX2]
[batchSize, imageY2, imageX2, outputChannels]
(batchSize * channels * outputChannels)
jobs will be created.for sample in range(batchSize):
for outputChannel in range(outputChannels):
for channel in range(channels):
output[sample][outputChannel] += job(
input[sample][channel],
kernel[channel][outputChannel]
)
imageX = imageY = 228
kernelX = kernelY = 5
imageX2 = imageY2 = 224
5 * 5 + 228 * 228 = 52009
224 * 224 = 50176
same as layers.Conv2d: conv2d_backprop
in
tensorflow/tensorflow/python/ops/nn_ops.py:2290