本文整理匯總了Python中modeling.ResNet.residual_stage_detectron_mapping方法的典型用法代碼示例。如果您正苦於以下問題:Python ResNet.residual_stage_detectron_mapping方法的具體用法?Python ResNet.residual_stage_detectron_mapping怎麽用?Python ResNet.residual_stage_detectron_mapping使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類modeling.ResNet
的用法示例。
在下文中一共展示了ResNet.residual_stage_detectron_mapping方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: detectron_weight_mapping
# 需要導入模塊: from modeling import ResNet [as 別名]
# 或者: from modeling.ResNet import residual_stage_detectron_mapping [as 別名]
def detectron_weight_mapping(self):
detectron_weight_mapping, orphan_in_detectron = \
ResNet.residual_stage_detectron_mapping(self.res5, 'res5', 3, 5)
# Assign None for res5 modules, do not load from or save to checkpoint
for k in detectron_weight_mapping:
detectron_weight_mapping[k] = None
detectron_weight_mapping.update({
'upconv5.weight': 'conv5_mask_w',
'upconv5.bias': 'conv5_mask_b'
})
return detectron_weight_mapping, orphan_in_detectron