Path: blob/master/notebooks/book2/17/mnist_classification_mc_dropout.ipynb
1193 views
Kernel: Python 3.8.10 64-bit
In [1]:
In [2]:
In [3]:
In [4]:
Out[4]:
/home/rohit_khoiwal/anaconda3/lib/python3.9/site-packages/probml_utils/plotting.py:26: UserWarning: LATEXIFY environment variable not set, not latexifying
warnings.warn("LATEXIFY environment variable not set, not latexifying")
In [5]:
In [6]:
In [7]:
Out[7]:
WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
In [8]:
In [9]:
In [10]:
In [11]:
Out[11]:
100%|██████████| 1875/1875 [01:36<00:00, 19.52it/s]
train epoch: 0, loss: 0.3680, accuracy: 0.89
100%|██████████| 1875/1875 [01:35<00:00, 19.57it/s]
train epoch: 1, loss: 0.1323, accuracy: 0.96
100%|██████████| 1875/1875 [01:35<00:00, 19.66it/s]
train epoch: 2, loss: 0.0984, accuracy: 0.97
100%|██████████| 1875/1875 [01:35<00:00, 19.68it/s]
train epoch: 3, loss: 0.0805, accuracy: 0.98
100%|██████████| 1875/1875 [01:35<00:00, 19.63it/s]
train epoch: 4, loss: 0.0694, accuracy: 0.98
100%|██████████| 1875/1875 [01:35<00:00, 19.67it/s]
train epoch: 5, loss: 0.0611, accuracy: 0.98
100%|██████████| 1875/1875 [01:35<00:00, 19.67it/s]
train epoch: 6, loss: 0.0560, accuracy: 0.98
100%|██████████| 1875/1875 [01:35<00:00, 19.68it/s]
train epoch: 7, loss: 0.0490, accuracy: 0.99
100%|██████████| 1875/1875 [01:35<00:00, 19.67it/s]
train epoch: 8, loss: 0.0463, accuracy: 0.99
100%|██████████| 1875/1875 [01:35<00:00, 19.67it/s]
train epoch: 9, loss: 0.0413, accuracy: 0.99
In [12]:
Figure
In [14]:
In [15]:
Out[15]:
<matplotlib.image.AxesImage at 0x7f54ec2fd700>
In [16]:
In [17]:
Out[17]:
DeviceArray([1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7], dtype=int64)
MC Dropout
In [18]:
In [19]:
In [20]:
In [21]:
In [22]:
In [23]:
In [24]:
Out[24]:
/home/rohit_khoiwal/anaconda3/lib/python3.9/site-packages/probml_utils/plotting.py:80: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
In [25]:
Out[25]:
In [25]: