ML
ML copied to clipboard
`tf.Tensor` used as a type is coming up as a tensor instance
Consider the following code:
from tensorflow import Tensor
def f(a):
assert isinstance(a, Tensor)
I am seeing this in the tensor analysis:
[Node: synthetic < PythonLoader, Lwala/builtin/isinstance, do()LRoot; > Context: CallStringContext: [ script src.tf2_test_module3a.py.f.do()LRoot;@2 ], v2][{[D:Symbolic,n, D:Compound,[D:Constant,28, D:Constant,28]] of pixel}]
Here is the corresponding summary:
- https://github.com/wala/ML/blob/d9a3d6be01441474acdf67c81ca62b8323598375/com.ibm.wala.cast.python.ml/data/tensorflow.xml#L233-L235
- https://github.com/wala/ML/blob/d9a3d6be01441474acdf67c81ca62b8323598375/com.ibm.wala.cast.python.ml/data/tensorflow.xml#L502-L511
That looks right. I'm unsure why it's being picked up as function, though.