Coder Social home page Coder Social logo

Input channel mismatch about ffc HOT 3 CLOSED

pkumivision avatar pkumivision commented on September 18, 2024
Input channel mismatch

from ffc.

Comments (3)

huameinan219 avatar huameinan219 commented on September 18, 2024 1

I meet the same problem if ration_gin is not zero!

I meet the same problem if ration_gin is not zero!
我也是遇到的这个问题,然后我参考了文件ffc_resnet.py中实现BisicBlock类的做法,我使用三层ffc来代替原来的卷积层。
self.ffclayers = nn.Sequential(FFC(channels, channels, 3, 0, 0.75, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), FFC(channels, channels, 3, 0.75, 0.75, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), FFC(channels, self.out_channel, 3, 0.75, 0, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), ConcatTupleLayer(),)
这里的ConcatTupleLayer()参考的 https://github.com/saic-mdal/lama

class ConcatTupleLayer(nn.Module): def forward(self, x): assert isinstance(x, tuple) x_l, x_g = x assert torch.is_tensor(x_l) or torch.is_tensor(x_g) if not torch.is_tensor(x_g): return x_l return torch.cat(x, dim=1)
class ConcatTupleLayer(nn.Module): def forward(self, x): assert isinstance(x, tuple) x_l, x_g = x assert torch.is_tensor(x_l) or torch.is_tensor(x_g) if not torch.is_tensor(x_g): return x_l return torch.cat(x, dim=1)

我在一个人脸修复任务中的开头的卷积层应用了快速傅里叶卷积,效果好像还彳亍。

from ffc.

ZeliangM avatar ZeliangM commented on September 18, 2024

I meet the same problem if ration_gin is not zero!

from ffc.

ZeliangM avatar ZeliangM commented on September 18, 2024

I meet the same problem if ration_gin is not zero!

I meet the same problem if ration_gin is not zero! 我也是遇到的这个问题,然后我参考了文件ffc_resnet.py中实现BisicBlock类的做法,我使用三层ffc来代替原来的卷积层。 self.ffclayers = nn.Sequential(FFC(channels, channels, 3, 0, 0.75, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), FFC(channels, channels, 3, 0.75, 0.75, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), FFC(channels, self.out_channel, 3, 0.75, 0, stride=1, padding=1, dilation=1, groups=1, bias=False, enable_lfu=False), ConcatTupleLayer(),) 这里的ConcatTupleLayer()参考的 https://github.com/saic-mdal/lama

class ConcatTupleLayer(nn.Module): def forward(self, x): assert isinstance(x, tuple) x_l, x_g = x assert torch.is_tensor(x_l) or torch.is_tensor(x_g) if not torch.is_tensor(x_g): return x_l return torch.cat(x, dim=1) class ConcatTupleLayer(nn.Module): def forward(self, x): assert isinstance(x, tuple) x_l, x_g = x assert torch.is_tensor(x_l) or torch.is_tensor(x_g) if not torch.is_tensor(x_g): return x_l return torch.cat(x, dim=1)

我在一个人脸修复任务中的开头的卷积层应用了快速傅里叶卷积,效果好像还彳亍。

感谢您耐心回复,对我解决bug很有帮助。希望未来能有机会和您进一步交流。

from ffc.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.