anchor.diff:          let w = dsharp.randn([fanIn; fanOut])
           let s = sqrt (2. / ((1. + a*a) * (float fanIn)))
           w * s
  -    static member bias(fanOut) =
  -        let b = 1./sqrt (float fanOut)
  -        -b + dsharp.rand([fanOut]) * 2*b
  +    static member init(shape:int[], k:float) =
  +        -k + dsharp.rand(shape) * 2*k
   
   
   type Linear(inFeatures, outFeatures, ?bias:bool) =
       inherit Model()
       let bias = defaultArg bias true
  +    let k = 1./sqrt (float outFeatures)
       let w = Parameter(Init.kaiming(inFeatures, outFeatures))
  -    let b = Parameter(if bias then Init.bias(outFeatures) else dsharp.zero())
  +    let b = Parameter(if bias then Init.init([|outFeatures|], k) else dsharp.zero())
       do base.add(["weight", w; "bias", b])
       override l.forward(value) =
           let f = dsharp.matmul(value, w.value)
  
positive.code:     member d.add(parameters:list<string*Parameter>) = for (n, p) in parameters do d.add(n, p)
      member d.add(parameters:ParameterDict) = for KeyValue(n, p) in parameters.values do d.add(n, p)
      member d.copy() = d.map(fun (t:Tensor) -> t)
      member d.map(f:string*Tensor->string*Tensor) =
          let ret = ParameterDict()
          for KeyValue(n, p) in d.values do ret.values.Add(let nn, pp = f(n,p.value) in nn, Parameter(pp))
          ret
      member d.map(f:Tensor->Tensor) = d.map(fun (n,t) -> n, f t)
      member d.set(parameters:ParameterDict) = d.iter(fun (n, p) -> p.value <- parameters.[n])
      member d.iter(f:string*Parameter->unit) = for KeyValue(n, p) in d.values do f(n,p)
  
negative.code:     let kernelSize = kernelSize |> Array.ofSeq
      let bias = defaultArg bias true
      let k = 1./ sqrt (float (inChannels*kernelSize.[0]*kernelSize.[1]))
      let w = Parameter <| Init.init([|outChannels; inChannels; kernelSize.[0]; kernelSize.[1]|], k)
      let b = Parameter <| if bias then Init.init([|outChannels|], k) else dsharp.zero()
      do base.add(["weight", w; "bias", b])
      override c.forward(value) =
          let f = dsharp.conv2d(value, w.value, ?stride=stride, ?strides=strides, ?padding=padding, ?paddings=paddings, ?dilation=dilation, ?dilations=dilations)
  