melodyguan / enas

TensorFlow Code for paper "Efficient Neural Architecture Search via Parameter Sharing"
https://arxiv.org/abs/1802.03268
Apache License 2.0
1.58k stars 390 forks source link

Explanation of `cifar10.micro_child._factorized_reduction` #14

Open bkj opened 6 years ago

bkj commented 6 years ago

The docstring for cifar10.micro_child._factorized_reduction says

"""Reduces the shape of x without information loss due to striding."""

Could you explain what that means?

When stride=2,

path1 = tf.nn.avg_pool(x, [1, 1, 1, 1], stride_spec, "VALID", data_format=self.data_format)

and

path2 = tf.nn.avg_pool(path2, [1, 1, 1, 1], stride_spec, "VALID", data_format=self.data_format)

each select 1/4 of the spatial locations, so you end up ignoring half of the spatial locations (specifically, any (i,j) where i % 2 != j % 2). Is that right?

~ Ben

karandwivedi42 commented 6 years ago

Also, why not do avg pool with kernel size 2 instead? Is there a benefit of this approach?