returnn 1.20240711.181945__tar.gz → 1.20240712.3448__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.
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/PKG-INFO +1 -1
- returnn-1.20240712.3448/_setup_info_generated.py +2 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/__init__.py +2 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_backend.py +5 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/gradient.py +36 -2
- returnn-1.20240712.3448/returnn/frontend/parametrizations.py +87 -0
- returnn-1.20240712.3448/returnn/frontend/parametrize.py +206 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/frontend/_backend.py +7 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn.egg-info/PKG-INFO +1 -1
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn.egg-info/SOURCES.txt +2 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_base.py +67 -0
- returnn-1.20240711.181945/_setup_info_generated.py +0 -2
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/.editorconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/.gitignore +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/.gitmodules +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/.kateconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/CHANGELOG.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/CODEOWNERS +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/CONTRIBUTING.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/LICENSE +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/MANIFEST.in +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/README.rst +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/12AX.cluster_map +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/_setup_returnn_env.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-fwd.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-horovod-mpi.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-horovod-mpi.py.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-horovod-mpi.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-hyper-param-tuning.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-iter-dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-list-devices.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-lua-torch-layer.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-pretrain.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-record-and-push-to-webserver.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-returnn-as-framework.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-rf-pt-benchmark.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-rf.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-rhn-enwik8.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-sprint-interface.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-att-copy.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-attention.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-enc-dec.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-hard-att-copy.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-lstm-benchmark.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm2.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-neural-transducer.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-rec-explicit-lstm.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-rec-explicit-rnn.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-rec-self-att.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-search-compiled-graph.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-timit-lstm-ctc.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-torch.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/README.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/chars.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/config_demo +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/config_fwd +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/config_real +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/decode.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/go.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/lines.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/split/eval.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/split/train.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/split/valid.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial/create_test_h5.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial/forwardconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial/go.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial/trainconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial_rgb/go.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/pyproject.toml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/requirements.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/__main__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/__old_mod_loader__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/__setup__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/config.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/audio.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/basic.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/bundle_file.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/cached.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/cached2.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/distrib_files.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/generating.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/hdf.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/lm.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/map.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/meta.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/multi_proc.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/normalization_data.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/numpy_dump.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/raw_wav.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/sprint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/stereo.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/util/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/util/feature_extraction.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/util/strings.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/datasets/util/vocabulary.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/engine/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/engine/base.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/engine/batch.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/__main__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/.git +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/edit.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/reroute.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/select.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/subgraph.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/transform.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/extern/graph_editor/util.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/forward_iface.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/backend.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/backend.hpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/module.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/module.hpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/py_utils.hpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/tensor_ops.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_native/tensor_ops.hpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_numpy_backend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_random_journal.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/_utils.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/array_.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/attention.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/audio/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/audio/mel.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/audio/specaugment.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/backend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/build_from_dict.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/cond.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/const.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/container.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/control_flow_ctx.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/conv.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/decoder/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/decoder/transformer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/device.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/dims.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/dropout.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/dtype.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/encoder/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/encoder/base.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/encoder/conformer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/graph.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/hooks.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/init.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/label_smoothing.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/linear.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/loop.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/loss.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/math_.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/matmul.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/module.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/normalization.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/parameter.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/piecewise_linear.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/rand.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/rec.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/reduce.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/run_ctx.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/signal.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/state.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/stepwise_scheduler.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/tensor_array.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/frontend/types.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/import_/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/import_/common.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/import_/git.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/import_/import_.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/learning_rate_control.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/log.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/native_op.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/native_op.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/pretrain.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/cache.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/control.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/error_signals.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/extern_interface.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/sprint/interface.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/_dim_extra.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/_tensor_extra.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/_tensor_mixin_base.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/_tensor_op_overloads.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/control_flow_ctx.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/dim.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/marked_dim.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/tensor.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/tensor_dict.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tensor/utils.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/compat.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/data_pipeline.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/distributed.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/engine.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/_backend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/_utils.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/cond.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/dims.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/layer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/loop.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/make_layer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/masked_computation.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_low_level/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/frontend_low_level/_backend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/horovod.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/hyper_param_tuning.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/base.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/basic.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/rec.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/segmental_model.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/signal_processing.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/layers/variable.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/native_op.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/network.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/sprint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/updater.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/basic.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/data.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/gradient_checkpoint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/ken_lm.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/tf/util/open_fst.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/extern_data.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/pipeline.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/queued_data_iter.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/returnn_dataset_wrapper.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/data/tensor_utils.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/distributed.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/engine.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/frontend/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/frontend/_rand.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/frontend/bridge.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/frontend/raw_ops.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/updater.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/util/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/util/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/util/diagnose_gpu.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/util/gradient_checkpoint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/torch/util/scaled_gradient.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/__init__.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/basic.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/better_exchook.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/bpe.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/debug.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/debug_helpers.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/file_cache.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/fsa.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/literal_py_to_pickle.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/math.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/multi_proc_non_daemonic_spawn.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/native_code_compiler.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/pprint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/py-to-pickle.cpp +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/py_compat.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/py_ext_mod_compiler.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/result_with_reason.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/sig_proc.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/task_system.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/train_proc_manager.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn/util/watch_memory.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn.egg-info/dependency_links.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/returnn.egg-info/top_level.txt +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/rnn.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/setup.cfg +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/setup.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/DummySprintExec.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm-inspection-profile.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/.gitignore +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/.name +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/misc.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/modules.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/returnn.iml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/_set_num_threads1.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/_setup_returnn_env.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/_setup_test_env.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/bpe-unicode-demo.codes +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/bpe-unicode-demo.vocab +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/lexicon_opt.fst +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/lexicon_opt.isyms +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/lexicon_opt.jpg +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/lexicon_opt.osyms +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/lint_common.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/pycharm-inspect.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/pylint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/returnn-as-framework.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/rf_utils.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/spelling.dic +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Config.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Fsa.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_GeneratingDataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_HDFDataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_LearningRateControl.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Log.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_MultiProcDataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Pretrain.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_ResNet.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_SprintDataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_SprintInterface.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFEngine.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFNativeOp.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFNetworkLayer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFNetworkRecLayer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFNetworkSigProcLayer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFUpdater.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TFUtil.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TF_determinism.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TaskSystem.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TaskSystem_SharedMem.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_TranslationDataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_Util.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_demos.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_fork_exec.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_hdf_dump.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_array.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_attention.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_cond.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_const.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_container.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_conv.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_encoder_conformer.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_gradient.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_label_smoothing.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_loop.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_math.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_normalization.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_piecewise_linear.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_rec.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_reduce.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_rf_signal.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_tensor.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_tools.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_torch_dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_torch_engine.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_torch_frontend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_torch_internal_frontend.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tests/test_torch_util.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/_setup_returnn_env.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/analyze-dataset-batches.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/bliss-collect-seq-lens.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/bliss-dump-text.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/bliss-get-segment-names.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/bliss-to-ogg-zip.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/bpe-create-lexicon.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/calculate-word-error-rate.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/cleanup-old-models.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/collect-orth-symbols.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/collect-words.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/compile_native_op.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/compile_tf_graph.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/debug-dump-search-scores.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/debug-plot-search-scores.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-dataset-raw-strings.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-forward-stats.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-forward.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-network-json.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/dump-pickle.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/extract_state_tying_from_dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/get-attention-weights.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/get-best-model-epoch.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/hdf_dump.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/hdf_dump_translation_dataset.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/import-blocks-mt-model.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/import-t2t-mt-model.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/.gitignore +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/Makefile +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/README.md +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/libs_list +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/state_vars_list +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/example/tensor_names_list +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/file.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/main.cc +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/rescorer.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/vocabulary.cc +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/lattice_rescorer/vocabulary.h +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/tf_avg_checkpoints.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/tf_inspect_checkpoint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/tf_inspect_summary_log.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/torch_avg_checkpoints.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/torch_export_to_onnx.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/torch_inspect_checkpoint.py +0 -0
- {returnn-1.20240711.181945 → returnn-1.20240712.3448}/tools/torch_inspect_checkpoint_and_opt.py +0 -0
|
@@ -376,6 +376,11 @@ class Backend(Generic[T]):
|
|
|
376
376
|
"""
|
|
377
377
|
raise NotImplementedError
|
|
378
378
|
|
|
379
|
+
@staticmethod
|
|
380
|
+
def gradient_checkpoint_scope():
|
|
381
|
+
"""gradient checkpoint scope"""
|
|
382
|
+
raise NotImplementedError
|
|
383
|
+
|
|
379
384
|
@staticmethod
|
|
380
385
|
def merge_dims(
|
|
381
386
|
source: Tensor,
|
|
@@ -5,9 +5,16 @@ Utilities which affect the gradient
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
from typing import Optional, Union
|
|
7
7
|
from returnn.tensor import Tensor, Dim
|
|
8
|
+
from ._backend import global_backend
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
__all__ = [
|
|
11
|
+
"set_requires_gradient",
|
|
12
|
+
"gradient",
|
|
13
|
+
"stop_gradient",
|
|
14
|
+
"scaled_gradient",
|
|
15
|
+
"scaled_gradient_ext",
|
|
16
|
+
"gradient_checkpoint_scope",
|
|
17
|
+
]
|
|
11
18
|
|
|
12
19
|
|
|
13
20
|
def set_requires_gradient(source: Tensor):
|
|
@@ -72,3 +79,30 @@ def scaled_gradient_ext(
|
|
|
72
79
|
return source._raw_backend.scaled_gradient_ext(
|
|
73
80
|
source, scale=scale, shift=shift, scale_shift_by_sum_over_axis=scale_shift_by_sum_over_axis
|
|
74
81
|
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def gradient_checkpoint_scope():
|
|
85
|
+
"""
|
|
86
|
+
Create a gradient checkpoint scope.
|
|
87
|
+
All tensors created within this scope will not be stored for backpropagation,
|
|
88
|
+
but will be recomputed on the fly during backpropagation.
|
|
89
|
+
|
|
90
|
+
Example::
|
|
91
|
+
|
|
92
|
+
a = ...
|
|
93
|
+
b = ...
|
|
94
|
+
c = ...
|
|
95
|
+
with gradient_checkpoint_scope():
|
|
96
|
+
x = a + b
|
|
97
|
+
y = x * c
|
|
98
|
+
|
|
99
|
+
In this example, the tensor ``x`` will not be stored for backpropagation,
|
|
100
|
+
i.e. the computation ``x = a + b`` will be recomputed during backpropagation.
|
|
101
|
+
|
|
102
|
+
See :class:`returnn.torch.util.gradient_checkpoint.gradient_checkpoint_scope` for more documentation
|
|
103
|
+
for the PyTorch specific implementation.
|
|
104
|
+
|
|
105
|
+
:return: context manager which enables gradient checkpointing. It supports __enter__ and __exit__,
|
|
106
|
+
and the intended usage is with the `with` statement.
|
|
107
|
+
"""
|
|
108
|
+
return global_backend.gradient_checkpoint_scope()
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Parameterizations using the parametrization API (:func:`register_parametrization`).
|
|
3
|
+
|
|
4
|
+
Also see:
|
|
5
|
+
https://github.com/rwth-i6/returnn/issues/1518
|
|
6
|
+
https://pytorch.org/tutorials/intermediate/parametrizations.html
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
from returnn.tensor import Tensor
|
|
11
|
+
import returnn.frontend as rf
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
__all__ = ["weight_dropout", "WeightDropout", "weight_noise", "WeightNoise"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def weight_dropout(module: rf.Module, param_name: str, *, drop_prob: float) -> rf.Module:
|
|
18
|
+
"""
|
|
19
|
+
Apply weight dropout to a parameter of a module.
|
|
20
|
+
|
|
21
|
+
This is only done in training.
|
|
22
|
+
|
|
23
|
+
It uses :func:`gradient_checkpoint_scope` to avoid any memory overhead.
|
|
24
|
+
|
|
25
|
+
In RETURNN TF-layers, this corresponds to the ``param_dropout`` option in a layer.
|
|
26
|
+
Or in the RETURNN TF-layers :class:`RecLayer` with `ùnit="NativeLstm2"``,
|
|
27
|
+
this was the ``rec_weight_dropout`` option.
|
|
28
|
+
|
|
29
|
+
:param module:
|
|
30
|
+
:param param_name: name of the parameter
|
|
31
|
+
:param drop_prob: dropout probability
|
|
32
|
+
:return: module
|
|
33
|
+
"""
|
|
34
|
+
return rf.register_parametrization(module, param_name, WeightDropout(drop_prob))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class WeightDropout:
|
|
38
|
+
"""
|
|
39
|
+
Use this for :func:`register_parametrization`, or via :func:`weight_dropout`.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, drop_prob: float):
|
|
43
|
+
self.drop_prob = drop_prob
|
|
44
|
+
|
|
45
|
+
def __call__(self, param: Tensor) -> Tensor:
|
|
46
|
+
def _on_train() -> Tensor:
|
|
47
|
+
with rf.gradient_checkpoint_scope():
|
|
48
|
+
# on_forward=True because we already checked for train_flag
|
|
49
|
+
return rf.dropout(param, drop_prob=self.drop_prob, on_forward=True)
|
|
50
|
+
|
|
51
|
+
return rf.cond(rf.get_run_ctx().train_flag, _on_train, lambda: param)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def weight_noise(module: rf.Module, param_name: str, *, std: float) -> rf.Module:
|
|
55
|
+
"""
|
|
56
|
+
Apply weight noise to a parameter of a module.
|
|
57
|
+
This is also called variational noise.
|
|
58
|
+
|
|
59
|
+
This is only done in training.
|
|
60
|
+
|
|
61
|
+
It uses :func:`gradient_checkpoint_scope` to avoid any memory overhead.
|
|
62
|
+
|
|
63
|
+
In RETURNN TF-layers, this corresponds to the ``param_variational_noise`` option in a layer.
|
|
64
|
+
|
|
65
|
+
:param module:
|
|
66
|
+
:param param_name: name of the parameter
|
|
67
|
+
:param std: standard deviation of the noise
|
|
68
|
+
:return: module
|
|
69
|
+
"""
|
|
70
|
+
return rf.register_parametrization(module, param_name, WeightNoise(std))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class WeightNoise:
|
|
74
|
+
"""
|
|
75
|
+
Use this for :func:`register_parametrization`, or via :func:`weight_noise`.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
def __init__(self, std: float):
|
|
79
|
+
self.std = std
|
|
80
|
+
|
|
81
|
+
def __call__(self, param: Tensor) -> Tensor:
|
|
82
|
+
def _on_train() -> Tensor:
|
|
83
|
+
with rf.gradient_checkpoint_scope():
|
|
84
|
+
noise = rf.random_normal(param.dims, dtype=param.dtype, stddev=self.std)
|
|
85
|
+
return param + noise
|
|
86
|
+
|
|
87
|
+
return rf.cond(rf.get_run_ctx().train_flag, _on_train, lambda: param)
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Parametrize some parameters, e.g. to implement weight dropout, variational noise, weight norm, etc.
|
|
3
|
+
|
|
4
|
+
We follow the `PyTorch parametrization API
|
|
5
|
+
<https://pytorch.org/docs/stable/generated/torch.nn.utils.parametrize.register_parametrization.html>`__
|
|
6
|
+
and also borrow some code.
|
|
7
|
+
|
|
8
|
+
https://github.com/rwth-i6/returnn/issues/1518
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
from typing import Optional, Union
|
|
13
|
+
import copyreg
|
|
14
|
+
import weakref
|
|
15
|
+
from returnn.util.py_compat import Protocol
|
|
16
|
+
import returnn.frontend as rf
|
|
17
|
+
from returnn.tensor import Tensor
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
__all__ = ["register_parametrization", "remove_parametrization", "is_parametrized"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def register_parametrization(
|
|
24
|
+
module: rf.Module, param_name: str, parametrization: _ParametrizationType, *, keep_existing_param: bool = True
|
|
25
|
+
) -> rf.Module:
|
|
26
|
+
"""
|
|
27
|
+
Register parametrization for a tensor (parameter) in a module.
|
|
28
|
+
|
|
29
|
+
:param module:
|
|
30
|
+
:param param_name:
|
|
31
|
+
:param parametrization:
|
|
32
|
+
:param keep_existing_param:
|
|
33
|
+
True: the original parameter stays in there,
|
|
34
|
+
and parametrization will be called with the original parameter as an argument::
|
|
35
|
+
parametrization(orig_param)
|
|
36
|
+
In this case, parametrization must not have own parameters.
|
|
37
|
+
This is useful for potential optional transformations, e.g. weight dropout or variational noise.
|
|
38
|
+
False: the original parameter will be removed, and this will be a submodule,
|
|
39
|
+
which can have its own parameters.
|
|
40
|
+
It will be called without arguments::
|
|
41
|
+
parametrization()
|
|
42
|
+
"""
|
|
43
|
+
if not is_parametrized(module):
|
|
44
|
+
# Sets up a module to be parametrized.
|
|
45
|
+
# This works by substituting the class of the module by a class
|
|
46
|
+
# that extends it to be able to inject a property.
|
|
47
|
+
# We need this because we cannot inject a property into an object instance
|
|
48
|
+
# (see https://docs.python.org/3/howto/descriptor.html)
|
|
49
|
+
# and also we do not want to modify the original class.
|
|
50
|
+
cls = module.__class__
|
|
51
|
+
param_cls = _new_classes.get(cls, None)
|
|
52
|
+
if not param_cls:
|
|
53
|
+
param_cls = _Metaclass(f"Parametrized{cls.__name__}", (cls,), {})
|
|
54
|
+
_new_classes[cls] = param_cls
|
|
55
|
+
module.__class__ = param_cls
|
|
56
|
+
|
|
57
|
+
if hasattr(module.__class__, param_name):
|
|
58
|
+
raise ValueError(
|
|
59
|
+
f"register_parametrization: parametrized property {param_name} already exists in module {module}"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
orig_param = getattr(module, param_name)
|
|
63
|
+
if not isinstance(orig_param, rf.Parameter):
|
|
64
|
+
raise TypeError(f"module.{param_name} is not a parameter, got {orig_param!r}")
|
|
65
|
+
|
|
66
|
+
if keep_existing_param:
|
|
67
|
+
if isinstance(parametrization, rf.Module):
|
|
68
|
+
if len(list(parametrization.parameters())) > 0:
|
|
69
|
+
raise ValueError(
|
|
70
|
+
f"register_parametrization: parametrization {parametrization} must not have parameters"
|
|
71
|
+
f" with keep_existing_param=True"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
else:
|
|
75
|
+
if hasattr(parametrization, "assign"):
|
|
76
|
+
parametrization.assign(orig_param)
|
|
77
|
+
orig_param = None
|
|
78
|
+
# Put the parametrization into the module as a submodule
|
|
79
|
+
# instead of the original parameter.
|
|
80
|
+
# module.named_parameters() will thus find it, even when we install the new property.
|
|
81
|
+
setattr(module, param_name, parametrization)
|
|
82
|
+
|
|
83
|
+
# Injects a property into module
|
|
84
|
+
assert isinstance(module.__class__, _Metaclass), "module must be parametrized"
|
|
85
|
+
assert not hasattr(module.__class__, param_name), "property already exists"
|
|
86
|
+
prop = _Property(module, param_name, parametrization, orig_param)
|
|
87
|
+
setattr(module.__class__, param_name, prop)
|
|
88
|
+
|
|
89
|
+
return module
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def remove_parametrization(module: rf.Module, param_name: str) -> rf.Module:
|
|
93
|
+
"""
|
|
94
|
+
Remove parametrization for a tensor (parameter) in a module.
|
|
95
|
+
"""
|
|
96
|
+
if not is_parametrized(module):
|
|
97
|
+
raise ValueError(f"module {module} is not parametrized")
|
|
98
|
+
prop = getattr(module.__class__, param_name)
|
|
99
|
+
assert isinstance(prop, _Property)
|
|
100
|
+
delattr(module.__class__, param_name)
|
|
101
|
+
assert not hasattr(module.__class__, param_name)
|
|
102
|
+
if prop.orig_param is None:
|
|
103
|
+
setattr(module, param_name, rf.Parameter(prop.parametrization()))
|
|
104
|
+
# Check if there are any other parametrizations left.
|
|
105
|
+
for k, v in vars(module.__class__).items():
|
|
106
|
+
if isinstance(v, _Property):
|
|
107
|
+
break
|
|
108
|
+
else: # no break, no other parametrizations
|
|
109
|
+
module.__class__ = module.__class__.__bases__[0] # revert to original class
|
|
110
|
+
return module
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def is_parametrized(module: rf.Module, param_name: Optional[str] = None) -> bool:
|
|
114
|
+
r"""Returns ``True`` if module has an active parametrization.
|
|
115
|
+
|
|
116
|
+
If the argument :attr:`tensor_name` is specified, returns ``True`` if
|
|
117
|
+
``module[tensor_name]`` is parametrized.
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
module: module to query
|
|
121
|
+
param_name: attribute in the module to query
|
|
122
|
+
Default: ``None``
|
|
123
|
+
"""
|
|
124
|
+
if module.__class__.__class__ is not _Metaclass:
|
|
125
|
+
return False
|
|
126
|
+
if param_name is None:
|
|
127
|
+
return True
|
|
128
|
+
return hasattr(module.__class__, param_name)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class _ParametrizationTransform(Protocol):
|
|
132
|
+
def __call__(self, x: Tensor) -> Tensor:
|
|
133
|
+
"""Return the parametrized tensor based on the original parameter."""
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class _ParametrizationWithAssign(Protocol):
|
|
137
|
+
def __call__(self) -> Tensor:
|
|
138
|
+
"""Return the parametrized tensor."""
|
|
139
|
+
|
|
140
|
+
def assign(self, x: Tensor):
|
|
141
|
+
"""Assign as if it was a single parameter."""
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class _ParametrizationWithoutAssign(Protocol):
|
|
145
|
+
def __call__(self) -> Tensor:
|
|
146
|
+
"""Return the parametrized tensor."""
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
_ParametrizationType = Union[
|
|
150
|
+
_ParametrizationTransform,
|
|
151
|
+
_ParametrizationWithAssign,
|
|
152
|
+
_ParametrizationWithoutAssign,
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
_new_classes: weakref.WeakKeyDictionary[type, type] = weakref.WeakKeyDictionary()
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class _Metaclass(type):
|
|
160
|
+
"""
|
|
161
|
+
https://stackoverflow.com/a/75943813/133374
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def _reduce_metaclass(cls):
|
|
166
|
+
metaclass = cls.__class__
|
|
167
|
+
cls_vars = dict(vars(cls))
|
|
168
|
+
cls_vars.pop("__dict__", None)
|
|
169
|
+
cls_vars.pop("__weakref__", None)
|
|
170
|
+
return metaclass, (cls.__name__, cls.__bases__, cls_vars)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
copyreg.pickle(_Metaclass, _reduce_metaclass)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class _Property:
|
|
177
|
+
def __init__(
|
|
178
|
+
self,
|
|
179
|
+
module: rf.Module,
|
|
180
|
+
param_name: str,
|
|
181
|
+
parametrization: _ParametrizationType,
|
|
182
|
+
orig_param: Optional[rf.Parameter],
|
|
183
|
+
):
|
|
184
|
+
self.module_ref = weakref.ref(module)
|
|
185
|
+
self.param_name = param_name
|
|
186
|
+
self.parametrization = parametrization
|
|
187
|
+
self.orig_param = orig_param
|
|
188
|
+
|
|
189
|
+
def __get__(self, obj, objtype=None):
|
|
190
|
+
if obj is None: # called on the class
|
|
191
|
+
return self
|
|
192
|
+
assert obj is self.module_ref(), f"parametrize _Property __get__: {obj!r} vs {self.module_ref()!r}"
|
|
193
|
+
if self.orig_param is not None:
|
|
194
|
+
return self.parametrization(self.orig_param)
|
|
195
|
+
else:
|
|
196
|
+
return self.parametrization()
|
|
197
|
+
|
|
198
|
+
def __set__(self, obj, value):
|
|
199
|
+
assert obj is self.module_ref(), f"parametrize _Property __set__: {obj!r} vs {self.module_ref()!r}"
|
|
200
|
+
if self.orig_param is not None:
|
|
201
|
+
self.orig_param.assign(value)
|
|
202
|
+
else:
|
|
203
|
+
if hasattr(self.parametrization, "assign"):
|
|
204
|
+
self.parametrization.assign(value)
|
|
205
|
+
else:
|
|
206
|
+
raise AttributeError(f"Cannot assign to {self.param_name} parametrization {self.parametrization}")
|
|
@@ -245,6 +245,13 @@ class TorchBackend(Backend[torch.Tensor]):
|
|
|
245
245
|
)
|
|
246
246
|
return out
|
|
247
247
|
|
|
248
|
+
@staticmethod
|
|
249
|
+
def gradient_checkpoint_scope():
|
|
250
|
+
"""gradient checkpoint scope"""
|
|
251
|
+
from returnn.torch.util.gradient_checkpoint import gradient_checkpoint_scope
|
|
252
|
+
|
|
253
|
+
return gradient_checkpoint_scope()
|
|
254
|
+
|
|
248
255
|
@staticmethod
|
|
249
256
|
def merge_dims(
|
|
250
257
|
source: Tensor,
|
|
@@ -185,6 +185,8 @@ returnn/frontend/matmul.py
|
|
|
185
185
|
returnn/frontend/module.py
|
|
186
186
|
returnn/frontend/normalization.py
|
|
187
187
|
returnn/frontend/parameter.py
|
|
188
|
+
returnn/frontend/parametrizations.py
|
|
189
|
+
returnn/frontend/parametrize.py
|
|
188
190
|
returnn/frontend/piecewise_linear.py
|
|
189
191
|
returnn/frontend/rand.py
|
|
190
192
|
returnn/frontend/rec.py
|
|
@@ -4,6 +4,7 @@ RETURNN frontend (returnn.frontend) tests
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
from typing import Tuple
|
|
7
|
+
from unittest import SkipTest
|
|
7
8
|
import _setup_test_env # noqa
|
|
8
9
|
import returnn.frontend as rf
|
|
9
10
|
from returnn.tensor import Tensor, Dim, TensorDict, batch_dim
|
|
@@ -437,3 +438,69 @@ def test_build_from_dict_func_native():
|
|
|
437
438
|
assert isinstance(rf.combine, BuiltinFunctionType) # due to native optimizations
|
|
438
439
|
func = rf.build_from_dict({"class": "rf.combine"})
|
|
439
440
|
assert func is rf.combine
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
def test_parametrization():
|
|
444
|
+
from functools import partial
|
|
445
|
+
|
|
446
|
+
rf.select_backend_torch() # any, doesn't really matter for the test
|
|
447
|
+
rf.init_train_step_run_ctx(train_flag=True) # such that dropout is used below
|
|
448
|
+
|
|
449
|
+
in_dim = Dim(7, name="in")
|
|
450
|
+
out_dim = Dim(13, name="out")
|
|
451
|
+
mod = rf.Linear(in_dim, out_dim)
|
|
452
|
+
orig_weight = mod.weight
|
|
453
|
+
assert isinstance(orig_weight, rf.Parameter)
|
|
454
|
+
orig_bias = mod.bias
|
|
455
|
+
|
|
456
|
+
# Test parametrization.
|
|
457
|
+
rf.register_parametrization(mod, "weight", partial(rf.dropout, drop_prob=0.5))
|
|
458
|
+
assert rf.is_parametrized(mod)
|
|
459
|
+
assert rf.is_parametrized(mod, "weight")
|
|
460
|
+
weight = mod.weight
|
|
461
|
+
assert weight is not orig_weight and not isinstance(weight, rf.Parameter)
|
|
462
|
+
params = dict(mod.named_parameters())
|
|
463
|
+
assert set(params.keys()) == {"weight", "bias"}
|
|
464
|
+
assert params["weight"] is orig_weight
|
|
465
|
+
assert params["bias"] is orig_bias
|
|
466
|
+
|
|
467
|
+
rf.init_train_step_run_ctx(train_flag=False)
|
|
468
|
+
weight = mod.weight
|
|
469
|
+
assert weight is orig_weight # no dropout in eval mode
|
|
470
|
+
|
|
471
|
+
rf.init_train_step_run_ctx(train_flag=True) # such that dropout would be used again
|
|
472
|
+
rf.remove_parametrization(mod, "weight")
|
|
473
|
+
weight = mod.weight
|
|
474
|
+
assert weight is orig_weight
|
|
475
|
+
assert not rf.is_parametrized(mod, "weight")
|
|
476
|
+
assert not rf.is_parametrized(mod)
|
|
477
|
+
params = dict(mod.named_parameters())
|
|
478
|
+
assert set(params.keys()) == {"weight", "bias"}
|
|
479
|
+
assert params["weight"] is orig_weight
|
|
480
|
+
assert params["bias"] is orig_bias
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
def test_weight_noise():
|
|
484
|
+
import torch
|
|
485
|
+
|
|
486
|
+
if torch.__version__ < (2, 0):
|
|
487
|
+
raise SkipTest("Torch version too old for this test (gradient_checkpoint_scope needs Torch >= 2.0)")
|
|
488
|
+
rf.select_backend_torch() # any, doesn't really matter for the test
|
|
489
|
+
rf.init_train_step_run_ctx(train_flag=True) # such that weight noise is used below
|
|
490
|
+
|
|
491
|
+
in_dim = Dim(7, name="in")
|
|
492
|
+
out_dim = Dim(13, name="out")
|
|
493
|
+
mod = rf.Linear(in_dim, out_dim)
|
|
494
|
+
orig_weight = mod.weight
|
|
495
|
+
assert isinstance(orig_weight, rf.Parameter)
|
|
496
|
+
orig_bias = mod.bias
|
|
497
|
+
|
|
498
|
+
# Test parametrization.
|
|
499
|
+
rf.weight_noise(mod, "weight", std=0.1)
|
|
500
|
+
assert rf.is_parametrized(mod, "weight")
|
|
501
|
+
weight = mod.weight
|
|
502
|
+
assert weight is not orig_weight and not isinstance(weight, rf.Parameter)
|
|
503
|
+
params = dict(mod.named_parameters())
|
|
504
|
+
assert set(params.keys()) == {"weight", "bias"}
|
|
505
|
+
assert params["weight"] is orig_weight
|
|
506
|
+
assert params["bias"] is orig_bias
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-record-and-push-to-webserver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-chunking-blstm.12ax.config
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-contribrnn-lstm.12ax.config
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-maxgradnorm-lstm.12ax.config
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm-lowmem.12ax.config
RENAMED
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm2.12ax.config
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-native-lstm2.12ax.tuned.config
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-neural-transducer.12ax.config
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-rec-explicit-lstm.config
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-search-compiled-graph.py
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-tf-vanilla-lstm.12ax.config
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/demo-upd-mult-model.lstm.12ax.config
RENAMED
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png
RENAMED
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240711.181945 → returnn-1.20240712.3448}/demos/mdlstm/IAM/create_IAM_dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|