The RWTH Extensible Training framework for Universal Recurrent Neural Networks (RETURNN) License

Copyright (c) 2010--2019, RWTH.
All rights reserved.

Contains third party code from other projects. See below.

This license is derived from the Q Public License v1.0 and the Qt Non-Commercial License v1.0 which are both Copyright by Trolltech AS, Norway.
The aim of this license is to lay down the conditions enabling you to use, modify and circulate the SOFTWARE, use of third-party application programs based on the Software and publication of results obtained through the use of modified and unmodified versions of the SOFTWARE.
However, RWTH remain the authors of the SOFTWARE and so retain property rights and the use of all ancillary rights.
The SOFTWARE is defined as all successive versions of RETURNN software and their documentation that have been developed by RWTH.
When you access and use the SOFTWARE, you are presumed to be aware of and to have accepted all the rights and obligations of the present license:

 1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license for non-commercial use only.
 2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed.
 3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications:
    a. Modifications must not alter or remove any copyright notices in the Software.
    b When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer.
 4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions:
    a. You must include this license document in the distribution.
    b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this.
    c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license.
 5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others.
 6. You may develop application programs, reusable components and other software items, in a non-commercial setting, that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements:
    a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer.
    b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose.
    c. If an application program gives you access to functionality of the Software for development of application programs, reusable components or other software components (e.g. an application that is a scripting wrapper), usage of the application program is considered to be usage of the Software and is thus bound by this license.
    d. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one.
 7. Users must cite the authors of the Software upon publication of results obtained through the use of original or modified versions of the Software by referring to the following publication:
    P. Doetsch, A. Zeyer, P. Voigtlaender, I. Kulikov, R. Schluter, and H. Ney, “RETURNN: The RWTH extensible training framework for universal recurrent neural networks”, submitted to Interspeech 2016.

 8. In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise.
The Software and this license document are provided "AS IS" with NO EXPLICIT OR IMPLICIT WARRANTY OF ANY KIND, INCLUDING WARRANTY OF DESIGN, ADAPTION, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

 9. You assume all risks concerning the quality or the effects of the SOFTWARE and its use. If the SOFTWARE is defective, you will bear the costs of all required services, corrections or repairs.
 10. This license has the binding value of a contract.
 11. The present license and its effects are subject to German law and the competent German Courts.


=====================

Contains code from better_exchook:
 - Website: https://github.com/albertz/py_better_exchook
 - BSD 2-clause "Simplified" License
 - Copyright (c) 2011--2016, Albert Zeyer. All rights reserved.
 - File: better_exchook.py

Contains code from TaskSystem:
 - Website: https://github.com/albertz/TaskSystem
 - BSD 2-clause "Simplified" License
 - Copyright (c) 2011--2016, Albert Zeyer. All rights reserved.
 - Files: TaskSystem*.py

Contains code from extpickle:
 - Website: https://github.com/albertz/extpickle
 - BSD 2-clause "Simplified" License
 - Copyright (c) 2016, Albert Zeyer. All rights reserved.
 - File: TaskSystem.py

Contains code from MusicPlayer:
 - Website: https://github.com/albertz/music-player
 - BSD 2-clause "Simplified" License
 - Copyright (c) 2011--2016, Albert Zeyer. All rights reserved.
 - Various functions e.g. in Util.py, Debug.py.

Contains code from pydbattach:
 - Website: https://github.com/albertz/pydbattach
 - No project license; also on StackOverflow with Creative Commons license.
 - Copyright (c) 2011--2016, Albert Zeyer. All rights reserved.
 - Function: initIPythonKernel

Contains code from Keras:
 - Website: https://github.com/fchollet/keras
 - MIT License
 - Copyright (c) 2015, François Chollet. All rights reserved.
 - Copyright (c) 2015, Google, Inc. All rights reserved.
 - Copyright (c) 2017, Microsoft, Inc. All rights reserved.
 - Copyright (c) 2015 - 2017, the respective contributors.
   Each contributor holds copyright over their respective contributions.
   The project versioning (Git) records all such contribution source information.
   All rights reserved.
 - Various functions in Util.py, TFUtil.py, TheanoUtil.py.

Contains code from Theano:
 - Website: https://github.com/Theano/Theano
 - 3-Clause BSD License, New BSD License
 - Copyright (c) 2008--2017, Theano Development Team. All rights reserved.
 - Contains code from NumPy, Copyright (c) 2005-2016, NumPy Developers. All rights reserved.
 - Contains CnMeM under the same license, Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
 - Contains frozendict code from slezica’s python-frozendict:
   - Website: https://github.com/slezica/python-frozendict/blob/master/frozendict/__init__.py
   - Copyright (c) 2012 Santiago Lezica. All rights reserved.
 - Various functions in Util.py, TheanoUtil.py.

Contains code from albertz-system-tools:
 - Website: https://github.com/albertz/system-tools
 - No project license
 - Copyright Albert Zeyer
 - Various functions in Util.py.

Contains code from Lasagne:
 - Website: https://github.com/Lasagne/Lasagne
 - MIT License (MIT)
 - Copyright (c) 2014-2015 Lasagne contributors
 - Various functions in TheanoUtil.py.

Contains code from TensorFlow:
 - Website: https://github.com/tensorflow/tensorflow
 - Apache License 2.0
 - Copyright 2017 The TensorFlow Authors. All rights reserved.
 - Various functions in TFUtil.py, TFUpdater.py.
 - graph_editor from contrib.

Contains code from pumpikano-tf-dann:
 - Website: https://github.com/pumpikano/tf-dann
 - MIT License
 - Copyright Clayton Mellina
 - Function FlipGradientBuilder in TFUtil.py.

Contains code from tensorpack:
 - Website: https://github.com/ppwwyyxx/tensorpack
 - Apache License 2.0
 - Copyright Yuxin Wu
 - Some code in GeneratingDataset.py.

Contains code from subword-nmt:
 - Website: https://github.com/rsennrich/subword-nmt
 - MIT License (MIT)
 - Copyright (c) 2015 University of Edinburgh
 - Some code in GeneratingDataset.py.

Contains code from tensor2tensor:
 - Website: https://github.com/tensorflow/tensor2tensor
 - Apache License, Version 2.0
 - Copyright 2017 The Tensor2Tensor Authors
 - Some code in TFUtil.py, Util.py. Also avg_checkpoints.py.

Contains code from keithito-tacotron:
 - Website: https://github.com/keithito/tacotron
 - MIT License (MIT)
 - Copyright (c) 2017 Keith Ito
 - Some code in LmDataset.py.

Contains code from Tacotron-2:
 - Website: https://github.com/Rayhane-mamah/Tacotron-2
 - MIT License (MIT)
 - Copyright (c) 2018 Rayhane Mama
 - ZoneoutLSTMCell in TFNetworkRecLayer.py

Contains code from literal-python-to-pickle:
 - Website: https://github.com/albertz/literal-python-to-pickle
 - MIT License (MIT)
 - Copyright (c) 2021 Albert Zeyer
 - literal_py_to_pickle.py, py-to-pickle.cpp

Contains code from albertz-native-signal-handler:
 - Website: https://github.com/albertz/playground/blob/master/signal_handler.c
 - MIT License (MIT)
 - Copyright (c) 2023 Albert Zeyer

Contains code from Ruby:
 - https://www.ruby-lang.org/
 - BSD 2-clause "Simplified" License
 - Copyright 1995..2023 Yukihiro Matsumoto
 - Various code snippets

Contains code from CPython:
 - https://www.python.org/
 - Python Software Foundation License (PSF)
 - Copyright 2001..2021 Python Software Foundation
 - py-to-pickle.cpp

Contains code from PyTorch:
 - https://github.com/pytorch/pytorch/
 - BSD 3-Clause License
 - Copyright 2016..2023 various developers
 - Various code snippets

Various code snippets from StackOverflow, which are under Creative Commons / Public Domain.
