public void Concat_AxisOutOfrangeCase1_ThrowException() { // arrange const int ConcatAxis = 3; var inputs = new NdArray <int>[] { NdArray <int> .Zeros(HostDevice.Instance, new[] { 1, 1 }) }; // action NdArrayOperator <int> .Concat(ConcatAxis, inputs); }
public void Concat_EmptyInput_ThrowException() { // arrange const int DummyAxis = 1; var emptyInputs = new NdArray <int>[] { }; // action NdArrayOperator <int> .Concat(DummyAxis, emptyInputs); }
public void Concat_DifferntShapes_ThrowException() { // arrange const int ConcatAxis = 1; var inputs = new NdArray <int>[] { NdArray <int> .Zeros(HostDevice.Instance, new[] { 1, 1 }), NdArray <int> .Zeros(HostDevice.Instance, new[] { 2, 1 }) }; // action NdArrayOperator <int> .Concat(ConcatAxis, inputs); }
public void Concat() { // arrange const int ConcatAxis = 1; var inputs = new NdArray <int>[] { NdArray <int> .Zeros(HostDevice.Instance, new[] { 4, 28 }), NdArray <int> .Zeros(HostDevice.Instance, new[] { 4, 15 }), NdArray <int> .Zeros(HostDevice.Instance, new[] { 4, 10 }) }; // action var concat = NdArrayOperator <int> .Concat(ConcatAxis, inputs); // assert CollectionAssert.AreEqual(new[] { 4, 53 }, concat.Shape); }