From 064baee01cc37b2b4650f39b5d041989a85e74ba Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Mon, 27 Jan 2020 21:08:41 +0100 Subject: [PATCH] fix mask TODO check this --- pts/model/transformer/transformer_network.py | 5 +---- .../events.out.tfevents.1580153441.DL-Box.12918.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580153873.DL-Box.13483.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580153899.DL-Box.13483.1 | Bin 0 -> 40 bytes .../events.out.tfevents.1580154363.DL-Box.14187.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580154738.DL-Box.14548.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580154827.DL-Box.14731.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580154901.DL-Box.14909.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580155072.DL-Box.14909.1 | Bin 0 -> 40 bytes .../events.out.tfevents.1580155125.DL-Box.15266.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580155349.DL-Box.15866.0 | Bin 0 -> 40 bytes .../events.out.tfevents.1580155546.DL-Box.16239.0 | Bin 0 -> 40 bytes 12 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 runs/Jan27_20-30-41_DL-Box/events.out.tfevents.1580153441.DL-Box.12918.0 create mode 100644 runs/Jan27_20-37-53_DL-Box/events.out.tfevents.1580153873.DL-Box.13483.0 create mode 100644 runs/Jan27_20-38-19_DL-Box/events.out.tfevents.1580153899.DL-Box.13483.1 create mode 100644 runs/Jan27_20-46-03_DL-Box/events.out.tfevents.1580154363.DL-Box.14187.0 create mode 100644 runs/Jan27_20-52-18_DL-Box/events.out.tfevents.1580154738.DL-Box.14548.0 create mode 100644 runs/Jan27_20-53-47_DL-Box/events.out.tfevents.1580154827.DL-Box.14731.0 create mode 100644 runs/Jan27_20-55-01_DL-Box/events.out.tfevents.1580154901.DL-Box.14909.0 create mode 100644 runs/Jan27_20-57-52_DL-Box/events.out.tfevents.1580155072.DL-Box.14909.1 create mode 100644 runs/Jan27_20-58-45_DL-Box/events.out.tfevents.1580155125.DL-Box.15266.0 create mode 100644 runs/Jan27_21-02-29_DL-Box/events.out.tfevents.1580155349.DL-Box.15866.0 create mode 100644 runs/Jan27_21-05-46_DL-Box/events.out.tfevents.1580155546.DL-Box.16239.0 diff --git a/pts/model/transformer/transformer_network.py b/pts/model/transformer/transformer_network.py index c5650d8..b068f1a 100644 --- a/pts/model/transformer/transformer_network.py +++ b/pts/model/transformer/transformer_network.py @@ -213,10 +213,7 @@ class TransformerNetwork(nn.Module): @staticmethod def upper_triangular_mask(d): - mask = torch.zeros_like(torch.eye(d)) - for k in range(d - 1): - mask = mask + torch.eye(d, d, k + 1) - return mask + return torch.triu(torch.ones((d,d))) class TransformerTrainingNetwork(TransformerNetwork): diff --git a/runs/Jan27_20-30-41_DL-Box/events.out.tfevents.1580153441.DL-Box.12918.0 b/runs/Jan27_20-30-41_DL-Box/events.out.tfevents.1580153441.DL-Box.12918.0 new file mode 100644 index 0000000000000000000000000000000000000000..d2e35e73d96297e5f41e6fedf3ff3962bbf925d3 GIT binary patch literal 40 rcmb1OfPlsI-b$SII!-grbzgUs;!P?_%*@ksElbTSu`-%?R&gx=$CM0W literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-37-53_DL-Box/events.out.tfevents.1580153873.DL-Box.13483.0 b/runs/Jan27_20-37-53_DL-Box/events.out.tfevents.1580153873.DL-Box.13483.0 new file mode 100644 index 0000000000000000000000000000000000000000..9ccf4d76b59a7269e015c70169d581b0e306a726 GIT binary patch literal 40 rcmb1OfPlsI-b$Q26B1a?cVBmu;!P?_%*@ksElbTSu`-hU_xcL}!VV1R literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-38-19_DL-Box/events.out.tfevents.1580153899.DL-Box.13483.1 b/runs/Jan27_20-38-19_DL-Box/events.out.tfevents.1580153899.DL-Box.13483.1 new file mode 100644 index 0000000000000000000000000000000000000000..b06fe3e8fe92d867261ca2dabde8991fde576b87 GIT binary patch literal 40 rcmb1OfPlsI-b$Rxo33)5@4oIR#hX-=n3<>NT9%quVr4YPbNW#L(*g|V literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-46-03_DL-Box/events.out.tfevents.1580154363.DL-Box.14187.0 b/runs/Jan27_20-46-03_DL-Box/events.out.tfevents.1580154363.DL-Box.14187.0 new file mode 100644 index 0000000000000000000000000000000000000000..6198af564984e40de6d537cf86378d12d834b2a7 GIT binary patch literal 40 rcmb1OfPlsI-b$RViJ$AvcVBmu;!P?_%*@ksElbTSu`)7kty~KL+VBkN literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-52-18_DL-Box/events.out.tfevents.1580154738.DL-Box.14548.0 b/runs/Jan27_20-52-18_DL-Box/events.out.tfevents.1580154738.DL-Box.14548.0 new file mode 100644 index 0000000000000000000000000000000000000000..c3f10fe6ab8f6d971032c0819f656e6dac640b87 GIT binary patch literal 40 rcmb1OfPlsI-b$QZob&FS@4oIR#hX-=n3<>NT9%quVr6vpr1fV2+`tXP literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-53-47_DL-Box/events.out.tfevents.1580154827.DL-Box.14731.0 b/runs/Jan27_20-53-47_DL-Box/events.out.tfevents.1580154827.DL-Box.14731.0 new file mode 100644 index 0000000000000000000000000000000000000000..308b3b2bb1a4b71bd9eeb7a6fac5d2d5323ae17c GIT binary patch literal 40 rcmb1OfPlsI-b$RWFWvfdzWchP6mL>dVrHJ6YguYuiItJ7`pXOe04okS literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-55-01_DL-Box/events.out.tfevents.1580154901.DL-Box.14909.0 b/runs/Jan27_20-55-01_DL-Box/events.out.tfevents.1580154901.DL-Box.14909.0 new file mode 100644 index 0000000000000000000000000000000000000000..b94d2e8962690a90f54ec4fd96325132df040041 GIT binary patch literal 40 rcmb1OfPlsI-b$RNNlC01y01G*@g@}|X6EU+mZj#ESQ&ZUR}cjNzz7RZ literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-57-52_DL-Box/events.out.tfevents.1580155072.DL-Box.14909.1 b/runs/Jan27_20-57-52_DL-Box/events.out.tfevents.1580155072.DL-Box.14909.1 new file mode 100644 index 0000000000000000000000000000000000000000..916161eedbdd7611f728c07de7a64386c7aabb45 GIT binary patch literal 40 rcmb1OfPlsI-b$Rd4ORvhy01G*@g@}|X6EU+mZj#ESQ)WMGKT{Iz^V$7 literal 0 HcmV?d00001 diff --git a/runs/Jan27_20-58-45_DL-Box/events.out.tfevents.1580155125.DL-Box.15266.0 b/runs/Jan27_20-58-45_DL-Box/events.out.tfevents.1580155125.DL-Box.15266.0 new file mode 100644 index 0000000000000000000000000000000000000000..214fd0895ccfc61a35985fbb43e53a699296096a GIT binary patch literal 40 rcmb1OfPlsI-b$QtpK@$3bYFLr;!P?_%*@ksElbTSu`*hEzi>4G+u03_ literal 0 HcmV?d00001 diff --git a/runs/Jan27_21-02-29_DL-Box/events.out.tfevents.1580155349.DL-Box.15866.0 b/runs/Jan27_21-02-29_DL-Box/events.out.tfevents.1580155349.DL-Box.15866.0 new file mode 100644 index 0000000000000000000000000000000000000000..b436f9207238e11c84429b2a1074e4f20c0f9bd1 GIT binary patch literal 40 rcmb1OfPlsI-b$RDzXM7ybYFLr;!P?_%*@ksElbTSu`-ge-jxUd(ufQ$ literal 0 HcmV?d00001 diff --git a/runs/Jan27_21-05-46_DL-Box/events.out.tfevents.1580155546.DL-Box.16239.0 b/runs/Jan27_21-05-46_DL-Box/events.out.tfevents.1580155546.DL-Box.16239.0 new file mode 100644 index 0000000000000000000000000000000000000000..de5af71ab8cd72e8c7cae9035851b661d6bbe1cf GIT binary patch literal 40 rcmb1OfPlsI-b$QYjcv;=bYFLr;!P?_%*@ksElbTSu`=pA5*h#i(xnWc literal 0 HcmV?d00001