Skip to content

Commit

Permalink
Fix path name issue for attention plots
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Aug 10, 2019
1 parent b43cced commit 8652895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def time_since(started):
def save_attention(attn, path):
fig = plt.figure(figsize=(12, 6))
plt.imshow(attn.T, interpolation='nearest', aspect='auto')
fig.savefig(f'{path}.png', bbox_inches='tight')
fig.savefig(path.parent/f'{path.stem}.png', bbox_inches='tight')
plt.close(fig)


Expand All @@ -97,7 +97,7 @@ def save_spectrogram(M, path, length=None):
plt.close(fig)


def plot(array):
def plot(array):
mpl.interactive(True)
fig = plt.figure(figsize=(30, 5))
ax = fig.add_subplot(111)
Expand Down

0 comments on commit 8652895

Please sign in to comment.