NVIDIA / OpenSeq2Seq

Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP
https://nvidia.github.io/OpenSeq2Seq
Apache License 2.0
1.54k stars 371 forks source link

Relax comparison check in CrossEntropyWithSmoothingEqualsBasicSequenc… #429

Closed bas-aarts closed 5 years ago

bas-aarts commented 5 years ago

…eLossTest

The check is too strong when run with: TF_XLA_FLAGS=--tf_xla_auto_jit=1. Compiling with xla changes the computation, resulting in failure with the following message:

Traceback (most recent call last): File "/opt/tensorflow/nvidia-examples/OpenSeq2Seq/open_seq2seq/losses/sequence_loss_test.py", line 60, in test_compute_loss self.assertEqual(loss1, loss2) AssertionError: 32.645237 != 32.64524

Only comparing the first 4 decimals makes the test succeed again

okuchaiev commented 5 years ago

thanks!