nengo / nengo-loihi

Run Nengo models on Intel's Loihi chip
https://www.nengo.ai/nengo-loihi/
Other
35 stars 12 forks source link

Do not import TensorFlow/NengoDL unless needed #268

Open hunse opened 4 years ago

hunse commented 4 years ago

The TensorFlow import is pretty slow. Right now we import it just to check if it's there, so that we can set the HAS_TF variable accordingly. Ideally, we would only be doing anything with TensorFlow/NengoDL if the user does something that asks for it. For example, if the user instantiates a LoihiSpikingRectifiedLinear neuron, then we might want to make sure the nengo_dl builders get added then (I feel like I've done this somewhere, but it's not in master).