UVM-Net icon indicating copy to clipboard operation
UVM-Net copied to clipboard

Issue with reshaping

Open kabbas570 opened this issue 11 months ago • 1 comments

Hello, thanks for the nice work, In the following code, should not the x be permuted first before reshaping, x = self.ln(x.reshape(b, -1, c))

def forward(self, x):
        b,c,w,h = x.shape
        x = self.convb(x) + x
        x = self.ln(x.reshape(b, -1, c))
        y = self.model1(x).permute(0, 2, 1)
        z = self.model3(y).permute(0, 2, 1)
        att = self.softmax(self.model2(x))
        result = att * z
        output = result.reshape(b, c, w, h)
        return self.smooth(output)

kabbas570 avatar Mar 20 '24 17:03 kabbas570