def spoofnet_y_arg_scope(weight_decay=0.0004):
"""Defines the default cifarnet argument scope.
Args:
weight_decay: The weight decay to use for regularizing the model.
Returns:
An `arg_scope` to use for the inception v3 model.
"""
with slim.arg_scope(
[slim.conv2d],
weights_initializer=tf.truncated_normal_initializer(stddev=5e-2), #TODO: or: weights_initializer=slim.variance_scaling_initializer(), as inception/vgg/resnet
# weights_regularizer=slim.l2_regularizer(weight_decay),
activation_fn=tf.nn.relu
):
# with slim.arg_scope(
# [slim.fully_connected],
# biases_initializer=tf.constant_initializer(0.1),
# weights_initializer=trunc_normal(0.04),
# weights_regularizer=slim.l2_regularizer(weight_decay),
# activation_fn=tf.nn.relu):
with slim.arg_scope([slim.max_pool2d], padding='SAME') as sc:
return sc
评论列表
文章目录