nengo / nengo-dl

Deep learning integration for Nengo
https://www.nengo.ai/nengo-dl
Other
88 stars 22 forks source link

Re-enable eager mode #163

Closed drasmuss closed 4 years ago

drasmuss commented 4 years ago

We had disabled eager mode for performance reasons, but there have been some recent performance improvements so we're trying it out again.

This also necessitated some changes to how the build system is set up. Since the TensorGraph.call function may be called multiple times in eager mode, rather than once per graph, we need to separate the OpBuilder.__init__(which we only want to happen once) from the new OpBuilder.build_pre (which we want to happen each time call is executed).

Fixes #160 (in that in eager-mode you can create constants larger than 2GB; the problem persists in graph mode, but that's just a limitation of graph mode).

Fixes #156 (in eager mode; as above, problem persists in graph mode but I don't think it's worth looking into any further there as it's an underlying problem with TensorFlow's graph mode).

Fixes #109 (in eager mode, same as above).