use 0 padding for stop tokens, which seems not working after padding_idx

This commit is contained in:
erogol 2020-02-25 11:52:26 +01:00
parent e6504cc9a4
commit a5d919cec8
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ def prepare_data(inputs):
def _pad_tensor(x, length): def _pad_tensor(x, length):
_pad = 0 _pad = 0.
assert x.ndim == 2 assert x.ndim == 2
x = np.pad( x = np.pad(
x, [[0, 0], [0, length - x.shape[1]]], x, [[0, 0], [0, length - x.shape[1]]],