You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ShangHaiTech Part A to train model, but only a few iteration it get the nan excpetion.
Traceback (most recent call last):
File "Counting-with-Focus-for-Free/code/main.py", line 50, in <module>
tf.app.run()
File "Softwares/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "Counting-with-Focus-for-Free/code/main.py", line 44, in main
model.train()
File "Counting-with-Focus-for-Free/code/model.py", line 310, in train
self.inputI_size, self.batch_size)
File "Counting-with-Focus-for-Free/code/utils.py", line 120, in get_batch_patches
batch_num[k] = dmap_temp.sum()/L
ValueError: cannot convert float NaN to integer
Hi, for my experience, some of your density map ground truth are generated incorrectly, their values are Nan, please note some annotations of shanghai partA are not correct, such as the coordinates of some annotated points are labeled with a negative value or bigger than the size of image. So you need make sure your data is good before you use this code.
I am using
ShangHaiTech Part A
to train model, but only a few iteration it get thenan
excpetion.In this code
the
rand_dmap
containsNan
. I have tried to modify the learning rate, but it have no effect.The text was updated successfully, but these errors were encountered: