Skip to content

Commit

Permalink
Included tf_legacy to more notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSamoilescu committed Dec 3, 2024
1 parent ea0f2cb commit 77a0a46
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 42 deletions.
17 changes: 11 additions & 6 deletions doc/source/examples/anchor_image_imagenet.ipynb

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions doc/source/examples/cem_iris.ipynb

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions doc/source/examples/cem_mnist.ipynb

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion doc/source/examples/cfproto_cat_adult_ohe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -47,6 +47,9 @@
}
],
"source": [
"import os\n",
"os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n",
"\n",
"import tensorflow as tf\n",
"tf.get_logger().setLevel(40) # suppress deprecation messages\n",
"tf.compat.v1.disable_v2_behavior() # disable TF2 behaviour as alibi code still relies on TF1 constructs\n",
Expand Down
5 changes: 4 additions & 1 deletion doc/source/examples/cfproto_housing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -50,6 +50,9 @@
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import os\n",
"os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n",
"\n",
"import tensorflow as tf\n",
"tf.get_logger().setLevel(40) # suppress deprecation messages\n",
"tf.compat.v1.disable_v2_behavior() # disable TF2 behaviour as alibi code still relies on TF1 constructs \n",
Expand Down
5 changes: 4 additions & 1 deletion doc/source/examples/cfrl_adult.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,6 +55,9 @@
"from copy import deepcopy\n",
"from typing import List, Tuple, Dict, Callable\n",
"\n",
"import os\n",
"os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n",
"\n",
"import tensorflow as tf\n",
"import tensorflow.keras as keras\n",
"\n",
Expand Down
14 changes: 9 additions & 5 deletions doc/source/examples/integrated_gradients_imagenet.ipynb

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions doc/source/examples/linearity_measure_iris.ipynb

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions doc/source/examples/similarity_explanations_20ng.ipynb

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions doc/source/examples/similarity_explanations_imagenet.ipynb

Large diffs are not rendered by default.

0 comments on commit 77a0a46

Please sign in to comment.