Skip to content

Weird errors, this error will appear after running several epochs;  #149

Description

@hitxiaoting

Hi, @vqdang, when I training hover-net on the Kumar dataset for several epoches, it will rush on this error;
If there is a problem with the training data, why other epochs can be trained soothly?
My system information is as follows:

Linux version 3.10.0-1160.24.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org)
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Apr 8 19:51:47 UTC 2021
Python 3.7.4
Cuda compilation tools, release 10.2, V10.2.89
pytorch 1.8.1+cu102

Traceback (most recent call last):
File "run_train.py", line 309, in
trainer.run()
File "run_train.py", line 293, in run
phase_info, engine_opt, save_path, prev_log_dir=prev_save_path
File "run_train.py", line 268, in run_once
main_runner.run(opt["nr_epochs"])
File "/home/tingxiao/code/hover_net/run_utils/engine.py", line 172, in run
for data_batch in self.dataloader:
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 11.
Original Traceback (most recent call last):
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/tingxiao/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/tingxiao/code/hover_net/dataloader/train_loader.py", line 105, in getitem
inst_map, self.mask_shape, **self.target_gen_kwargs
File "/home/tingxiao/code/hover_net/models/hovernet/targets.py", line 102, in gen_targets
hv_map = gen_instance_hv_map(ann, crop_shape)
File "/home/tingxiao/code/hover_net/models/hovernet/targets.py", line 60, in gen_instance_hv_map
inst_com[0] = int(inst_com[0] + 0.5)
ValueError: cannot convert float NaN to integer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions