Example #1
0
 public override Binary <Tensor <Type>, Array <Type>, XList <Scalar <int>, int>, int[]> Clone(Tensor <Type> x, XList <Scalar <int>, int> y) =>
 new BroadCast <Type>(x, y, this.broadcast);
Example #2
0
 /// <summary>Creates a tensor where only some slices is not zero</summary>
 public static Tensor <T> OneHot <T>(Dim[] shape, XList <XSlice, Slice> slices, Tensor <T> content) =>
 OneHotSlice <T> .Create(shape, slices, content);
Example #3
0
 private BroadCast(Tensor <Type> x, XList <Scalar <int>, int> shape, int[] broadcast) : base("Broadcast", x, shape)
 {
     this.broadcast = broadcast;
 }