Transformer What should I put in src_key_padding_mask ?

111489: <p>This is the problem I encountered when implementing “Transformers”. What should I put in src_key_padding_mask (float? bool? byte? int?)?<br>
What is the possible cause of this error?<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/0/40a05b9b550bc78b59c94c2aa12b848b0d169be0.png" data-download-href="https://discuss.pytorch.org/uploads/default/40a05b9b550bc78b59c94c2aa12b848b0d169be0" title="螢幕擷取畫面 2021-03-23 144607"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/40a05b9b550bc78b59c94c2aa12b848b0d169be0_2_690x353.png" alt="螢幕擷取畫面 2021-03-23 144607" data-base62-sha1="9dI7DyC4MP8gQ9FKTbhyw29Crug" width="690" height="353" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/40a05b9b550bc78b59c94c2aa12b848b0d169be0_2_690x353.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/40a05b9b550bc78b59c94c2aa12b848b0d169be0_2_1035x529.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/4/0/40a05b9b550bc78b59c94c2aa12b848b0d169be0.png 2x" data-dominant-color="F2F2F2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">螢幕擷取畫面 2021-03-23 144607</span><span class="informations">1377×706 72.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/8/380cc2fbc6e481e29c7149165941cf4867f7adb0.png" data-download-href="https://discuss.pytorch.org/uploads/default/380cc2fbc6e481e29c7149165941cf4867f7adb0" title="螢幕擷取畫面 2021-03-23 144646"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/3/8/380cc2fbc6e481e29c7149165941cf4867f7adb0_2_690x325.png" alt="螢幕擷取畫面 2021-03-23 144646" data-base62-sha1="7ZQ4XLlQ9JOvghDuRVNTQZvF5W8" width="690" height="325" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/3/8/380cc2fbc6e481e29c7149165941cf4867f7adb0_2_690x325.png, https://discuss.pytorch.org/uploads/default/optimized/3X/3/8/380cc2fbc6e481e29c7149165941cf4867f7adb0_2_1035x487.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/3/8/380cc2fbc6e481e29c7149165941cf4867f7adb0_2_1380x650.png 2x" data-dominant-color="F8F8FB"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">螢幕擷取畫面 2021-03-23 144646</span><span class="informations">1680×792 63.2 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/d/1dc3ac799e2fee084d2bc8e1e4b242cfa20a6660.png" data-download-href="https://discuss.pytorch.org/uploads/default/1dc3ac799e2fee084d2bc8e1e4b242cfa20a6660" title="螢幕擷取畫面 2021-03-23 144733"><img src="https://discuss.pytorch.org/uploads/default/original/3X/1/d/1dc3ac799e2fee084d2bc8e1e4b242cfa20a6660.png" alt="螢幕擷取畫面 2021-03-23 144733" data-base62-sha1="4fj4GU6JRQ40gp1tH4715iGWSdi" width="690" height="405" data-dominant-color="F6F6FA"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">螢幕擷取畫面 2021-03-23 144733</span><span class="informations">1340×787 41.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/7/d7e34bcd2ac80838f5c76761c701be8ce144d2e3.png" data-download-href="https://discuss.pytorch.org/uploads/default/d7e34bcd2ac80838f5c76761c701be8ce144d2e3" title="螢幕擷取畫面 2021-03-23 144757"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/7/d7e34bcd2ac80838f5c76761c701be8ce144d2e3_2_690x167.png" alt="螢幕擷取畫面 2021-03-23 144757" data-base62-sha1="uNPDpZo6GRsRNJauhZK5m9A7JGr" width="690" height="167" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/7/d7e34bcd2ac80838f5c76761c701be8ce144d2e3_2_690x167.png, https://discuss.pytorch.org/uploads/default/optimized/3X/d/7/d7e34bcd2ac80838f5c76761c701be8ce144d2e3_2_1035x250.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/d/7/d7e34bcd2ac80838f5c76761c701be8ce144d2e3_2_1380x334.png 2x" data-dominant-color="F7F7FC"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">螢幕擷取畫面 2021-03-23 144757</span><span class="informations">1727×418 24.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I don’t know where the possible error is, he didn’t give a hint</p>