Skip to content

How to get the stage4 features of hrnet? #312

Answered by rwightman
hiyyg asked this question in Q&A
Discussion options

You must be logged in to vote

@hiyyg that is the way it (already) works for HRNet, with the exception of the stem (feature level 0), feature level 1-4 are the branch outputs of the last stage, stage4. The description may have been wrong somewhere as HRNet isn't like other nets. You can check the code.

        x = self.conv1(x)
        x = self.bn1(x)
        x = self.act1(x)
        if 0 in self._out_idx:
            out.append(x)
        x = self.conv2(x)
        x = self.bn2(x)
        x = self.act2(x)
        x = self.stages(x)
        if self.incre_modules is not None:
            x = [incre(f) for f, incre in zip(x, self.incre_modules)]
        for i, f in enumerate(x):
            if i + 1 in self._out_idx:
    …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hiyyg
Comment options

Answer selected by hiyyg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants