Skip to content

Commit c63afdb

Browse files
committed
More tests for wala#195.
1 parent ef766c2 commit c63afdb

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflow2Model.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3361,6 +3361,18 @@ public void testReshape3() throws ClassHierarchyException, CancelException, IOEx
33613361
test("tf2_test_reshape3.py", "f", 1, 1, 2);
33623362
}
33633363

3364+
/** Test https://github.com/wala/ML/issues/195. */
3365+
@Test
3366+
public void testReshape4() throws ClassHierarchyException, CancelException, IOException {
3367+
test("tf2_test_reshape4.py", "f", 1, 1, 2);
3368+
}
3369+
3370+
/** Test https://github.com/wala/ML/issues/195. */
3371+
@Test
3372+
public void testReshape5() throws ClassHierarchyException, CancelException, IOException {
3373+
test("tf2_test_reshape.py", "f", 1, 1, 2);
3374+
}
3375+
33643376
private void test(
33653377
String filename,
33663378
String functionName,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/reshape
2+
3+
import tensorflow as tf
4+
5+
6+
def f(a):
7+
pass
8+
9+
10+
t1 = tf.ones([28, 28])
11+
t2 = tf.reshape(t1, [-1, 28, 28, 1])
12+
f(t2)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/reshape
2+
3+
import tensorflow as tf
4+
5+
6+
def f(a):
7+
pass
8+
9+
10+
t1 = tf.ones([2, 3])
11+
t2 = tf.reshape(t1, [-1, 28, 28, 1])
12+
f(t2)

0 commit comments

Comments
 (0)