Skip to content

[Ask for advice] Modify models by adding skip connections #24

@crossknight

Description

@crossknight

Hi,

I need to modify models by adding skip connections between encoder layers and decoder layers like this

x = input  
x = self.layer0[-1](x)  
x = x + input  
x1 = self.layer1(x)  
x1 = x1 + x  
x2 = self.layer2(x1)  
x2 = x2 + x1  
x3 = self.layer3(x2)  
x3 = x3 + x2  
x4 = self.layer4(x3)  
x4 = x4 + x3  

I've tried implementing this and encountered the problem which dimensions after and before passing layers are unequal and the values and can't be added.

Is it possible to implement this? and How to implement it?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions