quaternion_from_rotation_matrix NaN or +Inf errors

Đang mở
#462 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python

Hướng nghiên cứu

Bắt đầu với tensorflow_graphics/geometry/transformation/quaternion.py, đặc biệt là logic sqrt-of-trace quanh dòng 315 và các lệnh gọi safe_ops.safe_unsigned_div. Tái hiện NaN hoặc +Inf bằng phép chuyển đổi ma trận xoay 6D đã được báo cáo và các kiểm tra gỡ lỗi của TensorFlow Graphics. Được xem là hoàn tất khi xác định được lỗi là do mất ổn định số hay do một bug, đồng thời ghi lại hoặc sửa nguyên nhân đã được xác nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I am trying to convert a 6D continuous representation of a rotation matrix into an axis-angle representation in a network. During backprop, I can occasionally encounter NaNs / +Inf. I was able to determine the source is quaternion_from_rotation_matrix by using a combination of tf.debugging.enable_check_numerics()and the tensorflow_graphics debugging mode.

Sometimes the tfg debugger catches an improperly normalized rotation matrix (i.e., assert_rotation_matrix_normalized), but other times it does not and quaternion_from_rotation_matrix errors in one of the safe_ops.safe_unsigned_div ops or when computing the sqrt of the trace where the trace < -1 by a very small delta.

In converting the continuous representation to a rotation matrix, I'm using an implementation very similar to this one.

Do you have any idea if this is a bug or if I might be encountering some kind of numerical instability? I am working on a repro but having some trouble freezing the model state when the error occurs to extract the bad rotation matrix.

Ngôn ngữ chính
Python
Star
2.8k
Fork
374
Merge trung bình
5 ngày 9 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tensorflow/graphics

Tất cả issue của tensorflow/graphics

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.