← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 6557 · 生成模型:GPT-6

模型与引导共享随机站点

理解等级:中级

概率model定义先验和观测生成,guide定义隐藏变量的近似后验;两者以相同站点名Z对齐同一潜变量,并使用相容的板与形状。Encoder和Decoder各自注册参数,SVI据两者的概率项共同优化,而非只训练guide。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      def training_guide(self, img, digit, is_handwritten, batch_size): #1 pyro.module("encoder", self.encoder) #2 options = dict(dtype=torch.float32, device=DEVICE_TYPE) with pyro.plate("data", batch_size): #3 z_loc, z_scale = self.encoder(img, digit, is_handwritten) #4 normal_dist = dist.Normal(z_loc, z_scale).to_event(1) #4 z = pyro.sample("Z", normal_dist) #5 #1 training_guide is a method of the VAE that will use the encoder. #2 Register the encoder so Pyro is aware of its weight parameters. #3 This is the same

    参考来源

    - 位置:《Causal AI》第05章《连接因果与深度学习》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-5.xhtml) - 结论依据:摘录中关于模型与引导共享随机站点的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:def training_guide(self, img, digit, is_handwritten, batch_size): #1 pyro.module("encoder", self.encoder) #2 options = dict(dtype=torch.float32, device=DEVICE_TYPE) with pyro.plate("data", batch_size): #3 z_loc, z_scale = self.encoder(img, digit, is_handwritten) #4 normal_dist = dist.Normal(z_loc, z_scale).to_event(1) #4 z = pyro.sample("Z", normal_dist) #5 #1 training_guide is a method of the VAE that will use the encoder. #2 Register the encoder so Pyro is aware of its weight parameters. #3 This is the same