Skip to content

Commit 33ff39f

Browse files
committed
fix deprecation in jax
1 parent 3bca43b commit 33ff39f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lectures/back_prop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ Image(fig.to_image(format="png"))
595595
596596
```{code-cell} ipython3
597597
## to check that gpu is activated in environment
598-
jax.extend.backend.get_backend()
598+
print(f"JAX backend: {jax.devices()[0].platform}")
599599
```
600600
601601
```{note}

lectures/status.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ and the following package versions
3333
!conda list
3434
```
3535

36-
This lecture series also has access to the following GPU
36+
You can check the backend used by JAX using:
37+
38+
```{code-cell} ipython3
39+
import jax
40+
# Check if JAX is using GPU
41+
print(f"JAX backend: {jax.devices()[0].platform}")
42+
```
43+
44+
and this lecture series also has access to the following GPU
3745

3846
```{code-cell} ipython
3947
!nvidia-smi

0 commit comments

Comments
 (0)