Facing issue while running inference on Google Colab

#1
by HiteshGG - opened

❌ Error loading model: Error(s) in loading state_dict for LWDETR:
Unexpected key(s) in state_dict: "backbone.0.projector.stages_sampling.1.0.0.conv.weight", "backbone.0.projector.stages_sampling.1.0.0.bn.weight", "backbone.0.projector.stages_sampling.1.0.0.bn.bias", "backbone.0.projector.stages_sampling.1.1.0.conv.weight", "backbone.0.projector.stages_sampling.1.1.0.bn.weight", "backbone.0.projector.stages_sampling.1.1.0.bn.bias", "backbone.0.projector.stages_sampling.1.2.0.conv.weight", "backbone.0.projector.stages_sampling.1.2.0.bn.weight", "backbone.0.projector.stages_sampling.1.2.0.bn.bias", "backbone.0.projector.stages_sampling.1.3.0.conv.weight", "backbone.0.projector.stages_sampling.1.3.0.bn.weight", "backbone.0.projector.stages_sampling.1.3.0.bn.bias", "backbone.0.projector.stages_sampling.0.0.0.weight", "backbone.0.projector.stages_sampling.0.0.0.bias", "backbone.0.projector.stages_sampling.0.1.0.weight", "backbone.0.projector.stages_sampling.0.1.0.bias", "backbone.0.projector.stages_sampling.0.2.0.weight", "backbone.0.projector.stages_sampling.0.2.0.bias", "backbone.0.projector.stages_sampling.0.3.0.weight", "backbone.0.projector.stages_sampling.0.3.0.bias", "backbone.0.projector.stages.1.0.cv1.conv.weight", "backbone.0.projector.stages.1.0.cv1.bn.weight", "backbone.0.projector.stages.1.0.cv1.bn.bias", "backbone.0.projector.stages.1.0.cv2.conv.weight", "backbone.0.projector.stages.1.0.cv2.bn.weight", "backbone.0.projector.stages.1.0.cv2.bn.bias", "backbone.0.projector.stages.1.0.m.0.cv1.conv.weight", "backbone.0.projector.stages.1.0.m.0.cv1.bn.weight", "backbone.0.projector.stages.1.0.m.0.cv1.bn.bias", "backbone.0.projector.stages.1.0.m.0.cv2.conv.weight", "backbone.0.projector.stages.1.0.m.0.cv2.bn.weight", "backbone.0.projector.stages.1.0.m.0.cv2.bn.bias", "backbone.0.projector.stages.1.0.m.1.cv1.conv.weight", "backbone.0.projector.stages.1.0.m.1.cv1.bn.weight", "backbone.0.projector.stages.1.0.m.1.cv1.bn.bias", "backbone.0.projector.stages.1.0.m.1.cv2.conv.weight", "backbone.0.projector.stages.1.0.m.1.cv2.bn.weight", "backbone.0.projector.stages.1.0.m.1.cv2.bn.bias", "backbone.0.projector.stages.1.0.m.2.cv1.conv.weight", "backbone.0.projector.stages.1.0.m.2.cv1.bn.weight", "backbone.0.projector.stages.1.0.m.2.cv1.bn.bias", "backbone.0.projector.stages.1.0.m.2.cv2.conv.weight", "backbone.0.projector.stages.1.0.m.2.cv2.bn.weight", "backbone.0.projector.stages.1.0.m.2.cv2.bn.bias", "backbone.0.projector.stages.1.1.weight", "backbone.0.projector.stages.1.1.bias".

Not sure it's the same problem,
but after cloning the project from HF,
and trying to run the basic examples (./example.py),

I had an error, on mismatch tensor size,
I fix it by changing in ./inference.py 2 occurrences of
RFDETRBase == by => RFDETRLarge

Sign up or log in to comment