sin.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:cgpm 作者: probcomp 项目源码 文件源码
def simulate(self, rowid, targets, constraints=None, inputs=None, N=None):
        assert targets == self.outputs
        assert inputs.keys() == self.inputs
        assert not constraints
        x = inputs[self.inputs[0]]
        noise = self.rng.uniform(high=self.noise)
        if np.cos(x) < 0:
            y = np.cos(x) + noise
        else:
            y = np.cos(x) - noise
        return {self.outputs[0]: y}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号