Comments (7)
@linyi785 Could you describe the detailed errors?
Everything went well on my side following these simple lines, without mismatched keys.
import torch
from oct_resnet import oct_resnet50
net = oct_resnet50()
net.load_state_dict(torch.load('/path/to/oct_resnet50_cosine.pth'))
from octconv.pytorch.
RuntimeError: Error(s) in loading state_dict for OctResNet:
Missing key(s) in state_dict: "layer1.0.conv1.bn_h.weight", "layer1.0.conv1.bn_h.bias", "layer1.0.conv1.bn_h.running_mean", "layer1.0.conv1.bn_h.running_var", "layer1.0.conv1.bn_l.weight", "layer1.0.conv1.bn_l.bias", "layer1.0.conv1.bn_l.running_mean", "layer1.0.conv1.bn_l.running_var", "layer1.0.conv2.bn_h.weight", "layer1.0.conv2.bn_h.bias", "layer1.0.conv2.bn_h.running_mean", "layer1.0.conv2.bn_h.running_var", "layer1.0.conv2.bn_l.weight", "layer1.0.conv2.bn_l.bias", "layer1.0.conv2.bn_l.running_mean", "layer1.0.conv2.bn_l.running_var", "layer1.0.conv3.conv.conv_l2l.weight", "layer1.0.conv3.conv.conv_l2h.weight", "layer1.0.conv3.conv.conv_h2l.weight", "layer1.0.conv3.conv.conv_h2h.weight", "layer1.0.conv3.bn_h.weight", "layer1.0.conv3.bn_h.bias", "layer1.0.conv3.bn_h.running_mean", "layer1.0.conv3.bn_h.running_var", "layer1.0.conv3.bn_l.weight", "layer1.0.conv3.bn_l.bias", "layer1.0.conv3.bn_l.running_mean", "layer1.0.conv3.bn_l.running_var", "layer1.0.downsample.0.conv.conv_h2l.weight", "layer1.0.downsample.0.conv.conv_h2h.weight", "layer1.0.downsample.0.bn_h.weight", "layer1.0.downsample.0.bn_h.bias", "layer1.0.downsample.0.bn_h.running_mean", "layer1.0.downsample.0.bn_h.running_var", "layer1.0.downsample.0.bn_l.weight", "layer1.0.downsample.0.bn_l.bias", "layer1.0.downsample.0.bn_l.running_mean", "layer1.0.downsample.0.bn_l.running_var", "layer1.1.conv1.bn_h.weight", "layer1.1.conv1.bn_h.bias", "layer1.1.conv1.bn_h.running_mean", "layer1.1.conv1.bn_h.running_var", "...
Unexpected key(s) in state_dict: "layer1.0.bn1.running_mean", "layer1.0.bn1.running_var", "layer1.0.bn1.weight", "layer1.0.bn1.bias", "layer1.0.bn2.running_mean", "layer1.0.bn2.running_var", "layer1.0.bn2.weight", "layer1.0.bn2.bias", "layer1.0.bn3.running_mean", "layer1.0.bn3.running_var", "layer1.0.bn3.weight", "layer1.0.bn3.bias", "layer1.0.conv1.weight", "layer1.0.conv2.weight", "layer1.0.conv3.weight", "layer1.0.downsample.1.running_mean", "layer1.0.downsample.1.running_var", "layer1.0.downsample.1.weight", "layer1.0.downsample.1.bias", "layer1.0.downsample.0.weight", "layer1.1.bn1.running_mean", "layer1.1.bn1.running_var", "layer1.1.bn1.weight", "layer1.1.bn1.bias", "layer1.1.bn2.running_mean", "layer1.1.bn2.running_var", "layer1.1.bn2.weight", "layer1.1.bn2.bias", "layer1.1.bn3.running_mean", "layer1.1.bn3.running_var", "layer1.1.bn3.weight", "layer1.1.bn3.bias", "layer1.1.conv1.weight", "layer1.1.conv2.weight", "layer1.1.conv3.weight", "layer1.2.bn1.running_mean", "layer1.2.bn1.running_var", "layer1.2.bn1.weight", "layer1.2.bn1.bias", "layer1.2.bn2.running_mean", "layer1.2.bn2.running_var", "layer1.2.bn2.weight", "layer1.2.bn2.bias", "layer1.2.bn3.running_mean", "layer1.2.bn3.running_var", "layer1.2.bn3.weight", "layer1.2.bn3.bias", "layer1.2.conv1.weight", "layer1.2.conv2.weight", "layer1.2.conv3.weight", "layer2.0.bn1.running_mean", "layer2.0.bn1.running_var", "layer2.0.bn1.weight", "layer2.0.bn1.bias", "layer2.0.bn2.running_mean", "layer2.0.bn2.running_var", "l...
from octconv.pytorch.
The pre-training weight I used is that the standard resnet50 is not oct_resnet50. Is it wrong here?
from octconv.pytorch.
The architecture of vanilla ResNet and OctResNet is different in almost all layers, so directly loading the weight of ResNet to OctResNet causes the error you met.
from octconv.pytorch.
thanks!By the way,Is your pre-training weight trained on the ImageNet dataset?
from octconv.pytorch.
yes
from octconv.pytorch.
Thank you very much for solving all my doubts.
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
- octave conv cannot support input at any size HOT 3
- 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.