ista_tf.py 文件源码

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

项目:AdaptiveOptim 作者: tomMoral 项目源码 文件源码
def _get_cost(self, inputs):
        Z, X, lmbd = self.inputs
        with tf.name_scope("Cost"):
            rec = tf.matmul(Z, tf.constant(self.D))
            Er = tf.reduce_mean(
                tf.reduce_sum(tf.squared_difference(rec, X),
                              reduction_indices=[1]))/2
            cost = Er + lmbd * tf.reduce_mean(
                tf.reduce_sum(tf.abs(Z), reduction_indices=[1]))

        return cost
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号