anchor.diff:      static member max(a:Tensor, b:Tensor) = a.max(b)
       static member min(a:Tensor, b:Tensor) = a.min(b)
       static member diagonal(a:Tensor, ?offset:int, ?dim1:int, ?dim2:int) = a.diagonal(?offset=offset, ?dim1=dim1, ?dim2=dim2)
  +    static member diagonal(offset:int, ?dim1:int, ?dim2:int) = fun (a:Tensor) -> a.diagonal(offset=offset, ?dim1=dim1, ?dim2=dim2)
       static member trace(a:Tensor) = a.trace()
       static member expand(a:Tensor, shape:seq<int>) = a.expand(shape)
  +    static member expand(shape:seq<int>) = fun (a:Tensor) -> a.expand(shape)
       static member stack(tensors:seq<Tensor>, ?dim:int) = Tensor.stack(tensors, ?dim=dim)
  +    static member stack(dim:int) = fun (tensors:seq<Tensor>) -> Tensor.stack(tensors, dim=dim)
       static member unstack(a:Tensor, ?dim:int) = a.unstack(?dim=dim)
  +    static member unstack(dim:int) = fun (a:Tensor) -> a.unstack(dim=dim)
       static member cat(tensors:seq<Tensor>, ?dim:int) = Tensor.cat(tensors, ?dim=dim)
  +    static member cat(dim:int) = fun (tensors:seq<Tensor>) -> Tensor.cat(tensors, dim=dim)
       static member split(a:Tensor, sizes:seq<int>, ?dim:int) = a.split(sizes, ?dim=dim)
  +    static member split(sizes:seq<int>, ?dim:int) = fun (a:Tensor) -> a.split(sizes, ?dim=dim)
       static member add(a:Tensor, b:Tensor) = a.add(b)
  +    static member add(b:Tensor) = fun (a:Tensor) -> a.add(b)
       static member sub(a:Tensor, b:Tensor) = a.sub(b)
  +    static member sub(b:Tensor) = fun (a:Tensor) -> a.sub(b)
       static member mul(a:Tensor, b:Tensor) = a.mul(b)
  +    static member mul(b:Tensor) = fun (a:Tensor) -> a.mul(b)
       static member div(a:Tensor, b:Tensor) = a.div(b)
  +    static member div(b:Tensor) = fun (a:Tensor) -> a.div(b)
       static member pow(a:Tensor, b:Tensor) = a.pow(b)
  +    static member pow(b:Tensor) = fun (a:Tensor) -> a.pow(b)
       static member matmul(a:Tensor, b:Tensor) = a.matmul(b)
  +    static member matmul(b:Tensor) = fun (a:Tensor) -> a.matmul(b)
       static member dot(a:Tensor, b:Tensor) = a.dot(b)
  +    static member dot(b:Tensor) = fun (a:Tensor) -> a.dot(b)
       static member neg(a:Tensor) = a.neg()
       static member sum(a:Tensor) = a.sum()
       static member sum(a:Tensor, dim:int, ?keepDim:bool) = a.sum(dim, ?keepDim=keepDim)
  +    static member sum(dim:int, ?keepDim:bool) = fun (a:Tensor) -> a.sum(dim, ?keepDim=keepDim)
       static member mean(a:Tensor) = a.mean()
       static member mean(a:Tensor, dim:int, ?keepDim:bool) = a.mean(dim, ?keepDim=keepDim)
  +    static member mean(dim:int, ?keepDim:bool) = fun (a:Tensor) -> a.mean(dim, ?keepDim=keepDim)
       static member variance(a:Tensor) = a.variance()
       static member variance(a:Tensor, dim:int, ?keepDim:bool) = a.variance(dim, ?keepDim=keepDim)
  +    static member variance(dim:int, ?keepDim:bool) = fun (a:Tensor) -> a.variance(dim, ?keepDim=keepDim)
       static member stddev(a:Tensor) = a.stddev()
       static member stddev(a:Tensor, dim:int, ?keepDim:bool) = a.stddev(dim, ?keepDim=keepDim)
  +    static member stddev(dim:int, ?keepDim:bool) = fun (a:Tensor) -> a.stddev(dim, ?keepDim=keepDim)
       static member transpose(a:Tensor) = a.transpose()
       static member squeeze(a:Tensor, ?dim:int) = a.squeeze(?dim=dim)
  +    static member squeeze(dim:int) = fun (a:Tensor) -> a.squeeze(dim=dim)
       static member unsqueeze(a:Tensor, dim:int) = a.unsqueeze(dim)
  +    static member unsqueeze(dim:int) = fun (a:Tensor) -> a.unsqueeze(dim)
       static member flip(a:Tensor, dims:seq<int>) = a.flip(dims)
  +    static member flip(dims:seq<int>) = fun (a:Tensor) -> a.flip(dims)
       static member dilate(a:Tensor, dilations:seq<int>) = a.dilate(dilations)
  +    static member dilate(dilations:seq<int>) = fun (a:Tensor) -> a.dilate(dilations)
       static member undilate(a:Tensor, dilations:seq<int>) = a.undilate(dilations)
  +    static member undilate(dilations:seq<int>) = fun (a:Tensor) -> a.undilate(dilations)
       static member repeat(a:Tensor, dim:int, times:int) = a.repeat(dim, times)
  +    static member repeat(dim:int, times:int) = fun (a:Tensor) -> a.repeat(dim, times)
       static member view(a:Tensor, shape:seq<int>) = a.view(shape)
  -    static member view (shape:seq<int>) = fun (a:Tensor) -> a.view(shape)
  +    static member view(shape:seq<int>) = fun (a:Tensor) -> a.view(shape)
       static member view(a:Tensor, shape:int) = a.view(shape)
  +    static member view(shape:int) = fun (a:Tensor) -> a.view(shape)
       static member viewAs(a:Tensor, b:Tensor) = a.viewAs(b)
  +    static member viewAs(b:Tensor) = fun (a:Tensor) -> a.viewAs(b)
       static member flatten(a:Tensor, ?startDim:int, ?endDim:int) = a.flatten(?startDim=startDim, ?endDim=endDim)
  +    static member flatten(startDim:int, ?endDim:int) = fun (a:Tensor) -> a.flatten(startDim=startDim, ?endDim=endDim)
       static member sign(a:Tensor) = a.sign()
       static member floor(a:Tensor) = a.floor()
       static member ceil(a:Tensor) = a.ceil()
  
positive.code:     static member randn(shape:seq<int>, ?dtype:DType, ?device:Device, ?backend:Backend) = Tensor(RawTensor.RandomNormal(shape|>Seq.toArray, ?dtype=dtype, ?device=device, ?backend=backend))
      static member randn(length:int, ?dtype:DType, ?device:Device, ?backend:Backend) = Tensor(RawTensor.RandomNormal([|length|], ?dtype=dtype, ?device=device, ?backend=backend))
      static member zerosLike(a:Tensor, ?shape:seq<int>) = a.zerosLike(?shape=shape)
      static member onesLike(a:Tensor, ?shape:seq<int>) = a.onesLike(?shape=shape)
      static member fullLike(a:Tensor, shape:seq<int>, value:obj) = a.fullLike(shape, value)
      static member randLike(a:Tensor, ?shape:seq<int>) = a.randLike(?shape=shape)
      static member randnLike(a:Tensor, ?shape:seq<int>) = a.randnLike(?shape=shape)
      static member zeroLike(a:Tensor) = a.zeroLike()
      static member oneLike(a:Tensor) = a.oneLike()
      static member arange(endVal:float, ?startVal:float, ?step:float, ?dtype:DType, ?device:Device, ?backend:Backend) = DiffSharp.zero(?dtype=dtype, ?device=device, ?backend=backend).arangeLike(endVal=endVal, ?startVal=startVal, ?step=step)
      static member like(a:Tensor, value:obj) = a.like(value)
      static member clone(a:Tensor) = a.clone()
      static member lt(a:Tensor, b:Tensor) = a.lt(b)
      static member gt(a:Tensor, b:Tensor) = a.gt(b)
      static member le(a:Tensor, b:Tensor) = a.le(b)
      static member ge(a:Tensor, b:Tensor) = a.ge(b)
      static member isinf(a:Tensor) = a.isinf()
      static member isnan(a:Tensor) = a.isnan()
      static member hasinf(a:Tensor) = a.hasinf()
  
negative.code:     static member acos(a:Tensor) = a.acos()
      static member atan(a:Tensor) = a.atan()
      static member softmax(a:Tensor, dim:int) = a.softmax(dim)
      static member softmax(dim:int) = fun (a:Tensor) -> a.softmax(dim)
      static member logsoftmax(a:Tensor, dim:int) = a.logsoftmax(dim)
      static member logsoftmax(dim:int) = fun (a:Tensor) -> a.logsoftmax(dim)
      static member logsumexp(a:Tensor, dim:int, ?keepDim:bool) = a.logsumexp(dim, ?keepDim=keepDim)
      static member logsumexp(dim:int, ?keepDim:bool) = fun (a:Tensor) -> a.logsumexp(dim, ?keepDim=keepDim)
      static member mseLoss(a:Tensor, b:Tensor, ?reduction:string) = a.mseLoss(b, ?reduction=reduction)
      static member nllLoss(a:Tensor, b:Tensor, ?weights:Tensor, ?reduction:string) = a.nllLoss(b, ?weights=weights, ?reduction=reduction)
      static member crossEntropyLoss(a:Tensor, b:Tensor, ?weights:Tensor, ?reduction:string) = a.crossEntropyLoss(b, ?weights=weights, ?reduction=reduction)
      static member conv1d(a:Tensor, b:Tensor, ?stride:int, ?padding:int, ?dilation:int) = a.conv1d(b, ?stride=stride, ?padding=padding, ?dilation=dilation)
      static member conv2d(a:Tensor, b:Tensor, ?stride:seq<int>, ?padding:seq<int>, ?dilation:seq<int>) = a.conv2d(b, ?stride=stride, ?padding=padding, ?dilation=dilation)
      static member conv2d(a:Tensor, b:Tensor, ?stride:int, ?padding:int, ?dilation:int) = a.conv2d(b, ?stride=stride, ?padding=padding, ?dilation=dilation)
  
  // Methods mirroring F# array modules
  // TODO: update to support non-float types once we have backing DTypes implemented
  