returnn 1.20231220.174528__tar.gz → 1.20231221.165309__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 (438) hide show
  1. {returnn-1.20231220.174528/returnn.egg-info → returnn-1.20231221.165309}/PKG-INFO +1 -1
  2. returnn-1.20231221.165309/_setup_info_generated.py +2 -0
  3. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/attention.py +1 -1
  4. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/_dim_extra.py +1 -1
  5. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/_tensor_extra.py +57 -9
  6. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_low_level/_backend.py +29 -0
  7. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/basic.py +16 -10
  8. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/basic.py +0 -47
  9. {returnn-1.20231220.174528 → returnn-1.20231221.165309/returnn.egg-info}/PKG-INFO +1 -1
  10. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFUtil.py +9 -0
  11. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_array.py +18 -0
  12. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_attention.py +80 -0
  13. returnn-1.20231220.174528/_setup_info_generated.py +0 -2
  14. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/.editorconfig +0 -0
  15. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/.gitignore +0 -0
  16. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/.gitmodules +0 -0
  17. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/.kateconfig +0 -0
  18. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/CHANGELOG.md +0 -0
  19. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/CODEOWNERS +0 -0
  20. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/CONTRIBUTING.md +0 -0
  21. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/LICENSE +0 -0
  22. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/MANIFEST.in +0 -0
  23. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/README.rst +0 -0
  24. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/__init__.py +0 -0
  25. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/12AX.cluster_map +0 -0
  26. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/_setup_returnn_env.py +0 -0
  27. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-fwd.config +0 -0
  28. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-horovod-mpi.py +0 -0
  29. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-horovod-mpi.py.sh +0 -0
  30. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-horovod-mpi.sh +0 -0
  31. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-hyper-param-tuning.config +0 -0
  32. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-iter-dataset.py +0 -0
  33. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-list-devices.py +0 -0
  34. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-lua-torch-layer.config +0 -0
  35. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-pretrain.config +0 -0
  36. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-record-and-push-to-webserver.py +0 -0
  37. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-returnn-as-framework.py +0 -0
  38. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-rf-pt-benchmark.py +0 -0
  39. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-rf.config +0 -0
  40. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-rhn-enwik8.config +0 -0
  41. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-sprint-interface.py +0 -0
  42. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-att-copy.config +0 -0
  43. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-attention.config +0 -0
  44. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
  45. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
  46. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-enc-dec.config +0 -0
  47. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-hard-att-copy.config +0 -0
  48. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-lstm-benchmark.py +0 -0
  49. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
  50. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
  51. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-native-lstm.12ax.config +0 -0
  52. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-native-lstm2.12ax.config +0 -0
  53. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
  54. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-neural-transducer.12ax.config +0 -0
  55. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-rec-explicit-lstm.config +0 -0
  56. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-rec-explicit-rnn.config +0 -0
  57. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-rec-self-att.config +0 -0
  58. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-search-compiled-graph.py +0 -0
  59. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
  60. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-timit-lstm-ctc.config +0 -0
  61. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-torch.config +0 -0
  62. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
  63. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/demo.sh +0 -0
  64. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
  65. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
  66. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
  67. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/README.txt +0 -0
  68. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/chars.txt +0 -0
  69. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/config_demo +0 -0
  70. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/config_fwd +0 -0
  71. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/config_real +0 -0
  72. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
  73. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/decode.py +0 -0
  74. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
  75. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/go.sh +0 -0
  76. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/lines.txt +0 -0
  77. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/split/eval.txt +0 -0
  78. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/split/train.txt +0 -0
  79. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/IAM/split/valid.txt +0 -0
  80. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/README.md +0 -0
  81. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial/create_test_h5.py +0 -0
  82. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial/forwardconfig +0 -0
  83. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial/go.sh +0 -0
  84. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial/trainconfig +0 -0
  85. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
  86. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
  87. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial_rgb/go.sh +0 -0
  88. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
  89. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/pyproject.toml +0 -0
  90. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/requirements.txt +0 -0
  91. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/__init__.py +0 -0
  92. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/__main__.py +0 -0
  93. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/__old_mod_loader__.py +0 -0
  94. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/__setup__.py +0 -0
  95. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/config.py +0 -0
  96. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/__init__.py +0 -0
  97. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/audio.py +0 -0
  98. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/basic.py +0 -0
  99. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/bundle_file.py +0 -0
  100. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/cached.py +0 -0
  101. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/cached2.py +0 -0
  102. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/generating.py +0 -0
  103. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/hdf.py +0 -0
  104. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/lm.py +0 -0
  105. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/map.py +0 -0
  106. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/meta.py +0 -0
  107. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/multi_proc.py +0 -0
  108. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/normalization_data.py +0 -0
  109. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/numpy_dump.py +0 -0
  110. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/raw_wav.py +0 -0
  111. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/sprint.py +0 -0
  112. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/stereo.py +0 -0
  113. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/util/__init__.py +0 -0
  114. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/util/feature_extraction.py +0 -0
  115. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/util/strings.py +0 -0
  116. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/datasets/util/vocabulary.py +0 -0
  117. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/engine/__init__.py +0 -0
  118. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/engine/base.py +0 -0
  119. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/engine/batch.py +0 -0
  120. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/__init__.py +0 -0
  121. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/__main__.py +0 -0
  122. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/.git +0 -0
  123. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
  124. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
  125. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
  126. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
  127. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
  128. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
  129. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
  130. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
  131. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
  132. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
  133. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
  134. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
  135. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
  136. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
  137. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
  138. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
  139. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
  140. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
  141. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
  142. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
  143. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
  144. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
  145. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
  146. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
  147. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/__init__.py +0 -0
  148. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/README.md +0 -0
  149. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/__init__.py +0 -0
  150. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/edit.py +0 -0
  151. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/reroute.py +0 -0
  152. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/select.py +0 -0
  153. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/subgraph.py +0 -0
  154. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/transform.py +0 -0
  155. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/extern/graph_editor/util.py +0 -0
  156. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/forward_iface.py +0 -0
  157. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/__init__.py +0 -0
  158. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_backend.py +0 -0
  159. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/__init__.py +0 -0
  160. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/backend.cpp +0 -0
  161. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/backend.hpp +0 -0
  162. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/module.cpp +0 -0
  163. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/module.hpp +0 -0
  164. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/py_utils.hpp +0 -0
  165. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/tensor_ops.cpp +0 -0
  166. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_native/tensor_ops.hpp +0 -0
  167. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_numpy_backend.py +0 -0
  168. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_random_journal.py +0 -0
  169. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/_utils.py +0 -0
  170. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/array_.py +0 -0
  171. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/audio/__init__.py +0 -0
  172. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/audio/mel.py +0 -0
  173. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/audio/specaugment.py +0 -0
  174. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/backend.py +0 -0
  175. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/cond.py +0 -0
  176. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/const.py +0 -0
  177. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/container.py +0 -0
  178. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/control_flow_ctx.py +0 -0
  179. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/conv.py +0 -0
  180. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/decoder/__init__.py +0 -0
  181. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/decoder/transformer.py +0 -0
  182. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/device.py +0 -0
  183. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/dims.py +0 -0
  184. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/dropout.py +0 -0
  185. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/dtype.py +0 -0
  186. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/encoder/__init__.py +0 -0
  187. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/encoder/base.py +0 -0
  188. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/encoder/conformer.py +0 -0
  189. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/gradient.py +0 -0
  190. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/graph.py +0 -0
  191. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/init.py +0 -0
  192. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/label_smoothing.py +0 -0
  193. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/linear.py +0 -0
  194. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/loop.py +0 -0
  195. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/loss.py +0 -0
  196. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/math_.py +0 -0
  197. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/matmul.py +0 -0
  198. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/module.py +0 -0
  199. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/normalization.py +0 -0
  200. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/parameter.py +0 -0
  201. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/rand.py +0 -0
  202. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/rec.py +0 -0
  203. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/reduce.py +0 -0
  204. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/run_ctx.py +0 -0
  205. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/signal.py +0 -0
  206. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/state.py +0 -0
  207. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/tensor_array.py +0 -0
  208. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/frontend/types.py +0 -0
  209. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/import_/__init__.py +0 -0
  210. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/import_/common.py +0 -0
  211. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/import_/git.py +0 -0
  212. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/import_/import_.py +0 -0
  213. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/learning_rate_control.py +0 -0
  214. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/log.py +0 -0
  215. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/native_op.cpp +0 -0
  216. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/native_op.py +0 -0
  217. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/pretrain.py +0 -0
  218. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/__init__.py +0 -0
  219. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/cache.py +0 -0
  220. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/control.py +0 -0
  221. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/error_signals.py +0 -0
  222. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/extern_interface.py +0 -0
  223. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/sprint/interface.py +0 -0
  224. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/README.md +0 -0
  225. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/__init__.py +0 -0
  226. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/_tensor_mixin_base.py +0 -0
  227. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/_tensor_op_overloads.py +0 -0
  228. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/control_flow_ctx.py +0 -0
  229. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/dim.py +0 -0
  230. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/marked_dim.py +0 -0
  231. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/tensor.py +0 -0
  232. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/tensor_dict.py +0 -0
  233. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tensor/utils.py +0 -0
  234. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/__init__.py +0 -0
  235. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/compat.py +0 -0
  236. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/data_pipeline.py +0 -0
  237. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/distributed.py +0 -0
  238. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/engine.py +0 -0
  239. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/README.md +0 -0
  240. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/__init__.py +0 -0
  241. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/_backend.py +0 -0
  242. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/_utils.py +0 -0
  243. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/cond.py +0 -0
  244. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
  245. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -0
  246. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/dims.py +0 -0
  247. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/layer.py +0 -0
  248. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/loop.py +0 -0
  249. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/make_layer.py +0 -0
  250. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/masked_computation.py +0 -0
  251. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
  252. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
  253. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/frontend_low_level/__init__.py +0 -0
  254. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/horovod.py +0 -0
  255. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/hyper_param_tuning.py +0 -0
  256. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/__init__.py +0 -0
  257. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/base.py +0 -0
  258. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/rec.py +0 -0
  259. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/segmental_model.py +0 -0
  260. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/signal_processing.py +0 -0
  261. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/layers/variable.py +0 -0
  262. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/native_op.py +0 -0
  263. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/network.py +0 -0
  264. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/sprint.py +0 -0
  265. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/updater.py +0 -0
  266. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/__init__.py +0 -0
  267. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/data.py +0 -0
  268. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/gradient_checkpoint.py +0 -0
  269. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/ken_lm.py +0 -0
  270. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/tf/util/open_fst.py +0 -0
  271. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/README.md +0 -0
  272. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/__init__.py +0 -0
  273. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/data/__init__.py +0 -0
  274. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/data/extern_data.py +0 -0
  275. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/data/pipeline.py +0 -0
  276. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/data/returnn_dataset_wrapper.py +0 -0
  277. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/data/tensor_utils.py +0 -0
  278. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/distributed.py +0 -0
  279. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/engine.py +0 -0
  280. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/frontend/__init__.py +0 -0
  281. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/frontend/_backend.py +0 -0
  282. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/frontend/_rand.py +0 -0
  283. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/frontend/bridge.py +0 -0
  284. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/frontend/raw_ops.py +0 -0
  285. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/updater.py +0 -0
  286. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/util/README.md +0 -0
  287. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/util/__init__.py +0 -0
  288. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/util/diagnose_gpu.py +0 -0
  289. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/torch/util/scaled_gradient.py +0 -0
  290. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/__init__.py +0 -0
  291. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/basic.py +0 -0
  292. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/better_exchook.py +0 -0
  293. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/bpe.py +0 -0
  294. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/debug.py +0 -0
  295. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/debug_helpers.py +0 -0
  296. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/fsa.py +0 -0
  297. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/literal_py_to_pickle.py +0 -0
  298. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/math.py +0 -0
  299. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/native_code_compiler.py +0 -0
  300. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/pprint.py +0 -0
  301. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/py-to-pickle.cpp +0 -0
  302. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/py_compat.py +0 -0
  303. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/py_ext_mod_compiler.py +0 -0
  304. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/result_with_reason.py +0 -0
  305. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/sig_proc.py +0 -0
  306. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/task_system.py +0 -0
  307. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn/util/watch_memory.py +0 -0
  308. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn.egg-info/SOURCES.txt +0 -0
  309. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn.egg-info/dependency_links.txt +0 -0
  310. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/returnn.egg-info/top_level.txt +0 -0
  311. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/rnn.py +0 -0
  312. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/setup.cfg +0 -0
  313. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/setup.py +0 -0
  314. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/DummySprintExec.py +0 -0
  315. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm-inspection-profile.xml +0 -0
  316. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/.gitignore +0 -0
  317. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/.name +0 -0
  318. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
  319. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
  320. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
  321. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
  322. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
  323. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/misc.xml +0 -0
  324. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/modules.xml +0 -0
  325. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/returnn.iml +0 -0
  326. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
  327. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/_set_num_threads1.py +0 -0
  328. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/_setup_returnn_env.py +0 -0
  329. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/_setup_test_env.py +0 -0
  330. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/bpe-unicode-demo.codes +0 -0
  331. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/bpe-unicode-demo.vocab +0 -0
  332. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/lexicon_opt.fst +0 -0
  333. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/lexicon_opt.isyms +0 -0
  334. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/lexicon_opt.jpg +0 -0
  335. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/lexicon_opt.osyms +0 -0
  336. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/lint_common.py +0 -0
  337. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/pycharm-inspect.py +0 -0
  338. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/pylint.py +0 -0
  339. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/returnn-as-framework.py +0 -0
  340. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/rf_utils.py +0 -0
  341. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/spelling.dic +0 -0
  342. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Config.py +0 -0
  343. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Dataset.py +0 -0
  344. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Fsa.py +0 -0
  345. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_GeneratingDataset.py +0 -0
  346. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_HDFDataset.py +0 -0
  347. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_LearningRateControl.py +0 -0
  348. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Log.py +0 -0
  349. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_MultiProcDataset.py +0 -0
  350. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Pretrain.py +0 -0
  351. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_ResNet.py +0 -0
  352. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_SprintDataset.py +0 -0
  353. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_SprintInterface.py +0 -0
  354. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFEngine.py +0 -0
  355. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFNativeOp.py +0 -0
  356. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFNetworkLayer.py +0 -0
  357. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFNetworkRecLayer.py +0 -0
  358. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFNetworkSigProcLayer.py +0 -0
  359. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TFUpdater.py +0 -0
  360. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TF_determinism.py +0 -0
  361. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TaskSystem.py +0 -0
  362. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TaskSystem_SharedMem.py +0 -0
  363. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_TranslationDataset.py +0 -0
  364. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_Util.py +0 -0
  365. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_demos.py +0 -0
  366. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_fork_exec.py +0 -0
  367. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_hdf_dump.py +0 -0
  368. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_base.py +0 -0
  369. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_cond.py +0 -0
  370. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_const.py +0 -0
  371. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_container.py +0 -0
  372. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_conv.py +0 -0
  373. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_encoder_conformer.py +0 -0
  374. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_gradient.py +0 -0
  375. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_label_smoothing.py +0 -0
  376. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_loop.py +0 -0
  377. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_math.py +0 -0
  378. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_normalization.py +0 -0
  379. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_rec.py +0 -0
  380. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_reduce.py +0 -0
  381. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_rf_signal.py +0 -0
  382. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_tensor.py +0 -0
  383. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_tools.py +0 -0
  384. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_torch_dataset.py +0 -0
  385. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_torch_engine.py +0 -0
  386. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_torch_frontend.py +0 -0
  387. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tests/test_torch_internal_frontend.py +0 -0
  388. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/_setup_returnn_env.py +0 -0
  389. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/analyze-dataset-batches.py +0 -0
  390. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/bliss-collect-seq-lens.py +0 -0
  391. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/bliss-dump-text.py +0 -0
  392. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/bliss-get-segment-names.py +0 -0
  393. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/bliss-to-ogg-zip.py +0 -0
  394. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/bpe-create-lexicon.py +0 -0
  395. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/calculate-word-error-rate.py +0 -0
  396. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/cleanup-old-models.py +0 -0
  397. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/collect-orth-symbols.py +0 -0
  398. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/collect-words.py +0 -0
  399. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/compile_native_op.py +0 -0
  400. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/compile_tf_graph.py +0 -0
  401. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/debug-dump-search-scores.py +0 -0
  402. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/debug-plot-search-scores.py +0 -0
  403. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-dataset-raw-strings.py +0 -0
  404. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-dataset.py +0 -0
  405. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-forward-stats.py +0 -0
  406. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-forward.py +0 -0
  407. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-network-json.py +0 -0
  408. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/dump-pickle.py +0 -0
  409. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/extract_state_tying_from_dataset.py +0 -0
  410. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/get-attention-weights.py +0 -0
  411. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/get-best-model-epoch.py +0 -0
  412. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/hdf_dump.py +0 -0
  413. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/hdf_dump_translation_dataset.py +0 -0
  414. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/import-blocks-mt-model.py +0 -0
  415. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/import-t2t-mt-model.py +0 -0
  416. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/.gitignore +0 -0
  417. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/Makefile +0 -0
  418. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/README.md +0 -0
  419. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/README.md +0 -0
  420. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/libs_list +0 -0
  421. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
  422. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
  423. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
  424. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/state_vars_list +0 -0
  425. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/example/tensor_names_list +0 -0
  426. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/file.h +0 -0
  427. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
  428. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
  429. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/main.cc +0 -0
  430. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/rescorer.h +0 -0
  431. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/vocabulary.cc +0 -0
  432. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/lattice_rescorer/vocabulary.h +0 -0
  433. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/tf_avg_checkpoints.py +0 -0
  434. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/tf_inspect_checkpoint.py +0 -0
  435. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/tf_inspect_summary_log.py +0 -0
  436. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/torch_export_to_onnx.py +0 -0
  437. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/tools/torch_inspect_checkpoint.py +0 -0
  438. {returnn-1.20231220.174528 → returnn-1.20231221.165309}/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.20231220.174528
3
+ Version: 1.20231221.165309
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.20231221.165309'
2
+ long_version = '1.20231221.165309+git.b4f5883'
@@ -231,7 +231,7 @@ def _causal_self_att_step(
231
231
  k, hist_dim = rf.cum_concat_step(k, prev_accum=state.k_accum, axis=state.accum_axis)
232
232
  v, _ = rf.cum_concat_step(v, prev_accum=state.v_accum, out_spatial_dim=hist_dim, axis=state.accum_axis)
233
233
  else:
234
- if state:
234
+ if state and state.accum_axis.dimension != 0:
235
235
  raise NotImplementedError( # need to concat ...
236
236
  f"{self}: on sequence over {axis} with initial state {state} not implemented yet"
237
237
  )
@@ -862,7 +862,7 @@ class _DimMixin:
862
862
  # A zero size can lead to problems in some cases, e.g. in SoftmaxOverSpatialLayer,
863
863
  # when everything is masked to -inf, it results in nan,
864
864
  # and this likely produces nan in backprop or elsewhere.
865
- # Thus, mask size_ext itself, and set the padded values to 1.
865
+ # Thus, mask size_ext itself, and set the padded values to max_idx.
866
866
  # This assumes that max_idx >= 1.
867
867
  size_ext = size_ext.copy_masked(max_idx)
868
868
  idx_range = backend.range_over_dim(self, device=device)
@@ -2920,19 +2920,67 @@ class _TensorMixin(_TensorMixinBase):
2920
2920
 
2921
2921
  return rf.num_elements_of_shape(self.dims)
2922
2922
 
2923
- def copy_masked(self: Tensor, mask_value) -> Tensor:
2923
+ def copy_masked(
2924
+ self: Tensor,
2925
+ mask_value: Union[Tensor, float, int, _t.RawTensorType],
2926
+ *,
2927
+ dims: Optional[Sequence[Union[Dim, int]]] = None,
2928
+ allow_int: bool = NotSpecified,
2929
+ ) -> Tensor:
2924
2930
  """
2925
- :param float|int|tf.Tensor|Tensor mask_value:
2931
+ :param mask_value:
2932
+ :param dims:
2933
+ :param allow_int: in dims
2926
2934
  """
2927
- assert self.placeholder is not None
2928
- if not any(dim.need_masking() for dim in self.dims):
2935
+ assert self.raw_tensor is not None
2936
+ if dims is None:
2937
+ axes = range(self.batch_ndim)
2938
+ else:
2939
+ axes = [self.get_axis_from_description(dim, allow_int=allow_int) for dim in dims]
2940
+ assert len(set(axes)) == len(dims), f"{self} copy_masked, dims {dims} not unique, axes {axes}"
2941
+
2942
+ # Code was originally in TF util mask_dyn_seq_len_nd, here rewritten with RETURNN frontend (RF).
2943
+
2944
+ # Filter out some axes which should not be used for masking.
2945
+ axes_ = []
2946
+ for axis in axes:
2947
+ tag: Dim = self.dims[axis]
2948
+ if not tag.need_masking():
2949
+ continue
2950
+ # It only makes sense to apply for this axis if the dyn size dims are all existing in x itself.
2951
+ # E.g. if the dyn_size_ext shape is [B] but the shape of x is just [T] (without B),
2952
+ # then we do not need masking.
2953
+ if set(tag.dyn_size_ext.dim_tags).issubset(self.dim_tags):
2954
+ axes_.append(axis)
2955
+ axes = axes_
2956
+
2957
+ if not axes:
2929
2958
  return self.copy()
2930
- assert self._raw_backend.is_tensorflow # not implemented otherwise for now
2931
- from returnn.tf.util.basic import mask_dyn_seq_len_nd
2932
2959
 
2933
- dyn_axes = [axis for axis, dim in enumerate(self.dim_tags) if not dim.is_batch_dim() and dim.dimension is None]
2934
- res = self.copy()
2935
- res.placeholder = mask_dyn_seq_len_nd(self, pad_value=mask_value, axes=dyn_axes)
2960
+ use_padding_info = False
2961
+ tf_util = None
2962
+ if self._raw_backend.is_tensorflow:
2963
+ import returnn.tf.util.basic as tf_util
2964
+
2965
+ use_padding_info = isinstance(mask_value, (int, float))
2966
+ if use_padding_info:
2967
+ d = tf_util.get_padding_info_dict_ref(self.raw_tensor)
2968
+ existing_pad_values = [d.get(self.dim_tags[axis]) for axis in axes]
2969
+ if set(existing_pad_values) == {mask_value}:
2970
+ return self.copy() # nothing to do
2971
+
2972
+ import returnn.frontend as rf
2973
+
2974
+ mask = None
2975
+ for axis in axes:
2976
+ mask_ = self._dims[axis].get_mask(dim_order=self.dims, device=self.device)
2977
+ mask = rf.logical_and(mask, mask_) if mask is not None else mask_
2978
+ assert isinstance(mask, _t.Tensor)
2979
+ res = rf.where(mask, self, mask_value)
2980
+ if use_padding_info:
2981
+ d = tf_util.get_padding_info_dict_ref(res.raw_tensor)
2982
+ d.clear()
2983
+ d.update({self.dim_tags[axis]: mask_value for axis in axes})
2936
2984
  return res
2937
2985
 
2938
2986
  def get_batch_dim(self) -> Union[_t.RawTensorType, int]:
@@ -146,6 +146,35 @@ class TFBackend(Backend[tf.Tensor]):
146
146
  with tf_util.same_control_flow_ctx([a, b]):
147
147
  return op(a, b)
148
148
 
149
+ @staticmethod
150
+ def where(
151
+ cond: Tensor,
152
+ true_: Union[Tensor, rf.RawTensorTypes],
153
+ false_: Union[Tensor, rf.RawTensorTypes],
154
+ *,
155
+ allow_broadcast_all_sources: bool = False,
156
+ ) -> Tensor:
157
+ """where"""
158
+ if isinstance(true_, Tensor):
159
+ dtype = true_.dtype
160
+ elif isinstance(false_, Tensor):
161
+ dtype = false_.dtype
162
+ else:
163
+ dtype = None
164
+ true_ = rf.convert_to_tensor(true_, _backend=TFBackend, device=cond.device, dtype=dtype)
165
+ false_ = rf.convert_to_tensor(false_, _backend=TFBackend, device=cond.device, dtype=dtype)
166
+ out = Tensor.get_common_data(
167
+ [true_, false_, cond], allow_broadcast_all_sources=allow_broadcast_all_sources, name="where"
168
+ )
169
+ out.dtype = true_.dtype
170
+ out.sparse_dim = true_.sparse_dim or false_.sparse_dim
171
+ out.feature_dim = true_.feature_dim or false_.feature_dim
172
+ cond_bc_raw = cond.copy_compatible_to_dims_raw(out.dims)
173
+ true_bc_raw = true_.copy_compatible_to_dims_raw(out.dims)
174
+ false_bc_raw = false_.copy_compatible_to_dims_raw(out.dims)
175
+ out.raw_tensor = tf_util.where_bc(cond_bc_raw, true_bc_raw, false_bc_raw)
176
+ return out
177
+
149
178
  @staticmethod
150
179
  def reshape_raw(raw_tensor: tf.Tensor, shape: Union[Sequence[Union[int, tf.Tensor]], tf.Tensor]) -> tf.Tensor:
151
180
  """
@@ -8532,7 +8532,7 @@ class DotLayer(LayerBase):
8532
8532
  See https://github.com/rwth-i6/returnn/issues/627 for details.
8533
8533
  """
8534
8534
  from returnn.util import BehaviorVersion
8535
- from returnn.tf.util.basic import prod, get_shape, get_padding_info_dict_ref, mask_dyn_seq_len_nd
8535
+ from returnn.tf.util.basic import prod, get_shape, get_padding_info_dict_ref
8536
8536
 
8537
8537
  super(DotLayer, self).__init__(**kwargs)
8538
8538
  if reduce is not NotSpecified:
@@ -8627,10 +8627,8 @@ class DotLayer(LayerBase):
8627
8627
  # For matmul, all the first dims must match (batch dim etc), and for the remaining 2 dims,
8628
8628
  # we get (I, J) * (J, K) -> (I, K).
8629
8629
  # So we reshape such that we collapse all reduce-axes and var-axes into each a single axis.
8630
- a = a_out.placeholder
8631
- b = b_out.placeholder
8632
- a_shape = get_shape(a)
8633
- b_shape = get_shape(b)
8630
+ a_shape = get_shape(a_out.placeholder)
8631
+ b_shape = get_shape(b_out.placeholder)
8634
8632
  a_rem_dims = [a_shape[i] for i in a_rem_axes]
8635
8633
  b_rem_dims = [b_shape[i] for i in b_rem_axes]
8636
8634
  assert len(a_rem_axes) == len(b_rem_axes), "%s: remaining shared (batch) axes do not match. sources %r" % (
@@ -8663,7 +8661,7 @@ class DotLayer(LayerBase):
8663
8661
  if not use_mask:
8664
8662
  self._info_reduce_mask = "disabled"
8665
8663
  elif a_reduce_dyn_axes and b_reduce_dyn_axes:
8666
- a_pad, b_pad = get_padding_info_dict_ref(a), get_padding_info_dict_ref(b)
8664
+ a_pad, b_pad = get_padding_info_dict_ref(a_out.raw_tensor), get_padding_info_dict_ref(b_out.raw_tensor)
8667
8665
  a_pad_values = [a_pad.get(a_out.dim_tags[i], None) for i in a_reduce_dyn_axes]
8668
8666
  b_pad_values = [b_pad.get(b_out.dim_tags[i], None) for i in b_reduce_dyn_axes]
8669
8667
  if set(a_pad_values) == {0}:
@@ -8682,16 +8680,18 @@ class DotLayer(LayerBase):
8682
8680
  )
8683
8681
  if not can_mask_b or len(a_shape) < len(b_shape):
8684
8682
  assert can_mask_a
8685
- a = mask_dyn_seq_len_nd(a_out, pad_value=0, axes=a_reduce_dyn_axes)
8683
+ a_out = a_out.copy_masked(0, dims=a_reduce_dyn_axes, allow_int=True)
8686
8684
  self._info_reduce_mask = "mask-source-0"
8687
8685
  else:
8688
8686
  assert can_mask_b
8689
- b = mask_dyn_seq_len_nd(b_out, pad_value=0, axes=b_reduce_dyn_axes)
8687
+ b_out = b_out.copy_masked(0, dims=b_reduce_dyn_axes, allow_int=True)
8690
8688
  self._info_reduce_mask = "mask-source-1"
8691
8689
  else:
8692
8690
  self._info_reduce_mask = "none-dynamic"
8693
8691
  a_reduce_dim = prod(a_reduce_dims) if a_reduce_dims else None
8694
8692
  b_reduce_dim = prod(b_reduce_dims) if b_reduce_dims else None
8693
+ a = a_out.placeholder
8694
+ b = b_out.placeholder
8695
8695
  if debug:
8696
8696
  print("%s, red1=%r, red2=%r, var1=%r, var2=%r:" % (self, red1, red2, var1, var2), file=log.v3)
8697
8697
  print(" ", "a:", a_out, a, file=log.v3)
@@ -9821,7 +9821,7 @@ class SwitchLayer(LayerBase):
9821
9821
  if isinstance(source, LayerBase):
9822
9822
  return source.output
9823
9823
  else:
9824
- return Data.from_tensor(tf.constant(source, name=const_name))
9824
+ return Data.from_tensor(tf.constant(source, name=const_name, dtype=self.output.dtype))
9825
9825
 
9826
9826
  def get_source_allow_inf_in_output(source):
9827
9827
  """
@@ -9900,6 +9900,12 @@ class SwitchLayer(LayerBase):
9900
9900
  :param LayerBase|float|int|None false_from:
9901
9901
  :rtype: Data
9902
9902
  """
9903
+ if isinstance(true_from, LayerBase):
9904
+ dtype = true_from.output.dtype
9905
+ elif isinstance(false_from, LayerBase):
9906
+ dtype = false_from.output.dtype
9907
+ else:
9908
+ dtype = None
9903
9909
 
9904
9910
  def get_source_template(source, source_name):
9905
9911
  """
@@ -9909,7 +9915,7 @@ class SwitchLayer(LayerBase):
9909
9915
  """
9910
9916
  if isinstance(source, LayerBase):
9911
9917
  return source.output.copy_template(source_name)
9912
- return Data.template_from_constant(source, name=source_name)
9918
+ return Data.template_from_constant(source, name=source_name, dtype=dtype)
9913
9919
 
9914
9920
  if isinstance(condition, bool):
9915
9921
  return get_source_template(true_from if condition else false_from, source_name="%s_output" % name)
@@ -263,53 +263,6 @@ def set_padding_info(x, dim, pad_value):
263
263
  d[dim] = pad_value
264
264
 
265
265
 
266
- def mask_dyn_seq_len_nd(x, pad_value, axes):
267
- """
268
- :param Tensor x:
269
- :param float|int|tf.Tensor|Tensor pad_value:
270
- :param list[int]|tuple[int] axes:
271
- :return: masked x
272
- :rtype: tf.Tensor
273
- """
274
- if isinstance(pad_value, Tensor):
275
- assert pad_value.dims == ()
276
- pad_value = pad_value.placeholder
277
- # Filter out some axes which should not be used for masking.
278
- axes_ = []
279
- for axis in axes:
280
- tag = x.dim_tags[axis]
281
- assert tag.dyn_size_ext
282
- # It only makes sense to apply for this axis if the dyn size dims are all existing in x itself.
283
- # E.g. if the dyn_size_ext shape is [B] but the shape of x is just [T] (without B),
284
- # then we do not need masking.
285
- if set(tag.dyn_size_ext.dim_tags).issubset(x.dim_tags):
286
- axes_.append(axis)
287
- axes = axes_
288
-
289
- x_ = x.placeholder
290
- if not axes:
291
- return x_
292
-
293
- pad_value_is_const = isinstance(pad_value, (int, float))
294
- if pad_value_is_const:
295
- d = get_padding_info_dict_ref(x_)
296
- existing_pad_values = [d.get(x.dim_tags[axis]) for axis in axes]
297
- if set(existing_pad_values) == {pad_value}:
298
- return x_ # nothing to do
299
-
300
- mask = None
301
- for axis in axes:
302
- mask_ = x.get_sequence_mask_broadcast(axis=axis)
303
- mask = tf.logical_and(mask, mask_) if mask is not None else mask_
304
- assert isinstance(mask, tf.Tensor)
305
- x_ = where_bc(mask, x_, tf.cast(tf.convert_to_tensor(pad_value, name="pad_value"), dtype=x_.dtype))
306
- if pad_value_is_const:
307
- d = get_padding_info_dict_ref(x_)
308
- d.clear()
309
- d.update({x.dim_tags[axis]: pad_value for axis in axes})
310
- return x_
311
-
312
-
313
266
  def copy_compatible_reduce(source, target, reduce_type):
314
267
  """
315
268
  Extension of Data.copy_compatible_to which also reduces additional dims.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20231220.174528
3
+ Version: 1.20231221.165309
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
@@ -1523,6 +1523,15 @@ def test_Data_auto_create_placeholders_same_dim_tags_as_existing():
1523
1523
  assert_equal(set(placeholder_ops), {data.placeholder.op, classes.placeholder.op, time_tag.dyn_size.op})
1524
1524
 
1525
1525
 
1526
+ def test_Data_copy_masked_0():
1527
+ x = Tensor("b_out", shape=(None, 3), dtype="float32", auto_create_placeholders=True)
1528
+ y = x.copy_masked(0)
1529
+ rnd = numpy.random.RandomState(3)
1530
+ session.run(
1531
+ y.raw_tensor, feed_dict={x.raw_tensor: rnd.normal(size=(2, 5, 3)), x.dims[1].dyn_size_ext.raw_tensor: [5, 4]}
1532
+ )
1533
+
1534
+
1526
1535
  def test_Dim_copy():
1527
1536
  # https://github.com/rwth-i6/returnn/issues/860
1528
1537
  import copy
@@ -286,3 +286,21 @@ def test_where():
286
286
  out.mark_as_default_output(shape=(batch_dim, time_dim, in_dim))
287
287
 
288
288
  run_model(extern_data, lambda *, epoch, step: rf.Module(), _forward_step)
289
+
290
+
291
+ def test_where_int():
292
+ time_dim = Dim(Tensor("time", [batch_dim], dtype="int32"))
293
+ in_dim = Dim(7, name="in")
294
+ extern_data = TensorDict(
295
+ {
296
+ "cond": Tensor("cond", [batch_dim, time_dim], dtype="bool"),
297
+ "true": Tensor("true", [batch_dim, time_dim, in_dim], dtype="float32"),
298
+ }
299
+ )
300
+
301
+ # noinspection PyShadowingNames,PyUnusedLocal
302
+ def _forward_step(*, model: rf.Module, extern_data: TensorDict):
303
+ out = rf.where(extern_data["cond"], extern_data["true"], 0)
304
+ out.mark_as_default_output(shape=(batch_dim, time_dim, in_dim))
305
+
306
+ run_model(extern_data, lambda *, epoch, step: rf.Module(), _forward_step)
@@ -5,6 +5,7 @@ RETURNN frontend (returnn.frontend) tests
5
5
  from __future__ import annotations
6
6
  from typing import Tuple
7
7
  import numpy as np
8
+ import numpy.testing
8
9
  import _setup_test_env # noqa
9
10
  import returnn.frontend as rf
10
11
  from returnn.tensor import Tensor, Dim, TensorDict, batch_dim
@@ -205,3 +206,82 @@ def test_sinusoidal_positional_encoding():
205
206
  tf_ref_v = session.run(tf_ref)
206
207
 
207
208
  np.testing.assert_almost_equal(res.data["output"].raw_tensor, tf_ref_v, decimal=5)
209
+
210
+
211
+ def test_CausalSelfAttention():
212
+ time_dim = Dim(Tensor("time", [batch_dim], dtype="int32"))
213
+ feat_dim = Dim(8, name="feat")
214
+ key_dim = Dim(6, name="key")
215
+ value_dim = Dim(10, name="value")
216
+ extern_data = TensorDict(
217
+ {
218
+ "data": Tensor("data", [batch_dim, time_dim, feat_dim], dtype="float32"),
219
+ }
220
+ )
221
+
222
+ def _forward_step(*, model: rf.CausalSelfAttention, extern_data: TensorDict):
223
+ data = extern_data["data"]
224
+ data.mark_as_output("data", shape=[batch_dim, time_dim, feat_dim])
225
+ time_dim.dyn_size_ext.mark_as_output("seq_len", shape=[batch_dim])
226
+ out, _ = model(data, axis=time_dim)
227
+ out.mark_as_default_output(shape=(batch_dim, time_dim, value_dim))
228
+ model.qkv.weight.mark_as_output("qkv_weight", shape=[feat_dim, 2 * key_dim + value_dim])
229
+
230
+ res = run_model(
231
+ extern_data,
232
+ lambda *, epoch, step: rf.CausalSelfAttention(
233
+ in_dim=feat_dim,
234
+ proj_dim=None,
235
+ key_dim_total=key_dim,
236
+ value_dim_total=value_dim,
237
+ num_heads=2,
238
+ with_bias=False,
239
+ ),
240
+ _forward_step,
241
+ # Some problem with dimension tags currently in the TF-layers-dict backend...
242
+ # Anyway, we compare to the TF SelfAttentionLayer with attention_left_only=True below.
243
+ test_tensorflow=False,
244
+ )
245
+
246
+ extern_data.reset_content()
247
+
248
+ with tf_scope() as session:
249
+ from returnn.tf.network import TFNetwork, ExternData
250
+
251
+ net_dict = {
252
+ "self_att": {
253
+ "class": "self_attention",
254
+ "from": "data",
255
+ "num_heads": 2,
256
+ "total_key_dim": key_dim.dimension,
257
+ "attention_left_only": True,
258
+ "out_dim": value_dim,
259
+ "is_output_layer": True,
260
+ }
261
+ }
262
+ net = TFNetwork(
263
+ extern_data=ExternData(
264
+ {
265
+ "data": {
266
+ "dims": [batch_dim, time_dim, feat_dim],
267
+ "time_dim_axis": 1,
268
+ "feature_dim_axis": 2,
269
+ "dtype": "float32",
270
+ "version": 1,
271
+ }
272
+ }
273
+ )
274
+ )
275
+ net.construct_from_dict(net_dict)
276
+ layer = net.get_default_output_layer()
277
+ layer.params["QKV"].load(res.data["qkv_weight"].raw_tensor, session=session)
278
+ out = layer.output.copy_transpose([batch_dim, time_dim, value_dim]).copy_masked(0.0)
279
+
280
+ out_tf_v = session.run(
281
+ out.raw_tensor,
282
+ feed_dict={
283
+ net.extern_data.data["data"].placeholder: res.data["data"].raw_tensor,
284
+ net.extern_data.data["data"].dims[1].dyn_size_ext.raw_tensor: res.data["seq_len"].raw_tensor,
285
+ },
286
+ )
287
+ numpy.testing.assert_almost_equal(res.data["output"].raw_tensor, out_tf_v, decimal=5)
@@ -1,2 +0,0 @@
1
- version = '1.20231220.174528'
2
- long_version = '1.20231220.174528+git.5b3b478'