Skip to content

Train error #9

@KingAkrej

Description

@KingAkrej

Hi,

Where there may be a problem, it will generate a maximum of a few epochs and crash.

OS: ubuntu 22.4
python 3.7
Torch 1.7

Traceback (most recent call last):
File "train.py", line 126, in
main()
File "train.py", line 110, in main
train_logs = train_epoch.run(train_loader)
File "/usr/local/lib/python3.7/dist-packages/segmentation_models_pytorch/utils/train.py", line 45, in run
for x, y in iterator:
File "/usr/local/lib/python3.7/dist-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/Plocha/bubble_segmentation/utils.py", line 83, in getitem
image, mask = self.bubble_copy(image, mask, Trans=True)
File "/home/ubuntu/Plocha/bubble_segmentation/utils.py", line 147, in bubble_copy
temp_image = cv2.addWeighted(temp, 1, bubble_image, ratio, 0)
cv2.error: OpenCV(4.6.0) /io/opencv/modules/core/src/arithm.cpp:647: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions