权重优化 正则化

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)(
相关文章
相关标签/搜索