Raffi Khatchadourian
Raffi Khatchadourian
Thus, my best guess is that the problem involves a combination of the (new) XML summaries and the hard-coded initialization of the dataflow.
> ... > > ## Regression > * There is a summary for `tf.reshape()`, but it calls `copy_data()` instead of `read_data()`. That sounds correct since `reshape()` wouldn't be creating new...
> That being said, `copy_data()` in the above summary doesn't use its argument. In fact, the original code seems to just return a new MNIST dataset.
> Looking at the summary of `tf.reshape()`, I see that there's a data copy: > > [ML/com.ibm.wala.cast.python.ml/data/tensorflow.xml](https://github.com/wala/ML/blob/ddba21e7881f2a9cc825f1857aea5a5ea89f1bc3/com.ibm.wala.cast.python.ml/data/tensorflow.xml#L379-L388) > > Lines 379 to 388 in [ddba21e](/wala/ML/commit/ddba21e7881f2a9cc825f1857aea5a5ea89f1bc3) > > > > >...
> > ... > > ## Regression > > > > * There is a summary for `tf.reshape()`, but it calls `copy_data()` instead of `read_data()`. > > That sounds correct...
> Thus, my best guess is that the problem involves a combination of the (new) XML summaries and the hard-coded initialization of the dataflow. The new summary also has some...
Looks like we have an error when testing https://github.com/ponder-lab/ML/blob/870a2f509a5acc4a81f34979854d32108eb54323/com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflow2Model.java#L3346-L3348, which has input file https://github.com/ponder-lab/ML/blob/870a2f509a5acc4a81f34979854d32108eb54323/com.ibm.wala.cast.python.test/data/tf2_test_reshape.py: ``` {[Node: Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ], v255]=Cannot reshape pixel[n][28 * 28] to pixel[6]} ```
This error looks to be a shape mismatch, but it's also affecting the tensor type inference. If there's a tensor shape mismatch, tensor types aren't propagated as they normally would...
> Looks like we have an error when testing https://github.com/ponder-lab/ML/blob/870a2f509a5acc4a81f34979854d32108eb54323/com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflow2Model.java#L3346-L3348, which has input file https://github.com/ponder-lab/ML/blob/870a2f509a5acc4a81f34979854d32108eb54323/com.ibm.wala.cast.python.test/data/tf2_test_reshape.py: > > ``` > {[Node: Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ], v255]=Cannot reshape pixel[n][28 * 28]...
> Add this test works: > > [ponder-lab@2db36e2](https://github.com/ponder-lab/ML/commit/2db36e27afd9399c70a788a6800b675c19505379) > > I believe the problem is that the data sources are hard-coded: > > [ML/com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client/PythonTensorAnalysisEngine.java](https://github.com/wala/ML/blob/ddba21e7881f2a9cc825f1857aea5a5ea89f1bc3/com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client/PythonTensorAnalysisEngine.java#L606-L610) > > Lines 606 to 610...