摘要:
def forward(x, regularizer): w= b= y= return y def get_weight(shape, regularizer): w=tf.Variable() tf.add_to_collection('losses', tf.contrib.layers.l2_regularizer(regulari... 阅读全文
摘要:
过拟合与正则化 正则化计算方法 matplotlib可视化工具模块使用方法: 例子: 阅读全文
摘要:
#TensorFlow函数 ce = -tf.reduce_mean(y_* tf.log(tf.clip_by_value(y, 1e-12, 1.0))) #Tensorflow代码 ce = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=y, labels=tf.argmax(y_,1)) cem = tf.re... 阅读全文