/// <summary>条件選択</summary> public static Tensor Where(Tensor condition, Tensor x1, Tensor x2, Shape shape) { Function function = new Functions.ArrayManipulation.Where(shape); Tensor y = new Tensor(shape); function.Execute(new Tensor[] { condition, x1, x2 }, new Tensor[] { y }); return(y); }
/// <summary>条件選択</summary> public static VariableNode Where(VariableNode condition, VariableNode x1, VariableNode x2, Shape shape) { Function function = new Functions.ArrayManipulation.Where(shape); return(Apply(function, condition, x1, x2)[0]); }