deep_mlp_model.py 文件源码

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

项目:dnn-quant 作者: euclidjda 项目源码 文件源码
def _input_dropout(self,inputs):
    # This implementation of dropout dropouts an entire feature along the time dim
    random_tensor = self._keep_prob
    random_tensor += random_ops.random_uniform([self._batch_size,self._num_inputs],
                                               dtype=inputs.dtype)
    random_tensor = tf.tile(random_tensor,[1,self._num_unrollings])
    binary_tensor = math_ops.floor(random_tensor)

    ret = math_ops.div(inputs, self._keep_prob) * binary_tensor
    ret.set_shape(inputs.get_shape())
    return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号