From 2d39447c060571f83baf84c7fb7cbc062c232273 Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 4 Jul 2017 16:46:59 +0200 Subject: [PATCH 1/2] ReLU was being applied twice ReLU is currently being applied after every convolution and after BN. Xception applies relu only after BN. --- xception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xception.py b/xception.py index 234c187..51a73e9 100644 --- a/xception.py +++ b/xception.py @@ -162,7 +162,8 @@ def xception_arg_scope(weight_decay=0.00001, # Set weight_decay for weights in conv2d and separable_conv2d layers. with slim.arg_scope([slim.conv2d, slim.separable_conv2d], weights_regularizer=slim.l2_regularizer(weight_decay), - biases_regularizer=slim.l2_regularizer(weight_decay)): + biases_regularizer=slim.l2_regularizer(weight_decay), + activation_fn=None): # Set parameters for batch_norm. Note: Do not set activation function as it's preset to None already. with slim.arg_scope([slim.batch_norm], From c5852a137f001ae4ada584f3dd60bb99ac7f072e Mon Sep 17 00:00:00 2001 From: Kwotsin Date: Tue, 4 Jul 2017 23:58:19 +0800 Subject: [PATCH 2/2] Update xception.py --- xception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xception.py b/xception.py index 51a73e9..9a7ee26 100644 --- a/xception.py +++ b/xception.py @@ -162,7 +162,7 @@ def xception_arg_scope(weight_decay=0.00001, # Set weight_decay for weights in conv2d and separable_conv2d layers. with slim.arg_scope([slim.conv2d, slim.separable_conv2d], weights_regularizer=slim.l2_regularizer(weight_decay), - biases_regularizer=slim.l2_regularizer(weight_decay), + biases_initializer=None, activation_fn=None): # Set parameters for batch_norm. Note: Do not set activation function as it's preset to None already.