Comments (3)
Do you mean the tensor will not restore to its original size via upsampling if the side of the tensor is odd? If so, manually padding one pixel may be one possible solution. Hopefully, it will not have much negative influence.
from octconv.pytorch.
@d-li14 是的,我写了一点代码解决了
class padToSameSize(nn.Module):
def __init__(self):
super(padToSameSize, self).__init__()
def forward(self, lTensor, rTensor):
hwOfLTensor = np.array(lTensor.size()[2:], dtype=int)
hwOfRtensor = np.array(rTensor.size()[2:], dtype=int)
maxHW = np.max([hwOfLTensor, hwOfRtensor], axis=0)
padHWOfLTensor = maxHW - hwOfLTensor
padHWOfRTensor = maxHW - hwOfRtensor
lTensor = F.pad(lTensor, pad=[int(padHWOfLTensor[1]), 0, int(padHWOfLTensor[0]), 0])
rTensor = F.pad(rTensor, pad=[int(padHWOfRTensor[1]), 0, int(padHWOfRTensor[0]), 0])
return lTensor, rTensor
from octconv.pytorch.
@Stinky-Tofu Good job, exactly an effective workaround here!
from octconv.pytorch.
Related Issues (20)
- Initialisation of layers and weights not available HOT 1
- about the pre-trained model HOT 1
- basic_block in oct_resnet HOT 1
- redundant x_h in oct_resnet ? HOT 1
- There is no main script to run the network ?
- There are implementation with UNet? HOT 1
- train coed HOT 1
- about the pre-trained model of the OctResNet-101 HOT 3
- Could you add a example of resnet18? HOT 1
- Difference between your implementation and paper. HOT 3
- BatchNorm before activation vs BatchNorm after activation
- Why only return high frequency features (x_h) HOT 1
- Could you please provide the training recipe file?
- Training code HOT 2
- Why is original resnet50 faster than octave-resnet50? HOT 4
- hi,Why the accuracy of original resnet26 is higher than octave-resnet26 used in cifar10 and cifar100? HOT 2
- Good work , will you provide more pretrained models? HOT 5
- Hi, why not adopting pre-actice version? HOT 1
- Computation time around 3 times longer with OctConv HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octconv.pytorch.