Hello,
Thanks for publishing a great code.
While trying to test your model, I have a problem with model loading as follows
Here is the command line I used
python ./demo.py --model ./models/raft-small.pth --path /media/F/sample_codes/RAFT/demo_data/cam01
Here is the error message
File "./demo.py", line 81, in
demo(args)
File "./demo.py", line 53, in demo
model.load_state_dict(torch.load(args.model))
RuntimeError: Error(s) in loading state_dict for RAFT:
Missing key(s) in state_dict: "fnet.conv1.weight", "fnet.conv1.bias", "fnet.layer1.0.conv1.weight", "fnet.layer1.0.conv1.bias", "fnet.layer1.0.conv2.weight", "fnet.layer1.0.conv2.bias", "fnet.layer1.1.conv1.weight", "fnet.layer1.1.conv1.bias", "fnet.layer1.1.conv2.weight", "fnet.layer1.1.conv2.bias", "fnet.layer2.0.conv1.weight", "fnet.layer2.0.conv1.bias", "fnet.layer2.0.conv2.weight", "fnet.layer2.0.conv2.bias", "fnet.layer2.0.downsample.0.weight", "fnet.layer2.0.downsample.0.bias", "fnet.layer2.1.conv1.weight", "fnet.layer2.1.conv1.bias", "fnet.layer2.1.conv2.weight", "fnet.layer2.1.conv2.bias", "fnet.layer3.0.conv1.weight", "fnet.layer3.0.conv1.bias", "fnet.layer3.0.conv2.weight", "fnet.layer3.0.conv2.bias", "fnet.layer3.0.downsample.0.weight", "fnet.layer3.0.downsample.0.bias", "fnet.layer3.1.conv1.weight", "fnet.layer3.1.conv1.bias", "fnet.layer3.1.conv2.weight", "fnet.layer3.1.conv2.bias", "fnet.conv2.weight", "fnet.conv2.bias", "cnet.norm1.weight", "cnet.norm1.bias", "cnet.norm1.running_mean", "cnet.norm1.running_var", "cnet.conv1.weight", "cnet.conv1.bias", "cnet.layer1.0.conv1.weight", "cnet.layer1.0.conv1.bias", "cnet.layer1.0.conv2.weight", "cnet.layer1.0.conv2.bias", "cnet.layer1.0.norm1.weight", "cnet.layer1.0.norm1.bias", "cnet.layer1.0.norm1.running_mean", "cnet.layer1.0.norm1.running_var", "cnet.layer1.0.norm2.weight", "cnet.layer1.0.norm2.bias", "cnet.layer1.0.norm2.running_mean", "cnet.layer1.0.norm2.running_var", "cnet.layer1.1.conv1.weight", "cnet.layer1.1.conv1.bias", "cnet.layer1.1.conv2.weight", "cnet.layer1.1.conv2.bias", "cnet.layer1.1.norm1.weight", "cnet.layer1.1.norm1.bias", "cnet.layer1.1.norm1.running_mean", "cnet.layer1.1.norm1.running_var", "cnet.layer1.1.norm2.weight", "cnet.layer1.1.norm2.bias", "cnet.layer1.1.norm2.running_mean", "cnet.layer1.1.norm2.running_var", "cnet.layer2.0.conv1.weight", "cnet.layer2.0.conv1.bias", "cnet.layer2.0.conv2.weight", "cnet.layer2.0.conv2.bias", "cnet.layer2.0.norm1.weight", "cnet.layer2.0.norm1.bias", "cnet.layer2.0.norm1.running_mean", "cnet.layer2.0.norm1.running_var", "cnet.layer2.0.norm2.weight", "cnet.layer2.0.norm2.bias", "cnet.layer2.0.norm2.running_mean", "cnet.layer2.0.norm2.running_var", "cnet.layer2.0.norm3.weight", "cnet.layer2.0.norm3.bias", "cnet.layer2.0.norm3.running_mean", "cnet.layer2.0.norm3.running_var", "cnet.layer2.0.downsample.0.weight", "cnet.layer2.0.downsample.0.bias", "cnet.layer2.0.downsample.1.weight", "cnet.layer2.0.downsample.1.bias", "cnet.layer2.0.downsample.1.running_mean", "cnet.layer2.0.downsample.1.running_var", "cnet.layer2.1.conv1.weight", "cnet.layer2.1.conv1.bias", "cnet.layer2.1.conv2.weight", "cnet.layer2.1.conv2.bias", "cnet.layer2.1.norm1.weight", "cnet.layer2.1.norm1.bias", "cnet.layer2.1.norm1.running_mean", "cnet.layer2.1.norm1.running_var", "cnet.layer2.1.norm2.weight", "cnet.layer2.1.norm2.bias", "cnet.layer2.1.norm2.running_mean", "cnet.layer2.1.norm2.running_var", "cnet.layer3.0.conv1.weight", "cnet.layer3.0.conv1.bias", "cnet.layer3.0.conv2.weight", "cnet.layer3.0.conv2.bias", "cnet.layer3.0.norm1.weight", "cnet.layer3.0.norm1.bias", "cnet.layer3.0.norm1.running_mean", "cnet.layer3.0.norm1.running_var", "cnet.layer3.0.norm2.weight", "cnet.layer3.0.norm2.bias", "cnet.layer3.0.norm2.running_mean", "cnet.layer3.0.norm2.running_var", "cnet.layer3.0.norm3.weight", "cnet.layer3.0.norm3.bias", "cnet.layer3.0.norm3.running_mean", "cnet.layer3.0.norm3.running_var", "cnet.layer3.0.downsample.0.weight", "cnet.layer3.0.downsample.0.bias", "cnet.layer3.0.downsample.1.weight", "cnet.layer3.0.downsample.1.bias", "cnet.layer3.0.downsample.1.running_mean", "cnet.layer3.0.downsample.1.running_var", "cnet.layer3.1.conv1.weight", "cnet.layer3.1.conv1.bias", "cnet.layer3.1.conv2.weight", "cnet.layer3.1.conv2.bias", "cnet.layer3.1.norm1.weight", "cnet.layer3.1.norm1.bias", "cnet.layer3.1.norm1.running_mean", "cnet.layer3.1.norm1.running_var", "cnet.layer3.1.norm2.weight", "cnet.layer3.1.norm2.bias", "cnet.layer3.1.norm2.running_mean", "cnet.layer3.1.norm2.running_var", "cnet.conv2.weight", "cnet.conv2.bias", "update_block.encoder.convc1.weight", "update_block.encoder.convc1.bias", "update_block.encoder.convc2.weight", "update_block.encoder.convc2.bias", "update_block.encoder.convf1.weight", "update_block.encoder.convf1.bias", "update_block.encoder.convf2.weight", "update_block.encoder.convf2.bias", "update_block.encoder.conv.weight", "update_block.encoder.conv.bias", "update_block.gru.convz1.weight", "update_block.gru.convz1.bias", "update_block.gru.convr1.weight", "update_block.gru.convr1.bias", "update_block.gru.convq1.weight", "update_block.gru.convq1.bias", "update_block.gru.convz2.weight", "update_block.gru.convz2.bias", "update_block.gru.convr2.weight", "update_block.gru.convr2.bias", "update_block.gru.convq2.weight", "update_block.gru.convq2.bias", "update_block.flow_head.conv1.weight", "update_block.flow_head.conv1.bias", "update_block.flow_head.conv2.weight", "update_block.flow_head.conv2.bias", "update_block.mask.0.weight", "update_block.mask.0.bias", "update_block.mask.2.weight", "update_block.mask.2.bias".
Unexpected key(s) in state_dict: "module.fnet.conv1.weight", "module.fnet.conv1.bias", "module.fnet.layer1.0.conv1.weight", "module.fnet.layer1.0.conv1.bias", "module.fnet.layer1.0.conv2.weight", "module.fnet.layer1.0.conv2.bias", "module.fnet.layer1.0.conv3.weight", "module.fnet.layer1.0.conv3.bias", "module.fnet.layer1.1.conv1.weight", "module.fnet.layer1.1.conv1.bias", "module.fnet.layer1.1.conv2.weight", "module.fnet.layer1.1.conv2.bias", "module.fnet.layer1.1.conv3.weight", "module.fnet.layer1.1.conv3.bias", "module.fnet.layer2.0.conv1.weight", "module.fnet.layer2.0.conv1.bias", "module.fnet.layer2.0.conv2.weight", "module.fnet.layer2.0.conv2.bias", "module.fnet.layer2.0.conv3.weight", "module.fnet.layer2.0.conv3.bias", "module.fnet.layer2.0.downsample.0.weight", "module.fnet.layer2.0.downsample.0.bias", "module.fnet.layer2.1.conv1.weight", "module.fnet.layer2.1.conv1.bias", "module.fnet.layer2.1.conv2.weight", "module.fnet.layer2.1.conv2.bias", "module.fnet.layer2.1.conv3.weight", "module.fnet.layer2.1.conv3.bias", "module.fnet.layer3.0.conv1.weight", "module.fnet.layer3.0.conv1.bias", "module.fnet.layer3.0.conv2.weight", "module.fnet.layer3.0.conv2.bias", "module.fnet.layer3.0.conv3.weight", "module.fnet.layer3.0.conv3.bias", "module.fnet.layer3.0.downsample.0.weight", "module.fnet.layer3.0.downsample.0.bias", "module.fnet.layer3.1.conv1.weight", "module.fnet.layer3.1.conv1.bias", "module.fnet.layer3.1.conv2.weight", "module.fnet.layer3.1.conv2.bias", "module.fnet.layer3.1.conv3.weight", "module.fnet.layer3.1.conv3.bias", "module.fnet.conv2.weight", "module.fnet.conv2.bias", "module.cnet.conv1.weight", "module.cnet.conv1.bias", "module.cnet.layer1.0.conv1.weight", "module.cnet.layer1.0.conv1.bias", "module.cnet.layer1.0.conv2.weight", "module.cnet.layer1.0.conv2.bias", "module.cnet.layer1.0.conv3.weight", "module.cnet.layer1.0.conv3.bias", "module.cnet.layer1.1.conv1.weight", "module.cnet.layer1.1.conv1.bias", "module.cnet.layer1.1.conv2.weight", "module.cnet.layer1.1.conv2.bias", "module.cnet.layer1.1.conv3.weight", "module.cnet.layer1.1.conv3.bias", "module.cnet.layer2.0.conv1.weight", "module.cnet.layer2.0.conv1.bias", "module.cnet.layer2.0.conv2.weight", "module.cnet.layer2.0.conv2.bias", "module.cnet.layer2.0.conv3.weight", "module.cnet.layer2.0.conv3.bias", "module.cnet.layer2.0.downsample.0.weight", "module.cnet.layer2.0.downsample.0.bias", "module.cnet.layer2.1.conv1.weight", "module.cnet.layer2.1.conv1.bias", "module.cnet.layer2.1.conv2.weight", "module.cnet.layer2.1.conv2.bias", "module.cnet.layer2.1.conv3.weight", "module.cnet.layer2.1.conv3.bias", "module.cnet.layer3.0.conv1.weight", "module.cnet.layer3.0.conv1.bias", "module.cnet.layer3.0.conv2.weight", "module.cnet.layer3.0.conv2.bias", "module.cnet.layer3.0.conv3.weight", "module.cnet.layer3.0.conv3.bias", "module.cnet.layer3.0.downsample.0.weight", "module.cnet.layer3.0.downsample.0.bias", "module.cnet.layer3.1.conv1.weight", "module.cnet.layer3.1.conv1.bias", "module.cnet.layer3.1.conv2.weight", "module.cnet.layer3.1.conv2.bias", "module.cnet.layer3.1.conv3.weight", "module.cnet.layer3.1.conv3.bias", "module.cnet.conv2.weight", "module.cnet.conv2.bias", "module.update_block.encoder.convc1.weight", "module.update_block.encoder.convc1.bias", "module.update_block.encoder.convf1.weight", "module.update_block.encoder.convf1.bias", "module.update_block.encoder.convf2.weight", "module.update_block.encoder.convf2.bias", "module.update_block.encoder.conv.weight", "module.update_block.encoder.conv.bias", "module.update_block.gru.convz.weight", "module.update_block.gru.convz.bias", "module.update_block.gru.convr.weight", "module.update_block.gru.convr.bia