Skip to content

Commit bb2b4ea

Browse files
committed
plt.pause in neural style for interactive plots
1 parent 8d71242 commit bb2b4ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

advanced_source/neural_style_tutorial.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def imshow(tensor, title=None):
233233
plt.imshow(image)
234234
if title is not None:
235235
plt.title(title)
236+
plt.pause(0.001) # pause a bit so that plots are updated
236237

237238

238239
plt.figure()

0 commit comments

Comments
 (0)