Closed Shuixin-Li closed 1 year ago
即使添加 --data data/data.yaml
也没有使错误好转
但我发现这是一个Docker的问题,于Docker容器内:
/efficientteacher# df -h
文件系统 容量 已用 可用 已用% 挂载点
overlay 234G 113G 109G 51% /
tmpfs 64M 0 64M 0% /dev
shm 64M 0 64M 0% /dev/shm
/dev/sda2 234G 113G 109G 51% /etc/hosts
tmpfs 7.8G 0 7.8G 0% /proc/asound
tmpfs 7.8G 0 7.8G 0% /proc/acpi
tmpfs 7.8G 0 7.8G 0% /proc/scsi
tmpfs 7.8G 0 7.8G 0% /sys/firmware
可以看到 shm
仅有 64 M
解决办法:当你运行 docker run
命令的时候添加 --shm-size 8G
参数,例如
docker run -dit --shm-size 8G registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.3.0
于新的Docker容器中
# df -h
文件系统 容量 已用 可用 已用% 挂载点
overlay 234G 113G 109G 51% /
tmpfs 64M 0 64M 0% /dev
shm 8.0G 0 8.0G 0% /dev/shm
/dev/sda2 234G 113G 109G 51% /etc/hosts
tmpfs 7.8G 0 7.8G 0% /proc/asound
tmpfs 7.8G 0 7.8G 0% /proc/acpi
tmpfs 7.8G 0 7.8G 0% /proc/scsi
tmpfs 7.8G 0 7.8G 0% /sys/firmware
于新容器中运行
python val.py --cfg configs/sup/custom/custom_1.yaml --weights efficient-yolov5s-exp2-best.pt --data data/data.yaml --batch-size 16
不再出现此错误
您好,我也遇到了这个问题,我是在手册中提供的Docker环境中运行的命令
python val.py --cfg configs/sup/custom/custom_1.yaml --weights efficient-yolov5s-exp2-best.pt
我遇到了这个问题 RuntimeError: DataLoader worker (pid 408) is killed by signal: Bus error. It is possible that dataloader's workers are out of shared memory. Please try to raise your shared memory limit.
Parameters
project: '/runs_yolov5' adam: False epochs: 100 weights: '' prune_finetune: False linear_lr: True hyp: lr0: 0.01 hsv_h: 0.015 hsv_s: 0.7 hsv_v: 0.4 lrf: 0.1 scale: 0.5 no_aug_epochs: 0 mixup: 0.0 warmup_epochs: 3
Model: depth_multiple: 0.33 # model depth multiple width_multiple: 0.50 # layer channel multiple Backbone: name: 'YoloV5' activation: 'SiLU' Neck: name: 'YoloV5' in_channels: [256, 512, 1024] out_channels: [256, 512, 1024] activation: 'SiLU' Head: name: 'YoloV5' activation: 'SiLU' anchors: [[10,13, 16,30, 33,23],[30,61, 62,45, 59,119],[116,90, 156,198, 373,326]] # P5/32] Loss: type: 'ComputeLoss' cls: 0.5 obj: 1.0 anchor_t: 4.0
Dataset: data_name: 'coco' train: data/custom_train.txt val: data/custom_val.txt test: data/custom_test.txt nc: 16 # number of classes np: 0 #number of keypoints names: ['-', 'Amblyospiza', 'Anaplectes', 'Bubalornis', 'Dinemellia', 'Euplectes', 'Foudia', 'Histurgops', 'Malimbus', 'Pachyphantes', 'Philetairus', 'Plocepasser', 'Ploceus', 'Pseudonigrita', 'Quelea', 'Sporopipes'] img_size: 640 batch_size: 16
数据结构如下
下面是问题的全貌:
我注意到
val: data=data/coco128.yaml
是这里的问题吗?该如何修改?