BCE masked loss and padding stop_tokens with 0s not 1s

This commit is contained in:
erogol
2020-02-25 14:17:20 +01:00
parent a5d919cec8
commit a68012aec2
3 changed files with 34 additions and 5 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ def prepare_tensor(inputs, out_steps):
def _pad_stop_target(x, length):
_pad = 1.
_pad = 0.
assert x.ndim == 1
return np.pad(
x, (0, length - x.shape[0]), mode='constant', constant_values=_pad)