How to use returnn - 1 common examples

To help you get started, we’ve selected a few returnn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github albertz / playground / View on Github external
def test():
  import os
  import numpy
  import tensorflow.contrib
  import returnn.TFUtil
  funcs = [f for name, f in globals().items() if name.startswith("get_mod_from_dict_")]
  mods = [sys, os, gc, pprint, better_exchook, numpy, tensorflow, tensorflow.contrib, returnn, returnn.TFUtil]
  for f in funcs:
    print("Testing func:", f)
    for mod in mods:
      print("Testing mod:", mod)
      d = get_dict_from_mod(mod)
      mod2 = f(d)
      assert mod2 and vars(mod2) is d
      # Note: For lazy module loaders, such as in RETURNN,
      # we do not necessarily have `mod is mod2`.
      if mod is not mod2:
        print("Note: Mod is different:", mod2)


The RWTH extensible training framework for universal recurrent neural networks

Latest version published 4 days ago

Package Health Score

78 / 100
Full package analysis

Popular returnn functions