DAE.py 文件源码

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

项目:Collaborative_Deep_Learning 作者: gtshs2 项目源码 文件源码
def do_not_pretrain(self):
        with tf.variable_scope("SDAE_Variable"):
            pre_W = tf.get_variable(name=("pre_W"+str(self.itr)), initializer=tf.truncated_normal(shape=[self.n_visible, self.n_hidden],
                                                                      mean=0, stddev=tf.truediv(1.0,self.lambda_w)), dtype=tf.float32)
            pre_b = tf.get_variable(name=("pre_b"+str(self.itr)), initializer=tf.zeros(shape=self.n_hidden), dtype=tf.float32)
            '''
            pre_W = tf.get_variable(name=("pre_W"+str(self.itr)), shape=[self.n_visible, self.n_hidden], dtype=tf.float32,initializer=tf.random_normal_initializer())
            pre_b = tf.get_variable(name=("pre_b"+str(self.itr)), shape=[self.n_hidden], dtype=tf.float32,
                                     initializer=tf.random_normal_initializer())
         '''
        return pre_W , pre_b
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号