Skip to content

Commit

Permalink
Additional test for wala#89.
Browse files Browse the repository at this point in the history
Use list instead of Dataset.
  • Loading branch information
khatchad committed Oct 11, 2023
1 parent 6bc042b commit e14ffb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public void testTf2()
0,
0); // NOTE: Change to testTf2("tf2_test_dataset.py", "add", 2, 3, 2, 3) once
// https://github.com/wala/ML/issues/89 is fixed.
testTf2("tf2_test_tensor_list.py", "add", 2, 3, 2, 3);
}

private void testTf2(
Expand Down
11 changes: 11 additions & 0 deletions com.ibm.wala.cast.python.test/data/tf2_test_tensor_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import tensorflow as tf


def add(a, b):
return a + b


list = [tf.ones([1, 2]), tf.ones([2, 2])]

for element in list:
c = add(element, element)

0 comments on commit e14ffb3

Please sign in to comment.