logistic.py 文件源码

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

项目:DeepLearning_VirtualReality_BigData_Project 作者: rashmitripathi 项目源码 文件源码
def _sample_n(self, n, seed=None):
    shape = array_ops.concat(([n], array_ops.shape(self.mean())), 0)
    np_dtype = self.dtype.as_numpy_dtype()
    minval = np.nextafter(np_dtype(0), np_dtype(1))
    uniform = random_ops.random_uniform(shape=shape,
                                        minval=minval,
                                        maxval=1,
                                        dtype=self.dtype,
                                        seed=seed)
    sampled = math_ops.log(uniform) - math_ops.log(1-uniform)
    return sampled * self.scale + self.loc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号