question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The checkpoint contains parameters not used by the model

See original GitHub issue

Trying to train by using TridentNet on custom dataset . The config is the following which i used,

`from projects.TridentNet.tridentnet import add_tridentnet_config

cfg = get_cfg() add_tridentnet_config(cfg) cfg.merge_from_file(project_root+“/projects/TridentNet/configs/tridentnet_fast_R_50_C4_3x.yaml”) cfg.DATASETS.TRAIN = (“train”, ) cfg.OUTPUT_DIR = os.path.join(cfg.OUTPUT_DIR, “model_final.pth”) cfg.DATASETS.TEST = (“val”, ) cfg.DATALOADER.NUM_WORKERS = 2 cfg.MODEL.WEIGHTS = “detectron2://ImageNetPretrained/MSRA/R-50.pkl” cfg.SOLVER.IMS_PER_BATCH = 2 cfg.SOLVER.BASE_LR = 0.001 cfg.SOLVER.MAX_ITER = 200000 cfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 128
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1 cfg.TEST.EVAL_PERIOD = 200 cfg.SOLVER.CHECKPOINT_PERIOD = 600 cfg.SOLVER.MOMENTUM = 0.87

from detectron2.modeling import build_model from detectron2.checkpoint import DetectionCheckpointer

os.makedirs(cfg.OUTPUT_DIR, exist_ok=True) trainer = DefaultTrainer(cfg) trainer.resume_or_load(resume=False) trainer.train()`

Got the following error

tridenNet_error

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
Samjith888commented, Feb 10, 2020

Your issue is answered in https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues already. If you need help, please also include environment information following the issue template.

I have build the detectron with cuda 10.1 by using following command

for CUDA 10.1:

pip install detectron2 -f
https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/index.html

2reactions
ppwwyyxxcommented, Feb 10, 2020

Your issue is answered in https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues already. If you need help, please also include environment information following the issue template.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Saving and Loading Models — PyTorch Tutorials 1.0.0 ...
Note that only layers with learnable parameters (convolutional layers, linear layers, etc.) have entries in the model's state_dict. Optimizer objects ( torch.
Read more >
Models - Hugging Face
A path to a directory containing model weights saved using ... Buffers are tensors that do not require gradients and not registered as...
Read more >
Saving and Loading Models - PyTorch
Saving & Loading a General Checkpoint. Saving Multiple Models in One File. Warmstarting Model Using Parameters from a Different Model.
Read more >
Using the SavedModel format | TensorFlow Core
A SavedModel contains a complete TensorFlow program, including trained parameters (i.e, tf.Variable s) and computation. It does not require the original ...
Read more >
Checkpointing (basic) - PyTorch Lightning - Read the Docs
A Lightning checkpoint contains a dump of the model's entire internal state. ... The hyperparameters used for that model if passed in as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found