projects
/
pytorch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f16f4a
)
Update.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 19 May 2020 13:29:26 +0000
(15:29 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 19 May 2020 13:29:26 +0000
(15:29 +0200)
attentiontoy1d.py
patch
|
blob
|
history
diff --git
a/attentiontoy1d.py
b/attentiontoy1d.py
index
1dbd614
..
6540a0f
100755
(executable)
--- a/
attentiontoy1d.py
+++ b/
attentiontoy1d.py
@@
-10,6
+10,8
@@
import torch, math, sys, argparse
from torch import nn
from torch.nn import functional as F
+import matplotlib.pyplot as plt
+
######################################################################
parser = argparse.ArgumentParser(description='Toy attention model.')
@@
-146,8
+148,6
@@
def generate_sequences(nb):
######################################################################
-import matplotlib.pyplot as plt
-
def save_sequence_images(filename, sequences, tr = None, bx = None):
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)