Barbar1432 commented on code in PR #1903:
URL: https://github.com/apache/systemds/pull/1903#discussion_r1322032516
##########
src/test/java/org/apache/sysds/test/functions/builtin/part1/BuiltinImageMirrorLinearizedTest.java:
##########
@@ -0,0 +1,81 @@
+
+package org.apache.sysds.test.functions.builtin.part1;
+
+import org.junit.Test;
+import org.apache.sysds.common.Types.ExecMode;
+import org.apache.sysds.common.Types.ExecType;
+import org.apache.sysds.runtime.matrix.data.MatrixValue;
+import org.apache.sysds.test.AutomatedTestBase;
+import org.apache.sysds.test.TestConfiguration;
+import org.apache.sysds.test.TestUtils;
+
+import java.util.HashMap;
+
+public class BuiltinImageMirrorLinearizedTest extends AutomatedTestBase {
+ private final static String TEST_NAME_LINEARIZED =
"image_mirror_linearized";
+ private final static String TEST_NAME = "image_mirror";
+ private final static String TEST_DIR = "functions/builtin/";
+ private final static String TEST_CLASS_DIR = TEST_DIR +
BuiltinImageMirrorLinearizedTest.class.getSimpleName() + "/";
+
+ private final static double eps = 1e-10;
+ private final static int rows = 64;
+ private final static int cols = 64;
Review Comment:
my initial thought was we could test it for infinite amount of variables by
easily changing the values of the variables instead of having couple of
concrete test cases. 64 here was just a place holder
##########
src/test/scripts/functions/builtin/image_mirror_linearized.dml:
##########
@@ -0,0 +1,19 @@
+input = read($in_file);
+
+n = nrow(input);
+m = ncol(input);
+
+input_flattened_row = matrix(input, rows=1, cols=n*m);
Review Comment:
how can I design this effectively ? since I am comparing the results of
img_mirror and img_mirror_linearized it gets a bit confusing for me . I thought
about linearizing the input matrix and putting the row over and over again in
a new matrix but should I do completely different matrixes ? in that case how
many ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]