You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# building inverted residual blocks
for t, c, n, s in inverted_residual_setting:
output_channel = _make_divisible(c * width_mult, round_nearest)
for i in range(n):
stride = s if i == 0 else 1
features.append(block(input_channel, output_channel, stride, expand_ratio=t, norm_layer=norm_layer))
input_channel = output_channel
感谢fire717老师分享的代码实现和解析文章。我拜读之后感到受益匪浅。
这边对于mobilenet_v2的代码实现有一点细节方面的问题,不知道老师您能否为我解惑?
这是本repo对于InvertedResidual模块的实现:
以下是参考torchvision中的mobilenet_v2实现中对应的部分:
我目前理解的两者之间的区别是,本实现版本中的conv2部分是网络结构相同且共用相同权重的InvertedResidual block,输入通过conv1后将通过(n-1)个权重相同的模块。而在torchvision的实现版本中,因为block会调用InvertedResidua的constructor,生成的是网络结构相同但不共用权重的InvertedResidualBlock。不知道我这样的理解是否正确?想请教一下原版本movenet的实现也采用了类似的设计吗?
The text was updated successfully, but these errors were encountered: