Skip to content

Commit 4f0d351

Browse files
committed
Release v0.88
1 parent f121c91 commit 4f0d351

14 files changed

+2538
-49
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package for py38
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
11+
env:
12+
TF_KERAS_VIS_MAX_STEPS: 3
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ['3.8', '3.9', '3.10', '3.11']
21+
tensorflow: ['2.6.0', '2.7.0', '2.8.0', '2.9.0', '2.10.0', '2.11.0', '2.12.0', '2.13.0', '2.14.0', '2.15.0']
22+
include:
23+
- python-version: '3.11'
24+
tensorflow: '2.12.0'
25+
- python-version: '3.11'
26+
tensorflow: '2.13.0'
27+
- python-version: '3.11'
28+
tensorflow: '2.14.0'
29+
- python-version: '3.11'
30+
tensorflow: '2.15.0'
31+
exclude:
32+
- python-version: '3.8'
33+
tensorflow: '2.14.0'
34+
- python-version: '3.8'
35+
tensorflow: '2.15.0'
36+
- python-version: '3.10'
37+
tensorflow: '2.6.0'
38+
- python-version: '3.10'
39+
tensorflow: '2.7.0'
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Set up Python ${{ matrix.python-version }}
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
- name: Upgrade pip
48+
run: |
49+
python -m pip install --upgrade pip
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade -e .[develop,examples] tensorflow~=${{ matrix.tensorflow }}
53+
- name: Test with pytest
54+
run: |
55+
pytest -n auto --dist loadscope
56+
timeout-minutes: 60
57+
- name: Test attentions.ipynb
58+
run: |
59+
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/attentions.ipynb
60+
- name: Test visualize_dense_layer.ipynb
61+
run: |
62+
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_dense_layer.ipynb
63+
- name: Test visualize_conv_filters.ipynb
64+
run: |
65+
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_conv_filters.ipynb

.github/workflows/python-package-up-to-TF2.11.yml renamed to .github/workflows/python-package-TF2.17.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: Python package for py39
55

66
on:
77
push:
@@ -17,23 +17,21 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: [3.7, 3.8, 3.9, '3.10']
21-
tensorflow: [2.6.0, 2.7.0, 2.8.0, 2.9.0, '2.10.0', '2.11.0']
22-
exclude:
23-
- python-version: '3.10'
24-
tensorflow: 2.6.0
25-
- python-version: '3.10'
26-
tensorflow: 2.7.0
20+
python-version: ['3.9', '3.10', '3.11', '3.12']
21+
tensorflow: ['2.16.0', '2.17.0']
22+
keras: ['keras1x', 'keras2x']
2723
steps:
2824
- uses: actions/checkout@v4
2925
- name: Set up Python ${{ matrix.python-version }}
3026
uses: actions/setup-python@v5
3127
with:
3228
python-version: ${{ matrix.python-version }}
33-
- name: Upgrade pip and Install dependencies
29+
- name: Upgrade pip
3430
run: |
3531
python -m pip install --upgrade pip
36-
python -m pip install --upgrade -e .[develop,examples] tensorflow~=${{ matrix.tensorflow }}
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade -e .[develop,examples,${{matrix.keras}}] tensorflow~=${{ matrix.tensorflow }}
3735
- name: Test with pytest
3836
run: |
3937
pytest -n auto --dist loadscope

.github/workflows/python-package-up-to-TF2.5.yml renamed to .github/workflows/python-package-TF2.5.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package up to TF2.5
4+
name: Python package for py37
55

66
on:
77
push:
@@ -17,16 +17,16 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: [3.7, 3.8]
21-
tensorflow: [2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0]
22-
exclude:
23-
- python-version: 3.8
24-
tensorflow: 2.0.0
25-
- python-version: 3.8
26-
tensorflow: 2.1.0
27-
include:
28-
- python-version: 3.9
29-
tensorflow: 2.5.0
20+
python-version: ['3.7', '3.8']
21+
tensorflow: ['2.0.0', '2.1.0', '2.2.0', '2.3.0', '2.4.0', '2.5.0']
22+
include:
23+
- python-version: '3.9'
24+
tensorflow: '2.5.0'
25+
exclude:
26+
- python-version: '3.8'
27+
tensorflow: '2.0.0'
28+
- python-version: '3.8'
29+
tensorflow: '2.1.0'
3030
steps:
3131
- uses: actions/checkout@v4
3232
- name: Set up Python ${{ matrix.python-version }}
@@ -38,7 +38,7 @@ jobs:
3838
python -m pip install --upgrade pip
3939
- name: Install dependencies
4040
run: |
41-
python -m pip install --upgrade -e .[develop,examples] tensorflow~=${{ matrix.tensorflow }} protobuf~=3.20.0
41+
python -m pip install --upgrade -e .[develop,examples,numpy1x,protobuf3] tensorflow~=${{ matrix.tensorflow }}
4242
- name: Test with pytest
4343
run: |
4444
pytest -n auto --dist loadscope

.github/workflows/python-package-cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python-version: [3.9, '3.10', '3.11', '3.12']
22+
python-version: ['3.9', '3.10', '3.11', '3.12']
2323
tensorflow: [current, pre, nightly]
2424
steps:
2525
- uses: actions/checkout@v4

.github/workflows/python-package.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: Python package for py312
55

66
on:
77
push:
@@ -17,28 +17,22 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: [3.8, 3.9, '3.10', '3.11']
21-
tensorflow: ['2.12.0', '2.13.0', '2.14.0', '2.15.0', '2.16.0']
22-
exclude:
23-
- python-version: 3.8
24-
tensorflow: '2.14.0'
25-
- python-version: 3.8
26-
tensorflow: '2.15.0'
27-
- python-version: 3.8
28-
tensorflow: '2.16.0'
29-
include:
30-
- python-version: '3.12'
31-
tensorflow: '2.16.0'
20+
python-version: ['3.9', '3.10', '3.11', '3.12']
21+
tensorflow: ['2.18.0']
22+
keras: ['keras1x', 'keras2x']
23+
numpy: ['numpy1x', numpy2x]
3224
steps:
3325
- uses: actions/checkout@v4
3426
- name: Set up Python ${{ matrix.python-version }}
3527
uses: actions/setup-python@v5
3628
with:
3729
python-version: ${{ matrix.python-version }}
38-
- name: Upgrade pip and Install dependencies
30+
- name: Upgrade pip
3931
run: |
4032
python -m pip install --upgrade pip
41-
python -m pip install --upgrade -e .[develop,examples] tensorflow~=${{ matrix.tensorflow }}
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade -e .[develop,examples,${{matrix.keras}},${{matrix.numpy}}] tensorflow~=${{ matrix.tensorflow }}
4236
- name: Test with pytest
4337
run: |
4438
pytest -n auto --dist loadscope

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ title: "tf-keras-vis"
88
repository: "https://github.com/keisen/tf-keras-vis"
99
url: "https://keisen.github.io/tf-keras-vis-docs/"
1010
type: software
11-
version: 0.8.7
12-
date-released: "2024-03-25"
11+
version: 0.8.8
12+
date-released: "2024-04-17"
1313
license-url: "https://github.com/keisen/tf-keras-vis/blob/master/LICENSE"
1414
references:
1515
- authors:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://keisen.github.io/tf-keras-vis-docs/
2424

2525
<!-- sec.2 -->
2626

27-
tf-keras-vis is a visualization toolkit for debugging `tf.keras.Model` in Tensorflow2.0+.
27+
tf-keras-vis is a visualization toolkit for debugging `keras.Model` in Tensorflow2.0+.
2828
Currently supported methods for visualization include:
2929

3030
* Feature Visualization
@@ -49,7 +49,7 @@ All visualizations have the features as follows:
4949

5050
And in ActivationMaximization,
5151

52-
* Support Optimizers that are built to tf.keras.
52+
* Support Optimizers that are built to keras.
5353

5454
<!-- ./sec.2 -->
5555

@@ -87,7 +87,7 @@ The images above are generated by `SmoothGrad`.
8787

8888
```python
8989
import tensorflow as tf
90-
from tensorflow.keras.applications import VGG16
90+
from keras.applications import VGG16
9191
from matplotlib import pyplot as plt
9292
from tf_keras_vis.activation_maximization import ActivationMaximization
9393
from tf_keras_vis.activation_maximization.callbacks import Progress
@@ -113,7 +113,7 @@ activations = \
113113
input_modifiers=[Jitter(jitter=16), Rotate2D(degree=1)],
114114
regularizers=[TotalVariation2D(weight=1.0),
115115
Norm(weight=0.3, p=1)],
116-
optimizer=tf.keras.optimizers.RMSprop(1.0, 0.999),
116+
optimizer=keras.optimizers.RMSprop(1.0, 0.999),
117117
callbacks=[Progress()])
118118

119119
## Since v0.6.0, calling `astype()` is NOT necessary.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.7
1+
0.8.8

docs/api/tf_keras_vis.utils.scores.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ For example, suppose the target value is 0.0, the score function should be as fo
131131

132132
```python
133133
def score_function(output):
134-
return tf.math.abs(1.0 / (output[:, 0] + tf.keras.backend.epsilon()))
134+
return tf.math.abs(1.0 / (output[:, 0] + keras.backend.epsilon()))
135135
```
136136

137137

docs/examples/attentions.ipynb

Lines changed: 977 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)