MPSCNNConvolutionTranspose

How is the output dimension of MPSCNNConvolutionTranspose calculated?

Let's say we have an input of N x C x H x W, kernelSize kH x kW, stride = 1, pad = 0,

Should it be

output_h = (H - 1) * stride + kH and

output_w = (W - 1) * stride + kW?


I got off by one result when trying out this API.