Coder Social home page Coder Social logo

size mismatch for stem.conv.weight: copying a param of torch.Size([64, 3, 7, 7]) from checkpoint, where the shape is torch.Size([16, 3, 3, 3]) in current model. size mismatch for stem.bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([16]) in current model. about pycls HOT 3 CLOSED

facebookresearch avatar facebookresearch commented on September 4, 2024
size mismatch for stem.conv.weight: copying a param of torch.Size([64, 3, 7, 7]) from checkpoint, where the shape is torch.Size([16, 3, 3, 3]) in current model. size mismatch for stem.bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([16]) in current model.

from pycls.

Comments (3)

rajprateek avatar rajprateek commented on September 4, 2024

Hi chenbolinstudent, thanks for reporting this.
Can you please provide the command you used to launch pycls when you ran into this error? It will help us reproduce it and double check what the issue is.

from pycls.

 avatar commented on September 4, 2024

I train with my dataset
use python tools/train_net.py
--cfg configs/archive/imagenet/resnet/R-50-1x64d_step_1gpu.yaml
OUT_DIR /tmp

train
a
1.png
2.png
b
3.png
4.png
c
5.png
6.png

val
a
1.png
2.png
b
3.png
4.png
c
5.png
6.png

the train picture is 2242243
the test picture is 2242243

MODEL:
TYPE: resnet
DEPTH: 50
NUM_CLASSES: 10
RESNET:
TRANS_FUN: bottleneck_transform
NUM_GROUPS: 1
WIDTH_PER_GROUP: 64
STRIDE_1X1: True
BN:
ZERO_INIT_FINAL_GAMMA: False
OPTIM:
BASE_LR: 0.0125
LR_POLICY: cos
STEPS: [0, 30, 60, 90]
LR_MULT: 0.1
MAX_EPOCH: 100
MOMENTUM: 0.9
NESTEROV: True
WEIGHT_DECAY: 0.0001
TRAIN:
DATASET: imagenet
SPLIT: train
BATCH_SIZE: 32
IM_SIZE: 224
EVAL_PERIOD: 1
TEST:
DATASET: imagenet
SPLIT: val
BATCH_SIZE: 25
IM_SIZE: 256
NUM_GPUS: 1
DATA_LOADER:
NUM_WORKERS: 4
CUDNN:
BENCHMARK: True
OUT_DIR: .

from pycls.

ir413 avatar ir413 commented on September 4, 2024

Hi @chenbolinstudent, there is likely a mismatch between the model you constructed and the model you are trying to load from checkpoint which results in an error. Please double-check that the constructed and the checkpoint models match.

from pycls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.