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.

train siamrpn_alex failed

See original GitHub issue

When I train siamrpn_alex in experiments using "python -m torch.distributed.launch --nproc_per_node=4 --master_port=2341 …/…/tools/train.py --cfg config.yaml ", it give me this error.

It seems like network structure error?

result = self.forward(*input, **kwargs)
  File "/root/ly18/pysot/pysot/utils/distributed.py", line 43, in forward
    return self.module(*args, **kwargs)
  File "/opt/conda/envs/pysot/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/root/ly18/pysot/pysot/models/model_builder.py", line 105, in forward
    loc_loss = weight_l1_loss(loc, label_loc, label_loc_weight)
  File "/root/ly18/pysot/pysot/models/loss.py", line 45, in weight_l1_loss
    diff = (pred_loc - label_loc).abs()
RuntimeError: The size of tensor a (17) must match the size of tensor b (25) at non-singleton dimension 4

I have trained siamrpn_mobilev2 already.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lb1100commented, Jul 3, 2019

siamrpn_alex_dwxcorr is only for inference, there is no training parameters in the config. If you want to fine-tune alexnet, you can use siamrpn_alex_dwxcorr_16gpu as config, and load the pretrained network.

0reactions
yustaubcommented, Apr 10, 2020

@MaxLin86 @StrangerZhang @lb1100 if I want to fine-tune from the pretrained models on my dataset, change the BACKBONE:PRETRAINED:‘pretrained_models/alexnet-bn.pth’ with the provides model in the model zoo?thanks for your reply!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem about ytbb dataset(BaiduNetDisk) and trainnig ...
To my understanding this error is caused by the code below that opencv ... How can fix the problem to train SiamRPN-alex correctly...
Read more >
Evolution of Siamese Visual Tracking with Very Deep Networks
We successfully train a SiamRPN [24] based tracker using the ResNet as a backbone ... With the proposal of modern deep architecture AlexNet...
Read more >
02. Train SiamRPN on COCO、VID、DET、Youtube_bb
SiamRPN is a widely adopted Single Object Tracking method. Send the template frame and detection frame to the siamese network, and get the...
Read more >
Understanding Siamese Networks for Visual Object Tracking
several causes of failures. ... based trackers perform the training and tracking in an on- ... SiamRPN++ [23] goes beyond this by developing...
Read more >
arXiv:1912.02048v2 [cs.CV] 5 Apr 2021
KL-divergence based loss is first intro- duced to train the regression network of the PrDiMP. On the other hand, a series of Siamese...
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