Skip to content

Commit ca4f707

Browse files
committed
Update lectures requiring GPU access
1 parent 01423fc commit ca4f707

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

lectures/_admonition/gpu.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```{admonition} GPU
2+
:class: warning
3+
4+
This lecture was built using a machine with the latest CUDA and CUDANN frameworks installed with access to a GPU.
5+
6+
To run this lecture on [Google Colab](https://colab.research.google.com/), click on the "play" icon top right, select Colab, and set the runtime environment to include a GPU.
7+
8+
To run this lecture on your own machine, you need to install the software listed following this notice.
9+
```

lectures/ar1_bayes.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ kernelspec:
1313

1414
# Posterior Distributions for AR(1) Parameters
1515

16-
We'll begin with some Python imports.
17-
16+
```{include} _admonition/gpu.md
17+
```
1818

1919
```{code-cell} ipython3
20-
:tags: [hide-output, skip-execution]
20+
:tags: [skip-execution]
2121
2222
!pip install arviz pymc numpyro jax
2323
```
2424

25+
We'll begin with some Python imports.
26+
2527
```{code-cell} ipython3
2628
2729
import arviz as az

lectures/back_prop.md

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ kernelspec:
1313

1414
# Introduction to Artificial Neural Networks
1515

16+
```{include} _admonition/gpu.md
17+
```
18+
1619
```{code-cell} ipython3
1720
:tags: [skip-execution]
1821

lectures/bayes_nonconj.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ kernelspec:
1313

1414
# Non-Conjugate Priors
1515

16+
```{include} _admonition/gpu.md
17+
```
18+
19+
```{code-cell} ipython3
20+
:tags: [skip-execution]
21+
22+
!pip install numpyro pyro-ppl torch jax
23+
```
24+
1625
This lecture is a sequel to the {doc}`quantecon lecture <prob_meaning>`.
1726

1827
That lecture offers a Bayesian interpretation of probability in a setting in which the likelihood function and the prior distribution
@@ -43,13 +52,6 @@ The two Python modules are
4352

4453
As usual, we begin by importing some Python code.
4554

46-
```{code-cell} ipython3
47-
:tags: [hide-output, skip-execution]
48-
49-
# install dependencies
50-
!pip install numpyro pyro-ppl torch jax
51-
```
52-
5355
```{code-cell} ipython3
5456
import numpy as np
5557
import seaborn as sns

lectures/mix_model.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ kernelspec:
1414
(likelihood-ratio-process)=
1515
# Incorrect Models
1616

17-
In addition to what's in Anaconda, this lecture will need the following libraries:
17+
```{include} _admonition/gpu.md
18+
```
1819

1920
```{code-cell} ipython
20-
---
21-
tags: [hide-output, skip-execution]
22-
---
21+
:tags: [skip-execution]
22+
2323
!pip install numpyro jax
2424
```
2525

0 commit comments

Comments
 (0)