Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'float' object has no attribute 'split' #5

Open
xlxxlup opened this issue Oct 13, 2024 · 1 comment
Open

AttributeError: 'float' object has no attribute 'split' #5

xlxxlup opened this issue Oct 13, 2024 · 1 comment

Comments

@xlxxlup
Copy link

xlxxlup commented Oct 13, 2024

yolov5) D:\steel-de\Kaggle-Steel-Defect-Detection-master\Kaggle-Steel-Defect-Detection-master>python train_classify.py --model_name=unet_resnet34 --batch_size=48 --lr=0.0005 --epoch=1
Using model: unet_resnet34
0%| | 0/210 [00:55<?, ?it/s]

Traceback (most recent call last):
File "train_classify.py", line 176, in
train_val.train(train_loader, valid_loader)
File "train_classify.py", line 78, in train
for i, (images, labels) in enumerate(tbar):
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\tqdm\std.py", line 1181, in iter
for obj in iterable:
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data\dataloader.py", line 630, in next
data = self._next_data()
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data
return self._process_data(data)
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data
data.reraise()
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch_utils.py", line 694, in reraise
raise exception
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Anaconda\Anaconda\envs\yolov5\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\steel-de\Kaggle-Steel-Defect-Detection-master\Kaggle-Steel-Defect-Detection-master\datasets\steel_dataset.py", line 68, in getitem
image_id, mask = make_mask(idx, self.df)
File "D:\steel-de\Kaggle-Steel-Defect-Detection-master\Kaggle-Steel-Defect-Detection-master\utils\rle_parse.py", line 26, in make_mask
label = label.split(" ")
AttributeError: 'float' object has no attribute 'split' 请问下这是什么原因

@xlxxlup
Copy link
Author

xlxxlup commented Oct 13, 2024

模型下载完之后 就不动了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant