Introduction

这次基本了解一下torch distribution的库。torch distribution和tf probability库差不多,所以学习的时候可以参照tf probability的库来学习。
ref: Deep Bayes slides

Shape

shape这里有几点要明确。batch_shape和event_shape
batch_shape: 有几个分布
event_shape:每个分布维度是多少维
图片说明
图片说明
这篇博客讲解了rsample和sample的区别:
https://blog.csdn.net/geter_CS/article/details/90752582
tf probability库tutorial:
https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb
损失函数:
图片说明

Vanilla VAE的loss实现

图片说明

Draw的loss实现

图片说明
图片说明

VAE with Discrete Variables For Semi-Supervised Learning

太长了,建议链接观看。
https://colab.research.google.com/drive/16SjN8FwplB1L_cr4jC0HbgvunvyMZKXc#scrollTo=HVGY58iGt0_f

Final objective

图片说明

Regularizer

图片说明

Summary

主要学习了torch distribution和Deep bayes中涉及到的一些模型。