public class ConvOperator2D: ComputableOperator

2D Convolution operator.

Input tensors shapes

All tensors in inputTensors should have same shapes

Shape specification

  • inputTensors: each tensor: [channel, height, width] or [height, width, channel] according to channelPosition
  • weight: [num_filter,channel, kernelSize[0], kernelSize[1]],
  • bias: [num_filter],
  • outputTensors: each tensor: [out_height, out_width, num_filter], i.e., TensorChannelOrder.Last

nil weight

At declaration, weight could be nil. However, if you add this operator through a graph’s operation(_,inputs:,op:) API (i.e. symbolic constructing graph). You must indicate the inputShape attribute so that the graph could estimate the input and output shape information.

Batch process

This operator does not directly support batch data. However, user could use TensorSlice to do the batch processing. Details can be found in Slice tensor and Batch calculation with operators.


Currently, calculation with dilation > 1 has not been implemented and supported.