def inference(inputs, keep_prob,
bottleneck_size=128,
phase_train=True,
weight_decay=0.0,
reuse=None):
batch_norm_params = {
'decay': 0.995,
'epsilon': 0.001,
'updates_collections': None,
# 'scale': True, # [test1]
'variables_collections': [tf.GraphKeys.TRAINABLE_VARIABLES]} # [test2]
with slim.arg_scope(
[slim.conv2d, slim.fully_connected],
weights_initializer=tf.truncated_normal_initializer(stddev=0.1),
weights_regularizer=slim.l2_regularizer(weight_decay),
normalizer_fn=slim.batch_norm,
normalizer_params=batch_norm_params):
return inception_resnet_v1(inputs, is_training=phase_train, keep_prob=keep_prob,
bottleneck_size=bottleneck_size, reuse=reuse)
评论列表
文章目录