quaternion_from_rotation_matrix NaN or +Inf errors

Aperta
#462 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia da tensorflow_graphics/geometry/transformation/quaternion.py, in particolare dalla logica sqrt-of-trace intorno alla riga 315 e dalle chiamate a safe_ops.safe_unsigned_div. Riproduci NaN o +Inf con la conversione della matrice di rotazione 6D segnalata e i controlli di debug di TensorFlow Graphics. Il lavoro è completato quando si determina se il problema è dovuto a un’instabilità numerica o a un bug e si documenta o corregge la causa confermata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
2.8k
Fork
374
Merge medio
5g 9h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tensorflow/graphics

Tutte le issue di tensorflow/graphics

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.