Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris committed Jun 16, 2021
1 parent f8a1432 commit e256ef1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flash/image/segmentation/heads.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def _get_backbone_meta(backbone):
backbone = backbone.features
# Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks.
# The first and last blocks are always included because they are the C0 (conv1) and Cn.
stage_indices = ([0] + [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)] +
[len(backbone) - 1])
stage_indices = [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)]
stage_indices = [0] + stage_indices + [len(backbone) - 1]
out_pos = stage_indices[-1] # use C5 which has output_stride = 16
out_layer = str(out_pos)
out_inplanes = backbone[out_pos].out_channels
Expand Down

0 comments on commit e256ef1

Please sign in to comment.