Earthgod
Earthgod

Reputation: 692

What is MobileNetv1 depth_multiplier?

Refering to tensorflow mobilenetv1 model: https://github.com/tensorflow/models/blob/9f7a5fa353df0ee2010f8e7a5494ca6b188af8bc/research/slim/nets/mobilenet_v1.py#L171

The param depth_multiplier is documented as:

depth_multiplier: Float multiplier for the depth (number of channels) for all convolution ops. The value must be greater than zero. Typical usage will be to set this value in (0, 1) to reduce the number of parameters or computation cost of the model

But in the (paper), they mention 2 types of multipliers: width multiplier and resolution multiplier, so which one correspond to depth multiplier?

On Keras, they say that:

depth_multiplier: depth multiplier for depthwise convolution (also called the resolution multiplier)

I'm so confused!

Upvotes: 5

Views: 5463

Answers (1)

NodYoung
NodYoung

Reputation: 71

As described in the paper:

  1. The role of the width multiplier α is to thin a network uniformly at each layer. for a given layer and width multiplier α, the number of input channels M becomes αM and the number of output channels N becomes αN.

  2. The resolution multiplier ρ is applied to the input image and the internal representation of every layer is subsequently reduced by the same multiplier. In practice we implicitly set ρ by setting the input resolution.

In the code: The depth_multiplier is used to reduce the number of channels at each layer. So the depth_multiplier corresponds the width multiplier α.

Upvotes: 7

Related Questions