Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions d2go/modeling/backbone/fbnet_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def add_fbnet_v2_default_configs(_C):
# https://github.com/rbgirshick/yacs/blob/master/yacs/config.py#L410
_C.MODEL.FBNET_V2.NORM_ARGS = []

# Set up operators fusion option in the backbone's blocks
_C.MODEL.FBNET_V2.FUSE_OPS = False

_C.MODEL.VT_FPN = CN()

_C.MODEL.VT_FPN.IN_FEATURES = ["res2", "res3", "res4", "res5"]
Expand Down
4 changes: 4 additions & 0 deletions d2go/modeling/backbone/fbnet_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,16 @@ def build_fbnet(cfg, name, in_channels):
stages = []
trunk_stride_per_stage = _get_stride_per_stage(arch_def_blocks)
shape_spec_per_stage = []
fuse_ops = getattr(cfg.MODEL.FBNET_V2, "FUSE_OPS", False)
is_qat = getattr(cfg, "QAT", False)
for i, stride_i in enumerate(trunk_stride_per_stage):
stages.append(
builder.build_blocks(
arch_def_blocks,
stage_indices=[i],
prefix_name=FBNET_BUILDER_IDENTIFIER + "_",
fuse_ops=fuse_ops,
is_qat=is_qat,
)
)
shape_spec_per_stage.append(
Expand Down