returnn 1.20240723.171654__tar.gz → 1.20240725.5736__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of returnn might be problematic. Click here for more details.

Files changed (455) hide show
  1. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/PKG-INFO +1 -1
  2. returnn-1.20240725.5736/_setup_info_generated.py +2 -0
  3. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/__main__.py +3 -3
  4. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/audio.py +3 -1
  5. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/basic.py +7 -8
  6. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/generating.py +3 -3
  7. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/hdf.py +1 -7
  8. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/lm.py +111 -40
  9. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/map.py +1 -1
  10. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/meta.py +4 -4
  11. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/multi_proc.py +1 -1
  12. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/numpy_dump.py +0 -6
  13. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/sprint.py +1 -1
  14. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/decoder/transformer.py +18 -9
  15. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/engine.py +27 -4
  16. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn.egg-info/PKG-INFO +1 -1
  17. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Dataset.py +3 -3
  18. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-dataset.py +1 -1
  19. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/hdf_dump.py +1 -1
  20. returnn-1.20240723.171654/_setup_info_generated.py +0 -2
  21. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/.editorconfig +0 -0
  22. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/.gitignore +0 -0
  23. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/.gitmodules +0 -0
  24. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/.kateconfig +0 -0
  25. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/CHANGELOG.md +0 -0
  26. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/CODEOWNERS +0 -0
  27. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/CONTRIBUTING.md +0 -0
  28. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/LICENSE +0 -0
  29. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/MANIFEST.in +0 -0
  30. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/README.rst +0 -0
  31. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/__init__.py +0 -0
  32. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/12AX.cluster_map +0 -0
  33. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/_setup_returnn_env.py +0 -0
  34. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-fwd.config +0 -0
  35. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-horovod-mpi.py +0 -0
  36. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-horovod-mpi.py.sh +0 -0
  37. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-horovod-mpi.sh +0 -0
  38. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-hyper-param-tuning.config +0 -0
  39. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-iter-dataset.py +0 -0
  40. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-list-devices.py +0 -0
  41. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-lua-torch-layer.config +0 -0
  42. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-pretrain.config +0 -0
  43. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-record-and-push-to-webserver.py +0 -0
  44. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-returnn-as-framework.py +0 -0
  45. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-rf-pt-benchmark.py +0 -0
  46. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-rf.config +0 -0
  47. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-rhn-enwik8.config +0 -0
  48. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-sprint-interface.py +0 -0
  49. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-att-copy.config +0 -0
  50. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-attention.config +0 -0
  51. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
  52. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
  53. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-enc-dec.config +0 -0
  54. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-hard-att-copy.config +0 -0
  55. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-lstm-benchmark.py +0 -0
  56. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
  57. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
  58. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-native-lstm.12ax.config +0 -0
  59. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-native-lstm2.12ax.config +0 -0
  60. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
  61. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-neural-transducer.12ax.config +0 -0
  62. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-rec-explicit-lstm.config +0 -0
  63. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-rec-explicit-rnn.config +0 -0
  64. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-rec-self-att.config +0 -0
  65. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-search-compiled-graph.py +0 -0
  66. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
  67. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-timit-lstm-ctc.config +0 -0
  68. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-torch.config +0 -0
  69. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
  70. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/demo.sh +0 -0
  71. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
  72. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
  73. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
  74. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/README.txt +0 -0
  75. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/chars.txt +0 -0
  76. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/config_demo +0 -0
  77. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/config_fwd +0 -0
  78. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/config_real +0 -0
  79. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
  80. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/decode.py +0 -0
  81. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
  82. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/go.sh +0 -0
  83. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/lines.txt +0 -0
  84. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/split/eval.txt +0 -0
  85. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/split/train.txt +0 -0
  86. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/IAM/split/valid.txt +0 -0
  87. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/README.md +0 -0
  88. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial/create_test_h5.py +0 -0
  89. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial/forwardconfig +0 -0
  90. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial/go.sh +0 -0
  91. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial/trainconfig +0 -0
  92. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
  93. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
  94. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial_rgb/go.sh +0 -0
  95. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
  96. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/pyproject.toml +0 -0
  97. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/requirements.txt +0 -0
  98. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/__init__.py +0 -0
  99. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/__old_mod_loader__.py +0 -0
  100. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/__setup__.py +0 -0
  101. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/config.py +0 -0
  102. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/__init__.py +0 -0
  103. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/bundle_file.py +0 -0
  104. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/cached.py +0 -0
  105. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/cached2.py +0 -0
  106. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/distrib_files.py +0 -0
  107. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/normalization_data.py +0 -0
  108. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/raw_wav.py +0 -0
  109. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/stereo.py +0 -0
  110. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/util/__init__.py +0 -0
  111. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/util/feature_extraction.py +0 -0
  112. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/util/strings.py +0 -0
  113. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/datasets/util/vocabulary.py +0 -0
  114. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/engine/__init__.py +0 -0
  115. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/engine/base.py +0 -0
  116. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/engine/batch.py +0 -0
  117. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/__init__.py +0 -0
  118. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/__main__.py +0 -0
  119. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/.git +0 -0
  120. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
  121. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
  122. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
  123. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
  124. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
  125. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
  126. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
  127. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
  128. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
  129. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
  130. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
  131. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
  132. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
  133. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
  134. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
  135. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
  136. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
  137. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
  138. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
  139. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
  140. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
  141. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
  142. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
  143. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
  144. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/__init__.py +0 -0
  145. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/README.md +0 -0
  146. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/__init__.py +0 -0
  147. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/edit.py +0 -0
  148. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/reroute.py +0 -0
  149. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/select.py +0 -0
  150. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/subgraph.py +0 -0
  151. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/transform.py +0 -0
  152. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/extern/graph_editor/util.py +0 -0
  153. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/forward_iface.py +0 -0
  154. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/__init__.py +0 -0
  155. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_backend.py +0 -0
  156. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/__init__.py +0 -0
  157. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/backend.cpp +0 -0
  158. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/backend.hpp +0 -0
  159. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/module.cpp +0 -0
  160. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/module.hpp +0 -0
  161. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/py_utils.hpp +0 -0
  162. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/tensor_ops.cpp +0 -0
  163. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_native/tensor_ops.hpp +0 -0
  164. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_numpy_backend.py +0 -0
  165. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_random_journal.py +0 -0
  166. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/_utils.py +0 -0
  167. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/array_.py +0 -0
  168. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/attention.py +0 -0
  169. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/audio/__init__.py +0 -0
  170. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/audio/mel.py +0 -0
  171. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/audio/specaugment.py +0 -0
  172. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/backend.py +0 -0
  173. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/build_from_dict.py +0 -0
  174. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/cond.py +0 -0
  175. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/const.py +0 -0
  176. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/container.py +0 -0
  177. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/control_flow_ctx.py +0 -0
  178. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/conv.py +0 -0
  179. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/decoder/__init__.py +0 -0
  180. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/device.py +0 -0
  181. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/dims.py +0 -0
  182. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/dropout.py +0 -0
  183. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/dtype.py +0 -0
  184. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/encoder/__init__.py +0 -0
  185. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/encoder/base.py +0 -0
  186. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/encoder/conformer.py +0 -0
  187. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/gradient.py +0 -0
  188. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/graph.py +0 -0
  189. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/hooks.py +0 -0
  190. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/init.py +0 -0
  191. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/label_smoothing.py +0 -0
  192. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/linear.py +0 -0
  193. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/loop.py +0 -0
  194. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/loss.py +0 -0
  195. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/math_.py +0 -0
  196. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/matmul.py +0 -0
  197. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/module.py +0 -0
  198. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/normalization.py +0 -0
  199. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/parameter.py +0 -0
  200. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/parametrizations.py +0 -0
  201. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/parametrize.py +0 -0
  202. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/piecewise_linear.py +0 -0
  203. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/rand.py +0 -0
  204. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/rec.py +0 -0
  205. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/reduce.py +0 -0
  206. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/run_ctx.py +0 -0
  207. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/signal.py +0 -0
  208. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/state.py +0 -0
  209. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/stepwise_scheduler.py +0 -0
  210. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/tensor_array.py +0 -0
  211. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/frontend/types.py +0 -0
  212. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/import_/__init__.py +0 -0
  213. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/import_/common.py +0 -0
  214. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/import_/git.py +0 -0
  215. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/import_/import_.py +0 -0
  216. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/learning_rate_control.py +0 -0
  217. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/log.py +0 -0
  218. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/native_op.cpp +0 -0
  219. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/native_op.py +0 -0
  220. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/pretrain.py +0 -0
  221. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/__init__.py +0 -0
  222. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/cache.py +0 -0
  223. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/control.py +0 -0
  224. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/error_signals.py +0 -0
  225. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/extern_interface.py +0 -0
  226. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/sprint/interface.py +0 -0
  227. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/README.md +0 -0
  228. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/__init__.py +0 -0
  229. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/_dim_extra.py +0 -0
  230. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/_tensor_extra.py +0 -0
  231. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/_tensor_mixin_base.py +0 -0
  232. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/_tensor_op_overloads.py +0 -0
  233. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/control_flow_ctx.py +0 -0
  234. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/dim.py +0 -0
  235. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/marked_dim.py +0 -0
  236. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/tensor.py +0 -0
  237. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/tensor_dict.py +0 -0
  238. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tensor/utils.py +0 -0
  239. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/__init__.py +0 -0
  240. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/compat.py +0 -0
  241. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/data_pipeline.py +0 -0
  242. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/distributed.py +0 -0
  243. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/engine.py +0 -0
  244. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/README.md +0 -0
  245. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/__init__.py +0 -0
  246. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/_backend.py +0 -0
  247. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/_utils.py +0 -0
  248. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/cond.py +0 -0
  249. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
  250. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -0
  251. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/dims.py +0 -0
  252. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/layer.py +0 -0
  253. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/loop.py +0 -0
  254. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/make_layer.py +0 -0
  255. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/masked_computation.py +0 -0
  256. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
  257. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
  258. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_low_level/__init__.py +0 -0
  259. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/frontend_low_level/_backend.py +0 -0
  260. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/horovod.py +0 -0
  261. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/hyper_param_tuning.py +0 -0
  262. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/__init__.py +0 -0
  263. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/base.py +0 -0
  264. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/basic.py +0 -0
  265. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/rec.py +0 -0
  266. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/segmental_model.py +0 -0
  267. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/signal_processing.py +0 -0
  268. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/layers/variable.py +0 -0
  269. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/native_op.py +0 -0
  270. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/network.py +0 -0
  271. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/sprint.py +0 -0
  272. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/updater.py +0 -0
  273. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/__init__.py +0 -0
  274. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/basic.py +0 -0
  275. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/data.py +0 -0
  276. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/gradient_checkpoint.py +0 -0
  277. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/ken_lm.py +0 -0
  278. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/tf/util/open_fst.py +0 -0
  279. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/README.md +0 -0
  280. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/__init__.py +0 -0
  281. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/__init__.py +0 -0
  282. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/extern_data.py +0 -0
  283. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/pipeline.py +0 -0
  284. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/queued_data_iter.py +0 -0
  285. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/returnn_dataset_wrapper.py +0 -0
  286. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/data/tensor_utils.py +0 -0
  287. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/distributed.py +0 -0
  288. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/frontend/__init__.py +0 -0
  289. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/frontend/_backend.py +0 -0
  290. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/frontend/_rand.py +0 -0
  291. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/frontend/bridge.py +0 -0
  292. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/frontend/raw_ops.py +0 -0
  293. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/updater.py +0 -0
  294. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/README.md +0 -0
  295. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/__init__.py +0 -0
  296. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/array_.py +0 -0
  297. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/diagnose_gpu.py +0 -0
  298. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/gradient_checkpoint.py +0 -0
  299. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/torch/util/scaled_gradient.py +0 -0
  300. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/__init__.py +0 -0
  301. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/basic.py +0 -0
  302. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/better_exchook.py +0 -0
  303. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/bpe.py +0 -0
  304. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/debug.py +0 -0
  305. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/debug_helpers.py +0 -0
  306. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/file_cache.py +0 -0
  307. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/fsa.py +0 -0
  308. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/literal_py_to_pickle.py +0 -0
  309. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/math.py +0 -0
  310. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/multi_proc_non_daemonic_spawn.py +0 -0
  311. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/native_code_compiler.py +0 -0
  312. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/pprint.py +0 -0
  313. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/py-to-pickle.cpp +0 -0
  314. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/py_compat.py +0 -0
  315. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/py_ext_mod_compiler.py +0 -0
  316. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/result_with_reason.py +0 -0
  317. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/sig_proc.py +0 -0
  318. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/task_system.py +0 -0
  319. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/train_proc_manager.py +0 -0
  320. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn/util/watch_memory.py +0 -0
  321. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn.egg-info/SOURCES.txt +0 -0
  322. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn.egg-info/dependency_links.txt +0 -0
  323. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/returnn.egg-info/top_level.txt +0 -0
  324. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/rnn.py +0 -0
  325. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/setup.cfg +0 -0
  326. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/setup.py +0 -0
  327. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/DummySprintExec.py +0 -0
  328. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm-inspection-profile.xml +0 -0
  329. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/.gitignore +0 -0
  330. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/.name +0 -0
  331. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
  332. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
  333. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
  334. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
  335. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
  336. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/misc.xml +0 -0
  337. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/modules.xml +0 -0
  338. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/returnn.iml +0 -0
  339. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
  340. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/_set_num_threads1.py +0 -0
  341. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/_setup_returnn_env.py +0 -0
  342. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/_setup_test_env.py +0 -0
  343. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/bpe-unicode-demo.codes +0 -0
  344. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/bpe-unicode-demo.vocab +0 -0
  345. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/lexicon_opt.fst +0 -0
  346. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/lexicon_opt.isyms +0 -0
  347. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/lexicon_opt.jpg +0 -0
  348. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/lexicon_opt.osyms +0 -0
  349. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/lint_common.py +0 -0
  350. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/pycharm-inspect.py +0 -0
  351. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/pylint.py +0 -0
  352. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/returnn-as-framework.py +0 -0
  353. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/rf_utils.py +0 -0
  354. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/spelling.dic +0 -0
  355. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Config.py +0 -0
  356. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Fsa.py +0 -0
  357. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_GeneratingDataset.py +0 -0
  358. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_HDFDataset.py +0 -0
  359. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_LearningRateControl.py +0 -0
  360. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Log.py +0 -0
  361. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_MultiProcDataset.py +0 -0
  362. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Pretrain.py +0 -0
  363. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_ResNet.py +0 -0
  364. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_SprintDataset.py +0 -0
  365. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_SprintInterface.py +0 -0
  366. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFEngine.py +0 -0
  367. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFNativeOp.py +0 -0
  368. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFNetworkLayer.py +0 -0
  369. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFNetworkRecLayer.py +0 -0
  370. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFNetworkSigProcLayer.py +0 -0
  371. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFUpdater.py +0 -0
  372. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TFUtil.py +0 -0
  373. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TF_determinism.py +0 -0
  374. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TaskSystem.py +0 -0
  375. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TaskSystem_SharedMem.py +0 -0
  376. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_TranslationDataset.py +0 -0
  377. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_Util.py +0 -0
  378. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_demos.py +0 -0
  379. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_fork_exec.py +0 -0
  380. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_hdf_dump.py +0 -0
  381. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_array.py +0 -0
  382. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_attention.py +0 -0
  383. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_base.py +0 -0
  384. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_cond.py +0 -0
  385. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_const.py +0 -0
  386. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_container.py +0 -0
  387. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_conv.py +0 -0
  388. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_encoder_conformer.py +0 -0
  389. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_gradient.py +0 -0
  390. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_label_smoothing.py +0 -0
  391. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_loop.py +0 -0
  392. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_math.py +0 -0
  393. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_normalization.py +0 -0
  394. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_piecewise_linear.py +0 -0
  395. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_rec.py +0 -0
  396. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_reduce.py +0 -0
  397. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_rf_signal.py +0 -0
  398. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_tensor.py +0 -0
  399. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_tools.py +0 -0
  400. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_torch_dataset.py +0 -0
  401. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_torch_engine.py +0 -0
  402. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_torch_frontend.py +0 -0
  403. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_torch_internal_frontend.py +0 -0
  404. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/test_torch_util.py +0 -0
  405. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tests/torch_utils.py +0 -0
  406. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/_setup_returnn_env.py +0 -0
  407. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/analyze-dataset-batches.py +0 -0
  408. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/bliss-collect-seq-lens.py +0 -0
  409. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/bliss-dump-text.py +0 -0
  410. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/bliss-get-segment-names.py +0 -0
  411. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/bliss-to-ogg-zip.py +0 -0
  412. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/bpe-create-lexicon.py +0 -0
  413. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/calculate-word-error-rate.py +0 -0
  414. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/cleanup-old-models.py +0 -0
  415. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/collect-orth-symbols.py +0 -0
  416. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/collect-words.py +0 -0
  417. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/compile_native_op.py +0 -0
  418. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/compile_tf_graph.py +0 -0
  419. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/debug-dump-search-scores.py +0 -0
  420. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/debug-plot-search-scores.py +0 -0
  421. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-dataset-raw-strings.py +0 -0
  422. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-forward-stats.py +0 -0
  423. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-forward.py +0 -0
  424. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-network-json.py +0 -0
  425. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/dump-pickle.py +0 -0
  426. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/extract_state_tying_from_dataset.py +0 -0
  427. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/get-attention-weights.py +0 -0
  428. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/get-best-model-epoch.py +0 -0
  429. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/hdf_dump_translation_dataset.py +0 -0
  430. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/import-blocks-mt-model.py +0 -0
  431. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/import-t2t-mt-model.py +0 -0
  432. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/.gitignore +0 -0
  433. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/Makefile +0 -0
  434. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/README.md +0 -0
  435. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/README.md +0 -0
  436. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/libs_list +0 -0
  437. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
  438. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
  439. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
  440. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/state_vars_list +0 -0
  441. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/example/tensor_names_list +0 -0
  442. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/file.h +0 -0
  443. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
  444. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
  445. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/main.cc +0 -0
  446. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/rescorer.h +0 -0
  447. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/vocabulary.cc +0 -0
  448. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/lattice_rescorer/vocabulary.h +0 -0
  449. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/tf_avg_checkpoints.py +0 -0
  450. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/tf_inspect_checkpoint.py +0 -0
  451. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/tf_inspect_summary_log.py +0 -0
  452. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/torch_avg_checkpoints.py +0 -0
  453. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/torch_export_to_onnx.py +0 -0
  454. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/torch_inspect_checkpoint.py +0 -0
  455. {returnn-1.20240723.171654 → returnn-1.20240725.5736}/tools/torch_inspect_checkpoint_and_opt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20240723.171654
3
+ Version: 1.20240725.5736
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -0,0 +1,2 @@
1
+ version = '1.20240725.005736'
2
+ long_version = '1.20240725.005736+git.d5855be'
@@ -270,13 +270,13 @@ def print_task_properties():
270
270
  print("Train data:", file=log.v2)
271
271
  print(" input:", train_data.num_inputs, "x", train_data.window, file=log.v2)
272
272
  print(" output:", train_data.num_outputs, file=log.v2)
273
- print(" ", train_data.len_info() or "no info", file=log.v2)
273
+ print(" ", train_data.len_info(fast=True) or "no info", file=log.v2)
274
274
  if dev_data:
275
275
  print("Dev data:", file=log.v2)
276
- print(" ", dev_data.len_info() or "no info", file=log.v2)
276
+ print(" ", dev_data.len_info(fast=True) or "no info", file=log.v2)
277
277
  if eval_data:
278
278
  print("Eval data:", file=log.v2)
279
- print(" ", eval_data.len_info() or "no info", file=log.v2)
279
+ print(" ", eval_data.len_info(fast=True) or "no info", file=log.v2)
280
280
 
281
281
 
282
282
  def init_engine():
@@ -393,10 +393,12 @@ class OggZipDataset(CachedDataset2):
393
393
  self._lazy_init()
394
394
  return [self._get_tag_from_info_dict(seq) for seq in self._data]
395
395
 
396
- def get_total_num_seqs(self):
396
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
397
397
  """
398
398
  :rtype: int
399
399
  """
400
+ if fast and self._data is None:
401
+ raise Exception(f"{self} not initialized")
400
402
  self._lazy_init()
401
403
  return len(self._data)
402
404
 
@@ -812,11 +812,12 @@ class Dataset(object):
812
812
  """
813
813
  raise OptionalNotImplementedError(f"{self} get_all_tags not implemented")
814
814
 
815
- def get_total_num_seqs(self) -> int:
815
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
816
816
  """
817
+ :param fast: if True, might raise an exception if not possible to get fast.
817
818
  :return: total number of seqs, without partition epoch.
818
- Should be the same as len(self.get_all_tags()).
819
- Note that this is not possible with all datasets.
819
+ Should be the same as len(self.get_all_tags()).
820
+ Note that this is not possible with all datasets.
820
821
  """
821
822
  raise OptionalNotImplementedError(f"{self} get_total_num_seqs not implemented")
822
823
 
@@ -994,16 +995,14 @@ class Dataset(object):
994
995
  return self.is_less_than_num_seqs(0)
995
996
  raise NotImplementedError(f"{self} have_seqs() is not implemented (and neither get_total_num_seqs())")
996
997
 
997
- def len_info(self):
998
+ def len_info(self, *, fast: bool = False) -> str:
998
999
  """
999
- :rtype: str
1000
- :returns a string to present the user as information about our len.
1001
- Depending on our implementation, we can give some more or some less information.
1000
+ :return: string to present the user as information about our len.
1002
1001
  """
1003
1002
  return ", ".join(
1004
1003
  [
1005
1004
  self.__class__.__name__,
1006
- "sequences: %s" % try_run(self.get_total_num_seqs, default="unknown"),
1005
+ "sequences: %s" % try_run(self.get_total_num_seqs, kwargs=dict(fast=fast), default="unknown"),
1007
1006
  "frames: %s" % try_run(self.get_num_timesteps, default="unknown"),
1008
1007
  ]
1009
1008
  )
@@ -199,7 +199,7 @@ class GeneratingDataset(Dataset):
199
199
  """
200
200
  return self._num_seqs
201
201
 
202
- def get_total_num_seqs(self) -> int:
202
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
203
203
  """
204
204
  :return: total num seqs
205
205
  """
@@ -1189,7 +1189,7 @@ class StaticDataset(CachedDataset2):
1189
1189
  """
1190
1190
  return self.data[0][key].dtype
1191
1191
 
1192
- def get_total_num_seqs(self):
1192
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
1193
1193
  """
1194
1194
  :rtype: int
1195
1195
  """
@@ -2335,7 +2335,7 @@ class LibriSpeechCorpus(CachedDataset2):
2335
2335
  """
2336
2336
  return [self._get_tag(i) for i in range(len(self._reference_seq_order))]
2337
2337
 
2338
- def get_total_num_seqs(self):
2338
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
2339
2339
  """
2340
2340
  :rtype: int
2341
2341
  """
@@ -428,7 +428,7 @@ class HDFDataset(CachedDataset):
428
428
  tags += h5_file["seqTags"][...].tolist()
429
429
  return list(map(self._decode, tags))
430
430
 
431
- def get_total_num_seqs(self):
431
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
432
432
  """
433
433
  :rtype: int
434
434
  """
@@ -451,12 +451,6 @@ class HDFDataset(CachedDataset):
451
451
  """
452
452
  return self.data_dtype[key]
453
453
 
454
- def len_info(self):
455
- """
456
- :rtype: str
457
- """
458
- return ", ".join(["HDF dataset", "sequences: %i" % self.num_seqs, "frames: %i" % self.get_num_timesteps()])
459
-
460
454
  def _get_file_index(self, real_seq_idx):
461
455
  # bisect() returns the position for which all elements to the left of the returned index are <= real_seq_idx,
462
456
  # so it actually returns the next file index in which the sequence can be found.
@@ -7,6 +7,7 @@ and some related helpers.
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
+ from typing import Optional, Union, Callable, List, Tuple
10
11
  import typing
11
12
  import os
12
13
  import sys
@@ -17,7 +18,15 @@ import xml.etree.ElementTree as ElementTree
17
18
  import numpy
18
19
  from random import Random
19
20
 
20
- from returnn.util.basic import parse_orthography, parse_orthography_into_symbols, load_json, unicode, cf
21
+ from returnn.util.basic import (
22
+ parse_orthography,
23
+ parse_orthography_into_symbols,
24
+ load_json,
25
+ unicode,
26
+ cf,
27
+ human_bytes_size,
28
+ hms,
29
+ )
21
30
  from returnn.util.literal_py_to_pickle import literal_eval
22
31
  from returnn.log import log
23
32
 
@@ -262,7 +271,9 @@ class LmDataset(CachedDataset2):
262
271
  self.num_outputs["delayed"] = self.num_outputs["data"]
263
272
  self.labels["delayed"] = self.labels["data"]
264
273
 
265
- self.orths = None # will be loaded in _lazy_init
274
+ self._orth_tmp_file = None
275
+ self._orth_mmap = None
276
+ self._orths_offsets_and_lens: Optional[List[Tuple[int, int]]] = None # will be loaded in _lazy_init
266
277
 
267
278
  self.next_orth_idx = 0
268
279
  self.next_seq_idx = 0
@@ -270,27 +281,64 @@ class LmDataset(CachedDataset2):
270
281
  self.num_unknown = 0
271
282
 
272
283
  def _lazy_init(self):
273
- if self.orths is not None:
284
+ if self._orths_offsets_and_lens is not None:
274
285
  return
275
286
 
276
287
  corpus_file = self._corpus_file
277
288
  if callable(corpus_file):
278
289
  corpus_file = corpus_file()
290
+
279
291
  print("LmDataset, loading file", corpus_file, file=log.v4)
292
+
293
+ import tempfile
294
+ import mmap
295
+
296
+ tmp_file = tempfile.NamedTemporaryFile(prefix="returnn_lm_dataset_", suffix="_tmp.txt")
297
+ orths = []
298
+ offset = 0
299
+ self._orth_tmp_file = tmp_file
300
+ self._orths_offsets_and_lens = orths
301
+ start_time = time.time()
302
+ last_print_time = start_time
303
+
304
+ def _add_line(line: bytes):
305
+ nonlocal offset, last_print_time
306
+
307
+ orths.append((offset, len(line)))
308
+ tmp_file.write(line)
309
+ tmp_file.write(b"\n")
310
+ offset += len(line) + 1
311
+
312
+ if time.time() - last_print_time > 10:
313
+ print(
314
+ f" ..., loaded {len(self._orths_offsets_and_lens)} sequences,"
315
+ f" {human_bytes_size(offset)},"
316
+ f" after {hms(time.time() - start_time)}",
317
+ file=log.v4,
318
+ )
319
+ last_print_time = time.time()
320
+
280
321
  if isinstance(corpus_file, list): # If a list of files is provided, concatenate all.
281
- self.orths = []
282
322
  for file_name in corpus_file:
283
323
  if self._use_cache_manager:
284
324
  file_name = cf(file_name)
285
- self.orths += read_corpus(file_name, skip_empty_lines=self._skip_empty_lines)
325
+ iter_corpus(file_name, skip_empty_lines=self._skip_empty_lines, decode=False, callback=_add_line)
286
326
  else:
287
327
  if self._use_cache_manager:
288
328
  corpus_file = cf(corpus_file)
289
- self.orths = read_corpus(corpus_file, skip_empty_lines=self._skip_empty_lines)
290
- print(" done, loaded %i sequences" % len(self.orths), file=log.v4)
329
+ iter_corpus(corpus_file, skip_empty_lines=self._skip_empty_lines, decode=False, callback=_add_line)
330
+
331
+ tmp_file.flush()
332
+ self._orth_mmap = mmap.mmap(tmp_file.fileno(), 0, flags=mmap.MAP_PRIVATE)
333
+ print(
334
+ f" done, loaded {len(self._orths_offsets_and_lens)} sequences,"
335
+ f" {human_bytes_size(offset)},"
336
+ f" in {hms(time.time() - start_time)}",
337
+ file=log.v4,
338
+ )
291
339
 
292
340
  # It's only estimated because we might filter some out or so.
293
- self._estimated_num_seqs = len(self.orths) // self.partition_epoch
341
+ self._estimated_num_seqs = len(self._orths_offsets_and_lens) // self.partition_epoch
294
342
 
295
343
  def get_data_keys(self):
296
344
  """
@@ -344,7 +392,9 @@ class LmDataset(CachedDataset2):
344
392
  else:
345
393
  self._lazy_init()
346
394
  self.seq_order = self.get_seq_order_for_epoch(
347
- epoch=epoch, num_seqs=len(self.orths), get_seq_len=lambda i: len(self.orths[i])
395
+ epoch=epoch,
396
+ num_seqs=len(self._orths_offsets_and_lens),
397
+ get_seq_len=lambda i: self._orths_offsets_and_lens[i][1],
348
398
  )
349
399
  self.next_orth_idx = 0
350
400
  self.next_seq_idx = 0
@@ -358,10 +408,12 @@ class LmDataset(CachedDataset2):
358
408
  """supports sorting"""
359
409
  return True
360
410
 
361
- def get_total_num_seqs(self) -> int:
411
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
362
412
  """total num seqs"""
413
+ if fast and self._orths_offsets_and_lens is None:
414
+ raise Exception(f"{self} not initialized")
363
415
  self._lazy_init()
364
- return len(self.orths)
416
+ return len(self._orths_offsets_and_lens)
365
417
 
366
418
  def _reduce_log_skipped_seqs(self):
367
419
  if isinstance(self.log_skipped_seqs, bool):
@@ -396,7 +448,9 @@ class LmDataset(CachedDataset2):
396
448
  assert self.next_seq_idx == seq_idx, "We expect that we iterate through all seqs."
397
449
  true_idx = self.seq_order[self.next_orth_idx]
398
450
  self._lazy_init()
399
- orth = self.orths[true_idx] # get sequence for the next index given by seq_order
451
+ # get sequence for the next index given by seq_order
452
+ offset, len_ = self._orths_offsets_and_lens[true_idx]
453
+ orth = self._orth_mmap[offset : offset + len_].decode("utf8")
400
454
  seq_tag = self._tag_prefix + str(true_idx)
401
455
  self.next_orth_idx += 1
402
456
  if orth == "</s>":
@@ -512,10 +566,10 @@ def _is_bliss(filename):
512
566
  return False
513
567
 
514
568
 
515
- def _iter_bliss(filename, callback):
569
+ def _iter_bliss(filename: str, callback: Callable[[Union[str, bytes]], None], *, decode: bool = True):
516
570
  """
517
- :param str filename:
518
- :param (str)->None callback:
571
+ :param filename:
572
+ :param callback:
519
573
  """
520
574
  corpus_file = open(filename, "rb")
521
575
  if filename.endswith(".gz"):
@@ -546,51 +600,68 @@ def _iter_bliss(filename, callback):
546
600
  orth_split = orth_raw.split()
547
601
  orth = " ".join(orth_split)
548
602
 
603
+ if not decode:
604
+ orth = orth.encode("utf8")
549
605
  callback(orth)
550
606
 
551
607
 
552
- def _iter_txt(filename, callback, skip_empty_lines=True):
608
+ def _iter_txt(
609
+ filename: str, callback: Callable[[Union[str, bytes]], None], *, skip_empty_lines: bool = True, decode: bool = True
610
+ ) -> None:
553
611
  """
554
- :param str filename:
555
- :param (str)->None callback:
556
- :param bool skip_empty_lines:
612
+ :param filename:
613
+ :param callback:
614
+ :param skip_empty_lines:
615
+ :param decode:
557
616
  """
558
617
  f = open(filename, "rb")
559
618
  if filename.endswith(".gz"):
560
619
  f = gzip.GzipFile(fileobj=f)
561
620
 
562
621
  for line in f:
563
- try:
564
- line = line.decode("utf8")
565
- except UnicodeDecodeError:
566
- line = line.decode("latin_1") # or iso8859_15?
622
+ if decode:
623
+ try:
624
+ line = line.decode("utf8")
625
+ except UnicodeDecodeError:
626
+ line = line.decode("latin_1") # or iso8859_15?
567
627
  line = line.strip()
568
628
  if skip_empty_lines and not line:
569
629
  continue
570
630
  callback(line)
571
631
 
572
632
 
573
- def iter_corpus(filename, callback, skip_empty_lines=True):
633
+ def iter_corpus(
634
+ filename: str, callback: Callable[[Union[str, bytes]], None], *, skip_empty_lines: bool = True, decode: bool = True
635
+ ) -> None:
574
636
  """
575
- :param str filename:
576
- :param ((str)->None) callback:
577
- :param bool skip_empty_lines:
637
+ :param filename:
638
+ :param callback:
639
+ :param skip_empty_lines:
640
+ :param decode:
578
641
  """
579
642
  if _is_bliss(filename):
580
- _iter_bliss(filename=filename, callback=callback)
643
+ _iter_bliss(filename=filename, callback=callback, decode=decode)
581
644
  else:
582
- _iter_txt(filename=filename, callback=callback, skip_empty_lines=skip_empty_lines)
583
-
584
-
585
- def read_corpus(filename, skip_empty_lines=True):
586
- """
587
- :param str filename: either Bliss XML or line-based text
588
- :param bool skip_empty_lines: in case of line-based text, skip empty lines
589
- :return: list of orthographies
590
- :rtype: list[str]
591
- """
592
- out_list = []
593
- iter_corpus(filename=filename, callback=out_list.append, skip_empty_lines=skip_empty_lines)
645
+ _iter_txt(filename=filename, callback=callback, skip_empty_lines=skip_empty_lines, decode=decode)
646
+
647
+
648
+ def read_corpus(
649
+ filename: str,
650
+ *,
651
+ skip_empty_lines: bool = True,
652
+ decode: bool = True,
653
+ out_list: Optional[Union[List[str], List[bytes]]] = None,
654
+ ) -> Union[List[str], List[bytes]]:
655
+ """
656
+ :param filename: either Bliss XML or line-based text
657
+ :param skip_empty_lines: in case of line-based text, skip empty lines
658
+ :param decode: if True, return str, otherwise bytes
659
+ :param out_list: if given, append to this list
660
+ :return: out_list, list of orthographies
661
+ """
662
+ if out_list is None:
663
+ out_list = []
664
+ iter_corpus(filename=filename, callback=out_list.append, skip_empty_lines=skip_empty_lines, decode=decode)
594
665
  return out_list
595
666
 
596
667
 
@@ -109,7 +109,7 @@ class MapDatasetWrapper(CachedDataset2):
109
109
  raise NotImplementedError("'num_seqs' is only known after calling init_seq_order().")
110
110
  return len(self._seq_order)
111
111
 
112
- def get_total_num_seqs(self) -> int:
112
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
113
113
  """
114
114
  :return: total number of seqs
115
115
  """
@@ -459,7 +459,7 @@ class MetaDataset(CachedDataset2):
459
459
  """
460
460
  return self.seq_list_original[self.default_dataset_key]
461
461
 
462
- def get_total_num_seqs(self) -> int:
462
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
463
463
  """
464
464
  :return: total number of seqs, without partition epoch
465
465
  """
@@ -1639,7 +1639,7 @@ class ConcatSeqsDataset(CachedDataset2):
1639
1639
  """
1640
1640
  return self.dataset.get_data_shape(key)
1641
1641
 
1642
- def get_total_num_seqs(self) -> int:
1642
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
1643
1643
  """total num seqs"""
1644
1644
  return len(self.full_seq_list)
1645
1645
 
@@ -1879,9 +1879,9 @@ class VariableDataset(Dataset):
1879
1879
  """all tags"""
1880
1880
  return self._dataset.get_all_tags()
1881
1881
 
1882
- def get_total_num_seqs(self) -> int:
1882
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
1883
1883
  """total num seqs"""
1884
- return self._dataset.get_total_num_seqs()
1884
+ return self._dataset.get_total_num_seqs(fast=fast)
1885
1885
 
1886
1886
  def get_seq_length(self, sorted_seq_idx: int) -> NumbersDict:
1887
1887
  """seq len"""
@@ -332,7 +332,7 @@ class MultiProcDataset(CachedDataset2):
332
332
  """num seqs"""
333
333
  return self._num_seqs
334
334
 
335
- def get_total_num_seqs(self) -> int:
335
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
336
336
  """total num seqs"""
337
337
  if self._total_num_seqs is not None:
338
338
  return self._total_num_seqs
@@ -123,12 +123,6 @@ class NumpyDumpDataset(Dataset):
123
123
  """
124
124
  return self._num_seqs
125
125
 
126
- def len_info(self):
127
- """
128
- :rtype: str
129
- """
130
- return "%s, %i seqs" % (self.__class__.__name__, self.num_seqs)
131
-
132
126
  # ------------ Seq cache management -----------
133
127
 
134
128
  def _cleanup_old_seq_cache(self, seq_end):
@@ -1223,7 +1223,7 @@ class SprintCacheDataset(CachedDataset2):
1223
1223
  self._num_seqs = len(self.seq_list_ordered)
1224
1224
  return True
1225
1225
 
1226
- def get_total_num_seqs(self) -> int:
1226
+ def get_total_num_seqs(self, *, fast: bool = False) -> int:
1227
1227
  """total num seqs"""
1228
1228
  return len(self.seq_list_original)
1229
1229
 
@@ -1,5 +1,5 @@
1
1
  """
2
- (Label-sync) Transformer decoder, including cross attention to encoder
2
+ (Label-sync) Transformer decoder, optionally including cross attention to encoder
3
3
 
4
4
  References:
5
5
 
@@ -30,10 +30,10 @@ class TransformerDecoder(rf.Module):
30
30
  self,
31
31
  encoder_dim: Optional[Dim],
32
32
  vocab_dim: Dim,
33
- model_dim: Dim = Dim(512, name="transformer-dec-default-model-dim"),
33
+ model_dim: Union[Dim, int] = Dim(512, name="transformer-dec-default-model-dim"),
34
34
  *,
35
35
  num_layers: int,
36
- ff_dim: Dim = NotSpecified,
36
+ ff_dim: Union[Dim, int] = NotSpecified,
37
37
  ff_activation: Callable[[Tensor], Tensor] = rf.relu,
38
38
  dropout: float = 0.1,
39
39
  num_heads: int = 8,
@@ -68,6 +68,13 @@ class TransformerDecoder(rf.Module):
68
68
  """
69
69
  super().__init__()
70
70
 
71
+ if not isinstance(vocab_dim, Dim):
72
+ raise TypeError(f"TransformerDecoder: unexpected vocab_dim {vocab_dim!r} type {type(vocab_dim)}")
73
+ if isinstance(model_dim, int):
74
+ model_dim = Dim(model_dim, name="transformer-dec-model-dim")
75
+ if not isinstance(model_dim, Dim):
76
+ raise TypeError(f"TransformerDecoder: unexpected model_dim {model_dim!r} type {type(model_dim)}")
77
+
71
78
  self.encoder_dim = encoder_dim
72
79
  self.vocab_dim = vocab_dim
73
80
  self.model_dim = model_dim
@@ -81,7 +88,7 @@ class TransformerDecoder(rf.Module):
81
88
  if embed_dim:
82
89
  self.input_embedding_proj = rf.Linear(embed_dim, model_dim, with_bias=False)
83
90
 
84
- # This could also be configurable...
91
+ # TODO This should be configurable...
85
92
  self.pos_enc = functools.partial(
86
93
  rf.sinusoidal_positional_encoding, feat_dim=embed_dim or model_dim, dtype=self.input_embedding.weight.dtype
87
94
  )
@@ -210,7 +217,7 @@ class TransformerDecoderLayer(rf.Module):
210
217
  encoder_dim: Optional[Dim],
211
218
  out_dim: Dim = Dim(512, name="transformer-dec-default-out-dim"),
212
219
  *,
213
- ff_dim: Dim = NotSpecified,
220
+ ff_dim: Union[Dim, int] = NotSpecified,
214
221
  ff_activation: Callable[[Tensor], Tensor] = rf.relu,
215
222
  dropout: float = 0.1,
216
223
  num_heads: int = 8,
@@ -236,8 +243,6 @@ class TransformerDecoderLayer(rf.Module):
236
243
  self.dropout_broadcast = rf.dropout_broadcast_default()
237
244
  self.out_dim = out_dim
238
245
 
239
- if ff_dim is None:
240
- ff_dim = 4 * out_dim
241
246
  self.ff = FeedForward(out_dim=out_dim, ff_dim=ff_dim, dropout=dropout, activation=ff_activation)
242
247
  self.ff_layer_norm = rf.LayerNorm(out_dim)
243
248
 
@@ -320,7 +325,7 @@ class FeedForward(rf.Module):
320
325
  self,
321
326
  out_dim: Dim,
322
327
  *,
323
- ff_dim: Optional[Dim] = NotSpecified,
328
+ ff_dim: Optional[Union[Dim, int]] = NotSpecified,
324
329
  dropout: float,
325
330
  activation: Callable[[Tensor], Tensor],
326
331
  ):
@@ -332,8 +337,12 @@ class FeedForward(rf.Module):
332
337
  """
333
338
  super().__init__()
334
339
 
335
- if ff_dim is NotSpecified:
340
+ if isinstance(ff_dim, int):
341
+ ff_dim = Dim(ff_dim, name="transformer-ff-dim")
342
+ if ff_dim is NotSpecified or ff_dim is None:
336
343
  ff_dim = out_dim * 4
344
+ if not isinstance(ff_dim, Dim):
345
+ raise TypeError(f"Transformer FeedForward: unexpected ff_dim {ff_dim!r} type {type(ff_dim)}")
337
346
 
338
347
  self.out_dim = out_dim
339
348
  self.dropout = dropout
@@ -18,6 +18,7 @@ from torch.utils.data import DataLoader
18
18
  from torch import autocast
19
19
  from torch.cuda import amp
20
20
  from random import random
21
+ import math
21
22
 
22
23
  import returnn
23
24
  from returnn.config import Config
@@ -118,6 +119,7 @@ class Engine(EngineBase):
118
119
 
119
120
  self._log_memory_usage = config.bool("torch_log_memory_usage", False)
120
121
  self._log_batch_size = config.bool("log_batch_size", False) and log.verbose[5]
122
+ self._calculate_exp_loss = config.bool("calculate_exp_loss", False)
121
123
  self._reset_dev_memory_caches = config.bool("reset_dev_memory_caches", False)
122
124
  self._forward_auto_split_batch_on_oom = config.bool("forward_auto_split_batch_on_oom", False)
123
125
 
@@ -433,10 +435,11 @@ class Engine(EngineBase):
433
435
 
434
436
  accumulated_losses_dict += losses_dict
435
437
  accumulated_inv_norm_factors_dict += inv_norm_factors_dict
438
+ eval_info = self._maybe_extend_losses_info(losses_dict / inv_norm_factors_dict)
436
439
  _print_process(
437
440
  f"ep {self.epoch} train",
438
441
  step=step_idx,
439
- eval_info=dict(losses_dict / inv_norm_factors_dict),
442
+ eval_info=dict(eval_info),
440
443
  step_duration=step_duration,
441
444
  batch_size_info=_get_batch_size_info(extern_data) if self._log_batch_size else None,
442
445
  log_memory_usage_device=self._device if self._log_memory_usage else None,
@@ -463,6 +466,7 @@ class Engine(EngineBase):
463
466
  )
464
467
 
465
468
  accumulated_losses_dict = accumulated_losses_dict / accumulated_inv_norm_factors_dict
469
+ accumulated_losses_dict = self._maybe_extend_losses_info(accumulated_losses_dict)
466
470
  self.learning_rate_control.set_epoch_error(
467
471
  self.epoch, {f"train_loss_{k}": v for k, v in accumulated_losses_dict.items()}
468
472
  )
@@ -530,8 +534,8 @@ class Engine(EngineBase):
530
534
  train_ctx = rf.get_run_ctx()
531
535
 
532
536
  if score_keys is None:
533
- score_keys = [name for name, loss in train_ctx.losses.items() if not loss.as_error]
534
- error_keys = [name for name, loss in train_ctx.losses.items() if loss.as_error]
537
+ score_keys = set(name for name, loss in train_ctx.losses.items() if not loss.as_error)
538
+ error_keys = set(name for name, loss in train_ctx.losses.items() if loss.as_error)
535
539
 
536
540
  losses_dict = NumbersDict(
537
541
  {
@@ -549,16 +553,18 @@ class Engine(EngineBase):
549
553
 
550
554
  accumulated_losses_dict += losses_dict
551
555
  accumulated_inv_norm_factors_dict += inv_norm_factors_dict
556
+ eval_info = self._maybe_extend_losses_info(losses_dict / inv_norm_factors_dict)
552
557
  _print_process(
553
558
  f"ep {self.epoch} {dataset_name} eval",
554
559
  step=step_idx,
555
- eval_info=dict(losses_dict / inv_norm_factors_dict),
560
+ eval_info=dict(eval_info),
556
561
  log_memory_usage_device=self._device if self._log_memory_usage else None,
557
562
  )
558
563
  step_idx += 1
559
564
 
560
565
  assert step_idx > 0, f"No data in dataset {dataset_name!r}."
561
566
  accumulated_losses_dict = accumulated_losses_dict / accumulated_inv_norm_factors_dict
567
+ accumulated_losses_dict = self._maybe_extend_losses_info(accumulated_losses_dict)
562
568
 
563
569
  self.learning_rate_control.set_epoch_error(
564
570
  self.epoch, {f"{dataset_name}_loss_{k}": v for k, v in accumulated_losses_dict.items()}
@@ -588,6 +594,23 @@ class Engine(EngineBase):
588
594
  assert isinstance(ls[0], self.learning_rate_control.EpochData)
589
595
  self.learning_rate_control.epoch_data[self.epoch] = ls[0]
590
596
 
597
+ def _maybe_extend_losses_info(self, losses: NumbersDict) -> NumbersDict:
598
+ """
599
+ :param losses:
600
+ :return: maybe extended losses
601
+ """
602
+ if self._calculate_exp_loss and losses.has_values():
603
+ # Assume the current run ctx still has info about the losses from the last step.
604
+ assert rf.get_run_ctx().losses
605
+ score_keys = set(k for k, v in rf.get_run_ctx().losses.items() if not v.as_error)
606
+ losses_ = {}
607
+ for key, value in losses.items():
608
+ losses_[key] = value
609
+ if key in score_keys:
610
+ losses_[f"{key}:exp"] = math.exp(value)
611
+ losses = NumbersDict(losses_)
612
+ return losses
613
+
591
614
  def _create_data_loader(self, dataset: Dataset, *, train: bool = False) -> DataLoader:
592
615
  """
593
616
  :param dataset: RETURNN dataset
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20240723.171654
3
+ Version: 1.20240725.5736
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -722,15 +722,15 @@ def test_LmDataset_pickle():
722
722
  }
723
723
  )
724
724
  assert isinstance(dataset, LmDataset)
725
- assert dataset.orths is None # not yet loaded, will be lazily loaded
725
+ assert dataset._orths_offsets_and_lens is None # not yet loaded, will be lazily loaded
726
726
 
727
727
  s = pickle.dumps(dataset)
728
728
  dataset = pickle.loads(s)
729
729
  assert isinstance(dataset, LmDataset)
730
- assert dataset.orths is None # not yet loaded, will be lazily loaded
730
+ assert dataset._orths_offsets_and_lens is None # not yet loaded, will be lazily loaded
731
731
 
732
732
  dataset.init_seq_order(epoch=1)
733
- assert dataset.orths is not None # loaded now
733
+ assert dataset._orths_offsets_and_lens is not None # loaded now
734
734
  dataset.load_seqs(0, 2)
735
735
  orth = dataset.get_data(0, "data")
736
736
  assert orth.tolist() == [1, 2]