Skip to content

Commit 1d84fc5

Browse files
committed
add gpu backend code to the top of the lecture
1 parent 5f66dd9 commit 1d84fc5

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lectures/back_prop.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ kernelspec:
2222
!pip install --upgrade jax
2323
```
2424

25+
```{code-cell} ipython3
26+
import jax
27+
## to check that gpu is activated in environment
28+
print(f"JAX backend: {jax.devices()[0].platform}")
29+
```
30+
2531
In addition to what's included in base Anaconda, we need to install the following packages
2632

2733
```{code-cell} ipython3
@@ -604,13 +610,4 @@ Image(fig.to_image(format="png"))
604610
# notebook locally
605611
```
606612
607-
```{code-cell} ipython3
608-
## to check that gpu is activated in environment
609-
print(f"JAX backend: {jax.devices()[0].platform}")
610-
```
611613
612-
```{note}
613-
**Cloud Environment:** This lecture site is built in a server environment that doesn't have access to a `gpu`
614-
If you run this lecture locally this lets you know where your code is being executed, either
615-
via the `cpu` or the `gpu`
616-
```

0 commit comments

Comments
 (0)