anchor.diff:          if not bConst then
               // propagate to b
               bderivative <- b.zerosLike()
  -            for n=0 to batchSize-1 do
  -                let aa = a.[n].view([|inputChannels; 1; inputHeight; inputWidth|]) // treat size-one batch of a c-channel image as a size-c batch of one-channel images
  -                let d = cderivative.[n]
  -                for k=0 to outputChannels-1 do
  -                    let dd = d.[k].view([|1; 1; cderivative.shape.[2]; cderivative.shape.[3]|])
  -                    let mutable bd = aa.conv2d(dd, paddings=paddings)
  -                    // bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
  -                    bd <- bd.view([|1; inputChannels; bd.shape.[2]; bd.shape.[3]|])
  -                    let cBounds = array2D [[0;0;1]; [0;inputChannels-1;1]; [0;kernelHeight-1;1]; [0;kernelWidth-1;1]]
  -                    bd <- bd.GetSlice(cBounds)                 
  -                    bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
  -                    bderivative <- bderivative.addSlice([|k; 0; 0; 0|], bd)
  +            let aa = a.transpose(0, 1)
  +            let d = cderivative.transpose(0,1)
  +            for k=0 to outputChannels-1 do
  +                let dd = d.[k].view([|1; batchSize; cderivative.shape.[2]; cderivative.shape.[3]|])
  +                let mutable bd = aa.conv2d(dd, paddings=paddings)
  +                // bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
  +                bd <- bd.view([|1; inputChannels; bd.shape.[2]; bd.shape.[3]|])
  +                let cBounds = array2D [[0;0;1]; [0;inputChannels-1;1]; [0;kernelHeight-1;1]; [0;kernelWidth-1;1]]
  +                bd <- bd.GetSlice(cBounds)
  +                bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
  +                bderivative <- bderivative.addSlice([|k; 0; 0; 0|], bd)
           aderivative, bderivative
       
       /// <summary>Applies a 2D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'.</summary>
  
positive.code:         if not bConst then
              // propagate to b
              bderivative <- b.zerosLike()
              for n=0 to batchSize-1 do
                  let aa = a.[n].view([|inputChannels; 1; inputDepth; inputHeight; inputWidth|]) // treat size-one batch of a c-channel image as a size-c batch of one-channel images
                  let d = cderivative.[n]
                  for k=0 to outputChannels-1 do
                      let dd = d.[k].view([|1; 1; cderivative.shape.[2]; cderivative.shape.[3]; cderivative.shape.[4]|])
                      let mutable bd = aa.conv3d(dd, paddings=paddings)
                      // bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
                      bd <- bd.view([|1; inputChannels; bd.shape.[2]; bd.shape.[3]; bd.shape.[4]|])
                      let bdBounds = array2D [[0;0;1]; [0;inputChannels-1;1]; [0;kernelDepth-1;1]; [0;kernelHeight-1;1]; [0;kernelWidth-1;1]]
                      bd <- bd.GetSlice(bdBounds)
                      bd <- bd.view([|1; inputChannels; kernelDepth; kernelHeight; kernelWidth|])
                      bderivative <- bderivative.addSlice([|k; 0; 0; 0; 0|], bd)
          aderivative, bderivative
  
      /// <summary>Applies a 3D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'.</summary>
  
negative.code:         if not bConst then
              // propagate to b
              bderivative <- b.zerosLike()
              let aa = a.transpose(0, 1)
              let d = cderivative.transpose(0,1)
              for k=0 to outputChannels-1 do
                  let dd = d.[k].view([|1; batchSize; cderivative.shape.[2]|])
                  let mutable bd = aa.conv1d(dd, padding=padding)
                  // bd <- bd.view([|1; inputChannels; kernelHeight; kernelWidth|])
                  bd <- bd.view([|1; inputChannels; bd.shape.[2]|])
                  let cBounds = array2D [[0;0;1]; [0;inputChannels-1;1]; [0;kernelLength-1;1]]
                  bd <- bd.GetSlice(cBounds)
                  bd <- bd.view([|1; inputChannels; kernelLength|])
                  bderivative <- bderivative.addSlice([|k; 0; 0|], bd)                    
          aderivative, bderivative
      
      /// <summary>Applies a 1D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'.</summary>
  