Skip to content

Commit

Permalink
Merge pull request #233 from jonasrauber/graph_assertion
Browse files Browse the repository at this point in the history
catch graph mismatch earlier
  • Loading branch information
jonasrauber authored Nov 5, 2018
2 parents 9ce045b + 4b0932e commit 6a7628e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions foolbox/models/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def __init__(
self._created_session = True
else:
self._created_session = False
assert session.graph == images.graph, \
'The default session uses the wrong graph'

with session.graph.as_default():
self._session = session
Expand Down

0 comments on commit 6a7628e

Please sign in to comment.