Comments (9)
use
https://github.com/onnx/onnx-tensorflow/graphs/contributors
first try it on our models.
from dianna.
Explored it with a single model (leafsnap) and predictions were equivalent to the original onnx. Script can be found here:
https://github.com/dianna-ai/dianna-exploration/blob/56-onnx-to-tf-exploration/onnx_conversion_scripts/onnx_to_tensorflow.ipynb
from dianna.
Can somebody who has time, please test the Tutorial notebook of onnx-tensorflow executing exactly the same notebook and just appending it with the shap step to see if it works?
from dianna.
That tutorial didn't work for me even without changing anything, the model they provide fails when running prepare
(see also the discussion in the teams channel). I couldn't find which versions of e.g. tensorflow they used.
I did do some tests together with Chris and Yang, see this notebook: https://github.com/dianna-ai/dianna-exploration/blob/test-shap-tf-onnx/onnx_conversion_scripts/test_shap_tf_onnx.ipynb
We're getting further, i.e. we can generate an explainer object, but getting the shap values still fails.
shap also fails on a native keras model (see the same notebook), it looks like the DeepExplainer is not (fully) compatible with tensorflow 2, or at least not with recent versions.
from dianna.
2 remarks:
- Make a draft PR with a failing test at https://github.com/slundberg/shap/pulls.
- Post error messages with version details here to get help easier
from dianna.
Note that the relevant branches are in dianna-exploration
. If it results in a PR we should not forget it in the stand-ups.
from dianna.
My interpretations of the errors we got in https://github.com/dianna-ai/dianna-exploration/blob/test-shap-tf-onnx/onnx_conversion_scripts/test_shap_tf_onnx.ipynb:
For our model- the warning after cell [21] about exporting a tensor dict might be related to the error later after cell [24]:
TypeError: Expected any non-tensor type, got a tensor instead.
Looks like versioning issues indeed. But maybe we can try not with mnist. but another or our models? I recall @geek-yang saying the mnist had a different structure after conversion than the others.
For the native Keras model: I can report our error also in their issue, hoping someone will pay attention. Also worth looking at how the skomatin guy changed his model and avoided the error (post from 11 Sep 2020). He thinks shap does not support TF 2.0 :-( @loostrum what shap and TF versions did you use?
from dianna.
One more tough: if DeepExplainer attempts ultimately fail, any point of trying the slower Shap's KernalExplainer?
https://github.com/slundberg/shap
from dianna.
I tried the latest version of shap (0.40), a slightly older version (0.38) and the latest master branch.
Using tensorflow 2.6
from dianna.
Related Issues (20)
- List possible video edit software HOT 6
- Speech recording data-format support
- Clean model folder HOT 1
- Update dashboard README HOT 1
- Dashboard: add text
- Dashboard: move menu
- Dashboard: modifu input data section for multiple examples
- Dashboard: redesign loaded data results HOT 1
- Make a promotional FRB video
- Make an edicational FRB video
- Visualization: `plot_tabular` does not work for x as `np.ndarray`
- Tensorflow lower limit conflicts HOT 3
- torchtext end-of-life and broken HOT 2
- Add shapes example to dashboard
- Add imagenet example to dashboard
- dashboard: allow for own input in examples
- FRB case with LIME
- Build action fails due to `torchtext` OSError --> undefined symbol HOT 1
- Create tabular tab to dashboard
- use new download functionality in dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dianna.