thoroughimages / octconv Goto Github PK
View Code? Open in Web Editor NEWA PyTorch Implementation for Octave Convolution in Drop an Octave
License: MIT License
A PyTorch Implementation for Octave Convolution in Drop an Octave
License: MIT License
Thank you for your work that does help me a lot. Here I have one question, if the input of octave convolution network is (batch_size, channels, H, W) where H is equal to 1000, while W is equal to one. Then I use the code self.convs = nn.Sequential(OctConv2d('first', in_channels=1, out_channels=32, kernel_size=3),
;it raises a TypeError:init() missing 1 required positional argument: 'padding_mode' in
super(OctConv2d, self).__init__( in_channels, out_channels, kernel_size, stride, padding, dilation, False, _pair(0), 1, bias)
Thank you!
Please kindly help answer : at the first layer how to distinguish low-frequency and high-frequency feature maps
Line 72 in 6d4c6b4
The emerging consensus is that this is the wrong way to implement strided convolutions in OctConv. See terrychenism/OctaveConv#4
This is my code :
class Accurate_Modle((torch.nn.Module)):
def init(self,data_kind,padding):
super(Accurate_Modle, self).init()
self.con6 = torch.nn.Conv2d(2*112,384, kernel_size=1, stride=1, padding=0)
self.con7 = torch.nn.Conv2d(384, 384, kernel_size=1, stride=1, padding=0)
self.con8 = torch.nn.Conv2d(384, 384, kernel_size=1, stride=1, padding=0)
self.con9 = torch.nn.Conv2d(384, 1, kernel_size=1, stride=1, padding=0)
if data_kind=='mb':
# torch.nn.init.constant_(self.con5.bias, 0)
self.conv1 = torch.nn.Sequential(OctConv2d('first', in_channels=1, out_channels=112, kernel_size=3),
OctReLU(),
OctConv2d('regular', in_channels=112, out_channels=112, kernel_size=3),
OctReLU(),
OctConv2d('regular', in_channels=112, out_channels=112, kernel_size=3),
OctReLU(),
OctConv2d('regular', in_channels=112, out_channels=112, kernel_size=3),
OctReLU(),
OctConv2d('last', in_channels=112, out_channels=112, kernel_size=3),
nn.ReLU(),
)
self.full = torch.nn.Sequential(
self.con6,
torch.nn.ReLU(),
self.con7,
torch.nn.ReLU(),
self.con8,
torch.nn.ReLU(),
self.con9,
torch.nn.Sigmoid()
)
# elif data_kind=='kitt':
# #...
def forward(self,x0,x1,flag):
if flag=='train':
y0 = self.conv1(x0) # left_patch
y1 = self.conv1(x1)
y3 = torch.cat((y0, y1), 1)
# print(y3.shape)
y = self.full(y3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.