univariate.py 文件源码

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

项目:zhusuan 作者: thu-ml 项目源码 文件源码
def __init__(self,
                 temperature,
                 logits,
                 group_ndims=0,
                 is_reparameterized=True,
                 use_path_derivative=False,
                 check_numerics=False,
                 **kwargs):
        self._logits = tf.convert_to_tensor(logits)
        self._temperature = tf.convert_to_tensor(temperature)
        param_dtype = assert_same_float_dtype(
            [(self._logits, 'BinConcrete.logits'),
             (self._temperature, 'BinConcrete.temperature')])

        self._temperature = assert_scalar(
            self._temperature, 'BinConcrete.temperature')

        self._check_numerics = check_numerics
        super(BinConcrete, self).__init__(
            dtype=param_dtype,
            param_dtype=param_dtype,
            is_continuous=True,
            is_reparameterized=is_reparameterized,
            use_path_derivative=use_path_derivative,
            group_ndims=group_ndims,
            **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号