romcomma.user.contexts.Environment§

Environment(name='', device='', **kwargs)[source]§

Context Manager setting up the environment to run operations.

Parameters:
  • name (str) – The name of this context, ``print``ed as what is being run. The (default) empty string will not be timed.

  • device (str) – The device to run on. If this ends in the regex [C,G]PU* then the logical device /[C,G]PU* is used, otherwise device allocation is automatic.

  • **kwargs – Is passed straight to the implementation GPFlow manager. Note, however, that float=float32 is inoperative due to SciPy. eager=bool is passed to tf.config.run_functions_eagerly.