accelerated_features icon indicating copy to clipboard operation
accelerated_features copied to clipboard

acc_f nan

Open Xiaole-An opened this issue 1 year ago • 3 comments

Hello, I am using the description in the README to reproduce your code.

During this process, I encountered some issues. I don't know why the acc_f is showing up as nan. I made some changes to the code and I'm not sure if these changes are related to the acc_f being nan.

I made the following changes:

  1. On line 161 of 'augumentation.py', I changed im = np.rot90(im) to im = cv2.rotate(im, cv2.ROTATE_90_CLOCKWISE) to avoid errors during training.
  2. In utils.py, line 36, I changed data = np.array(h5py.File(f, 'r')['/depth']) to data = np.array(h5py.File(f, 'r')['/depth'], dtype=np.float32) to avoid errors during training.

Besides the changes mentioned, I did not modify anything else, but acc_f still shows nan. Could you explain why this might be happening?

Xiaole-An avatar Aug 08 '24 08:08 Xiaole-An

Hmm, after training for around 1000 iterations, acc_f is no longer nan. Has the author encountered this situation before, and what do you think about this behavior?

Xiaole-An avatar Aug 08 '24 08:08 Xiaole-An

Hello @Xiaole-An, this is expected at the beginning since the accuracy starts at zero due to random guessing. After a few iterations, the network begins to correctly estimate some offsets. The initial NaN values occur because the accuracy calculation results in NaN when there are no correct predictions.

guipotje avatar Aug 11 '24 15:08 guipotje

@guipotje thanks. Thank you for your response. I will continue to study and implement your code. The method you proposed looks quite effective. If I encounter any further issues, I will reach out to you. Thank you for your contribution.

Xiaole-An avatar Aug 12 '24 01:08 Xiaole-An

Thank you! Feel free to open other issue if you encounter another issue.

guipotje avatar Aug 24 '24 17:08 guipotje