Comments (5)
The number of classes in sbd_snake.yaml
is set to 20 https://github.com/zju3dv/snake/blob/master/configs/sbd_snake.yaml#L20, while the class number is set to 80 in Coco dataset https://github.com/zju3dv/snake/blob/master/lib/datasets/coco/snake.py#L151
from snake.
Got it! Thank you!
from snake.
Maybe there should be a variable num_class
to control this.
from snake.
It is a good advice.
I have updated the code.
from snake.
I constantly get this error in almost every 4-5 epoch training.
Traceback (most recent call last):
File "train_net.py", line 57, in <module>
main()
File "train_net.py", line 53, in main
train(cfg, network)
File "train_net.py", line 35, in train
trainer.val(epoch, val_loader, evaluator, recorder)
File "/ldap_shared/home/s_zyt/inseg/code/snake/lib/train/trainers/trainer.py", line 76, in val
for batch in tqdm.tqdm(data_loader):
File "/ldap_shared/home/s_zyt/.pyenv/versions/anaconda3-2019.07/envs/snake/lib/python3.7/site-packages/tqdm/_tqdm.py", line 979, in __iter__
for obj in iterable:
File "/ldap_shared/home/s_zyt/.pyenv/versions/anaconda3-2019.07/envs/snake/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 346, in __next__
data = self.dataset_fetcher.fetch(index) # may raise StopIteration
File "/ldap_shared/home/s_zyt/.pyenv/versions/anaconda3-2019.07/envs/snake/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/ldap_shared/home/s_zyt/inseg/code/snake/lib/datasets/collate_batch.py", line 7, in snake_collator
ret = {'inp': default_collate([b['inp'] for b in batch])}
File "/ldap_shared/home/s_zyt/.pyenv/versions/anaconda3-2019.07/envs/snake/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 65, in default_collate
return default_collate([torch.as_tensor(b) for b in batch])
File "/ldap_shared/home/s_zyt/.pyenv/versions/anaconda3-2019.07/envs/snake/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 56, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 544 and 480 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:689
Should the validation dataloader worker number be set as 0?
Previously, I got this error in train dataloader, so I set the num_worker=0, it works.
Configuration as follow:
train:
optim: 'adam'
lr: 1e-4
milestones: (80, 120, 150, 170)
gamma: 0.5
batch_size: 16
dataset: 'CocoTrain'
num_workers: 0
epoch: 150
test:
# dataset: 'SbdMini'
dataset: 'CocoVal'
batch_size: 16
num_workers: 0
My operating system is Ubuntu16.04.
Thank you!
from snake.
Related Issues (20)
- Code errors and broken links HOT 1
- Mask map HOT 3
- 更换backbone HOT 4
- 修改loss函数 HOT 1
- 对比实验评估问题 HOT 1
- Cityscapes数据集缺失问题
- Cityscapes数据集缺失问题 HOT 2
- “THC/THC.h”: No such file or directory HOT 5
- dla-34改dla60 HOT 1
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED HOT 2
- SBD数据集貌似失效了,请问可以更新一下链接嘛! HOT 1
- ex_loss 和py_loss的含义 HOT 1
- 使用自己制作COCO数据集报错的问题 HOT 1
- 如何能够在目标检测的框上面显示类别 HOT 2
- dance这篇论文在snake的基础上改进,修改了损失函数 HOT 1
- 作者您好,关于如何显示测试结果的分类别mAP? HOT 1
- 请问作者每一次迭代的效果图在代码中是怎么实现的 HOT 1
- 损失曲线问题
- Costum dataset
- windows10,python3.7,vs2022构建失败:dcn_v2,extreme_utils,roi_align_layer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snake.