If you pull the whole repo the following should produce the the same result:
$ cd <project root where the chapter2 package and project directory is>
$ export PYTHONPATH=.;
$ gdb --args python projects/b1_simple_linear_reg.py

The chapter2 is the package module from where I import model, data generator, data loader in to b1_simple_linear_reg.py and use that file as main file for training. Let me know if that will work otherwise I will put everyting into one file.
I am using GeForce GTX 1050 Ti Max-Q , here is the specification:
  Operating System: Linux Mint 20 Uliyana
            Kernel: Linux 5.4.0-70-generic
      Architecture: x86-64

Gpu Info:
Mon Mar 29 11:35:39 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.06    Driver Version: 450.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  On   | 00000000:02:00.0 Off |                  N/A |
| N/A   36C    P8    N/A /  N/A |    753MiB /  4042MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+