相关疑难解决方法(0)

我怎样才能在TensorFlow中使用批量标准化?

我想在TensorFlow中使用批量规范化.我找到了相关的C++源代码core/ops/nn_ops.cc.但是,我没有在tensorflow.org上找到它.

BN在MLP和CNN中有不同的语义,所以我不确定这个BN究竟是做什么的.

我没有找到一个叫做的方法MovingMoments.

python tensorflow

77
推荐指数
6
解决办法
8万
查看次数

测试时Tensorflow batch_norm无法正常工作(is_training = False)

我正在训练以下模型:

with slim.arg_scope(inception_arg_scope(is_training=True)):
    logits_v, endpoints_v = inception_v3(all_v, num_classes=25, is_training=True, dropout_keep_prob=0.8,
                     spatial_squeeze=True, reuse=reuse_variables, scope='vis')
    logits_p, endpoints_p = inception_v3(all_p, num_classes=25, is_training=True, dropout_keep_prob=0.8,
                     spatial_squeeze=True, reuse=reuse_variables, scope='pol')
    pol_features = endpoints_p['pol/features']
    vis_features = endpoints_v['vis/features']

eps = 1e-08
loss = tf.sqrt(tf.maximum(tf.reduce_sum(tf.square(pol_features - vis_features), axis=1, keep_dims=True), eps))

# rest of code
saver = tf.train.Saver(tf.global_variables())
Run Code Online (Sandbox Code Playgroud)

哪里

def inception_arg_scope(weight_decay=0.00004,
                    batch_norm_decay=0.9997,
                    batch_norm_epsilon=0.001, is_training=True):
normalizer_params = {
    'decay': batch_norm_decay,
    'epsilon': batch_norm_epsilon,
    'is_training': is_training
}
normalizer_fn = tf.contrib.layers.batch_norm

# Set weight_decay for weights in Conv and FC layers.
with slim.arg_scope([slim.conv2d, slim.fully_connected],
                    weights_regularizer=slim.l2_regularizer(weight_decay)): …
Run Code Online (Sandbox Code Playgroud)

testing tensorflow batch-normalization

7
推荐指数
1
解决办法
4093
查看次数

标签 统计

tensorflow ×2

batch-normalization ×1

python ×1

testing ×1