crnn-pytorch icon indicating copy to clipboard operation
crnn-pytorch copied to clipboard

Ask about seq projection

Open realjoenguyen opened this issue 6 years ago • 0 comments

Hi everyone, Can I ask the meaning of seq_proj? I see it is used to transform the feature map from CNN? Specifically, can someone explain this segment of code? Thank you:

def features_to_sequence(self, features):
    b, c, h, w = features.size()
    assert h == 1, "the height of out must be 1"
    if not self.fully_conv:
        features = features.permute(0, 3, 2, 1)
        features = self.proj(features)
        features = features.permute(1, 0, 2, 3)
    else:
        features = features.permute(3, 0, 2, 1)
    features = features.squeeze(2)
    return features

realjoenguyen avatar Mar 09 '19 08:03 realjoenguyen