美文网首页
2017-5-25-自动编码机

2017-5-25-自动编码机

作者: Elitack | 来源:发表于2017-05-25 11:10 被阅读0次

    这几天都在忙着码一个自动编码机,
    其实代码也比较简单,但是调研的比较多.
    因为发现在tensorflow当中其实并不是很好传递参数.
    比如说我在训练一个自动编码机的过程中,想实现weights tying,
    比如一个四层的网络,我想令W4 = W1.T(转置), W3=W2.T
    这种直接的改变很难通过固有的库去实现.

    hands on machine learning with scikit-learn and tensorflow这本书中是这么写的:
    *unfortunately, implementing tied weights in tensorflow using fully_connected function() is a bit cunbersome: it's actually easier to just define the layers manually. *

    意思是我们只能手写一些例如激活函数之类的东西,从底层实现了.

    实际上我训练完之后,返回的也只能是一个字典:
    weights:{'weights1' : xxx, 'weights2': xxx....}
    biases:{'biases1': xxx, 'biases2': xxx....}

    具体如果要实现把自动编码机嵌入到代码的全连接层中的话,可能还是得如书中所说: define the layers manually...

    具体详情请参考machine learning 的文集.

    相关文章

      网友评论

          本文标题:2017-5-25-自动编码机

          本文链接:https://www.haomeiwen.com/subject/vawaxxtx.html