Tensorflow: Trainable Variable Masking

若如初见. 提交于 2019-12-01 10:33:08

Maybe you could have your trainable weights W1, a mask M indicating where the trainable variables are, and a constant / untrainable weight matrix W2, and use

W = tf.multiply(W1, tf.cast(M, dtype=W1.dtype)) + tf.multiply(W2, tf.cast(tf.logical_not(M), dtype=W2.dtype)) 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!