Skip to content

Commit

Permalink
fixed the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rauber committed Jul 25, 2017
1 parent ec22c01 commit 764df3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/user/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This option is recommended if you want to create the TensorFlow session yourself
.. code-block:: python3
with tf.Session() as session:
restorer.restore(model.session, '/path/to/vgg_19.ckpt')
restorer.restore(session, '/path/to/vgg_19.ckpt')
model = foolbox.models.TensorFlowModel(images, logits, (0, 255))
print(np.argmax(model.predictions(image)))
Expand All @@ -77,7 +77,7 @@ This option is recommended if you want to avoid nesting context managers, e.g. d
.. code-block:: python3
session = tf.InteractiveSession()
restorer.restore(model.session, '/path/to/vgg_19.ckpt')
restorer.restore(session, '/path/to/vgg_19.ckpt')
model = foolbox.models.TensorFlowModel(images, logits, (0, 255))
print(np.argmax(model.predictions(image)))
session.close()
Expand All @@ -91,7 +91,7 @@ This is possible, but usually one of the other options should be preferred.
session = tf.Session()
with session.as_default():
restorer.restore(model.session, '/path/to/vgg_19.ckpt')
restorer.restore(session, '/path/to/vgg_19.ckpt')
model = foolbox.models.TensorFlowModel(images, logits, (0, 255))
print(np.argmax(model.predictions(image)))
session.close()
Expand Down

0 comments on commit 764df3c

Please sign in to comment.