Comments (1)
Maybe I solved it by edit the key name in pth file.
model = build_vovnet_fpn_backbone(config,input_shape = ShapeSpec(channels=3, height=448, width=800, stride=None))
pretrained_model_whole = torch.load('/data/CenterFusion0/models/vovnet99_dd3d15m.pth',map_location=torch.device('cpu'))
pretrained_model =pretrained_model_whole['model']
pretrained_model_with_new_key = OrderedDict([])
keys2del = ["fpn_lateral2.norm.num_batches_tracked", "fpn_output2.norm.num_batches_tracked", "fpn_lateral3.norm.num_batches_tracked", "fpn_output3.norm.num_batches_tracked", "fpn_lateral4.norm.num_batches_tracked", "fpn_output4.norm.num_batches_tracked", "fpn_lateral5.norm.num_batches_tracked", "fpn_output5.norm.num_batches_tracked", "top_block.p6.weight", "top_block.p6.bias"]
for key in pretrained_model:
if 'backbone.' in key:
new_key = key.replace('backbone.','')
pretrained_model_with_new_key[new_key] = pretrained_model[key]
for key in keys2del:
del pretrained_model_with_new_key[key]
# missing_keys, unexpected_keys = model.load_state_dict(pretrained_model)
missing_keys, unexpected_keys = model.load_state_dict(pretrained_model_with_new_key)
print("[missing_keys]:", *missing_keys, sep="\n")
print("[unexpected_keys]:", *unexpected_keys, sep="\n")
from dd3d.
Related Issues (20)
- question about allocentric_to_egocentric HOT 3
- How to calc 'MEAN_DEPTH_PER_LEVEL' and 'STD_DEPTH_PER_LEVEL' HOT 4
- RuntimeError: cannot perform reduction function argmax on a tensor with no elements because the operation does not have an identity HOT 1
- model trained on NuScenes HOT 1
- Box pose transfomation from camera 2 to velodyne may not be correct.
- where to change the train class num 5 to 3
- Guidance on Pre training
- Multi-node training
- Generating Validation Folder HOT 1
- Please generate a precompiled docker image
- Can release DD3DV2 code?
- why dd3d_kitti_omninets.yaml feature_extractors use DLA34
- Omninets weights Some model parameters or buffers are not found HOT 2
- omninets train result is very low HOT 5
- OmniML trained weights link not working HOT 1
- I can't reproduce the result of Kitti Dataset.
- AttributeError: 'DD3D' object has no attribute 'export'
- Unable to get visualize_dataloader.py to run due to kitti access
- Could release other vovnet backbone pre-trained on DDAD15M?
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 dd3d.