知识卡片
参数约束需覆盖优化全过程
若用log(βX)计算饱和函数,须保证βX>0;随机无约束β可能初始就使log无效,更新也可能越界。可以用正值参数化等方式表达所需约束,再检查训练有限性;一个幸运随机种子并不保证实现普遍有效。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 结构因果模型
原书出处 · 1 处
- · 查看原书依据
self.β = nn.Parameter(torch.randn(1, 1)) #2 def forward(self, x): x = torch.mul(x, self.β) #3 x = x.log().sigmoid() #4 x = torch.mul(x, 100.) #5 return x #1 Create the enzyme model. #2 Initialize the parameter D�. #3 Calculate the product of enzyme amount X and D�. #4 Implement the function u / (u + 1) as sigmoid(log(u)), since the sigmoid and log functions are native PyTorch transforms.
参考来源
- 位置:《Causal AI》第06章《结构因果模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-6.xhtml)
- 结论依据:摘录中关于参数约束需覆盖优化全过程的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:self.β = nn.Parameter(torch.randn(1, 1)) #2 def forward(self, x): x = torch.mul(x, self.β) #3 x = x.log().sigmoid() #4 x = torch.mul(x, 100.) #5 return x #1 Create the enzyme model. #2 Initialize the parameter D�. #3 Calculate the product of enzyme amount X and D�. #4 Implement the function u / (u + 1) as sigmoid(log(u)), since the sigmoid and log functions are native PyTorch transforms.