code: func (co *Context) SpatialTfSamplerBackward(stDesc *SpatialTransformer, alpha float64, xDesc *TensorDescriptor, x Memory, beta float64, dxDesc *TensorDescriptor, dx Memory, alphaDgrid Memory, dyDesc *TensorDescriptor, dy Memory, grid Memory, betaDgrid Memory, dgrid Memory) error {
  	// DOUBLECHECK: "cudnnSpatialTfSamplerBackward" returns Memory type in Parameter 13
  	var alphaC, betaC unsafe.Pointer
  	switch xDesc.dataType {
  	case Float, Half:
  		var alphaF, betaF C.float
  		alphaF = C.float(float32(alpha))
  		betaF = C.float(float32(beta))
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	case Double:
  		var alphaF, betaF C.double
  		alphaF = C.double(alpha)
  		betaF = C.double(beta)
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	default:
  		return errors.Errorf("Unsupported data type: %v", xDesc.dataType)
  	}
  	// call cudnnSpatialTfSamplerBackward
  	return result(C.cudnnSpatialTfSamplerBackward(co.internal, stDesc.internal, alphaC, xDesc.internal, x.Pointer(), betaC, dxDesc.internal, dx.Pointer(), alphaDgrid.Pointer(), dyDesc.internal, dy.Pointer(), grid.Pointer(), betaDgrid.Pointer(), dgrid.Pointer()))
  }
docs: // SpatialTfSamplerBackward computes the gradient of a sampling operation.