權重優化 正則化

W增加權重 l1   權重求和 l2 權重平方求和 def get_weight(shape, regularizer):  w = tf.Variable(tf.random_normal(shape), dtype=tf.float32)  tf.add_to_collection('losses', tf.contrib.layers.l2_regularizer(regularizer)(
相關文章
相關標籤/搜索