Update.
[pytorch.git] / attentiontoy1d.py
index cff8350..1dbd614 100755 (executable)
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
-# @XREMOTE_HOST: elk.fleuret.org
-# @XREMOTE_EXEC: /home/fleuret/conda/bin/python
-# @XREMOTE_PRE: killall -q -9 python || echo "Nothing killed"
-# @XREMOTE_GET: *.pdf *.log
+# Any copyright is dedicated to the Public Domain.
+# https://creativecommons.org/publicdomain/zero/1.0/
+
+# Written by Francois Fleuret <francois@fleuret.org>
 
 import torch, math, sys, argparse
 
@@ -12,7 +12,7 @@ from torch.nn import functional as F
 
 ######################################################################
 
-parser = argparse.ArgumentParser(description='Toy RNN.')
+parser = argparse.ArgumentParser(description='Toy attention model.')
 
 parser.add_argument('--nb_epochs',
                     type = int, default = 250)
@@ -147,7 +147,6 @@ def generate_sequences(nb):
 ######################################################################
 
 import matplotlib.pyplot as plt
-import matplotlib.collections as mc
 
 def save_sequence_images(filename, sequences, tr = None, bx = None):
     fig = plt.figure()