def undo_patch(request): tensorflow_patch.undo_patch() yield tensorflow_patch.patch_dynamic_stitch_grad() tensorflow_patch.patch_state_grads()
del sys # need to explicitly import these to trigger the builder registration from nengo_dl import (op_builders, neuron_builders, process_builders, learning_rule_builders, transform_builders) # import into top-level namespace from nengo_dl import dists, objectives from nengo_dl.simulator import Simulator from nengo_dl.tensor_node import TensorNode, tensor_layer, reshaped from nengo_dl.config import configure_settings from nengo_dl.neurons import SoftLIFRate # shortcut for objective namespace obj = objectives # apply tensorflow monkey patches from nengo_dl import tensorflow_patch tensorflow_patch.patch_dynamic_stitch_grad() tensorflow_patch.patch_state_grads() # filter out "INFO" level log messages import os import tensorflow as tf os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1" tf.logging.set_verbosity(tf.logging.WARN) del os del tf