Skip to content

WIP: Add a conv2d implementation based on Tensorflow tf.nn.conv2d

Javier Duarte requested to merge conv2d_tf into master

Created by: GiuseppeDiGuglielmo

See: https://www.tensorflow.org/api_docs/python/tf/nn/conv2d

Computes a 2-D convolution given 3-D input and 4-D filter tensors.

Given an input tensor of shape [in_height, in_width, in_channels] and a filter tensor of shape [filter_height, filter_width, in_channels, out_channels], this accelerator performs the following:

  • Flattens the filter to a 2-D matrix with shape [filter_height * filter_width * in_channels, output_channels].

  • Please note that the filter matrix has to be transposed in advance.

  • Extracts image patches from the input tensor to form a virtual tensor of shape [out_height, out_width, filter_height * filter_width * in_channels].

  • For each patch, right-multiplies the filter matrix and the image patch vector.

Merge request reports

Loading