Closed ywpkwon closed 4 years ago
In the function "AtrousSpatialPyramidPoolingModule", (line 30, models/DeepLabV3.py)
There is "image_features" (line 41)
feature_map_size = tf.shape(inputs) # Global average pooling image_features = tf.reduce_mean(inputs, [1, 2], keep_dims=True) image_features = slim.conv2d(image_features, depth, [1, 1], activation_fn=None) image_features = tf.image.resize_bilinear(image_features, (feature_map_size[1], feature_map_size[2]))
It looks to me that image_feature is reduce_mean(keep_dims=True) of inputs so has same size with the inputs. feature_map_size is also the shape of inputs.
image_feature
reduce_mean(keep_dims=True)
inputs
feature_map_size
Then why is the resize_bilinear needed if image_features has already feature map_size?
resize_bilinear
image_features
feature map_size
Oh, I was confused. If you have a similar question, you may want to see https://github.com/rishizek/tensorflow-deeplab-v3/issues/37.
In the function "AtrousSpatialPyramidPoolingModule", (line 30, models/DeepLabV3.py)
There is "image_features" (line 41)
It looks to me that
image_feature
isreduce_mean(keep_dims=True)
ofinputs
so has same size with theinputs
.feature_map_size
is also the shape ofinputs
.Then why is the
resize_bilinear
needed ifimage_features
has alreadyfeature map_size
?