public Tensor Apply(RegularizerArgs args) { Tensor regularization = tf.constant(0.0, args.X.dtype); regularization += l1 * math_ops.reduce_sum(math_ops.abs(args.X)); regularization += l2 * math_ops.reduce_sum(math_ops.square(args.X)); return(regularization); }
public Tensor Apply(RegularizerArgs args) { throw new NotImplementedException(); }
public Tensor Apply(RegularizerArgs args) { return(l1 * math_ops.reduce_sum(math_ops.abs(args.X))); }