So, I have tried to implement the model more or less "from scratch" on the basis of this repository.
For that I have implemented a training loop which I am executing eagerly to be able to debug.
However, in doing so I noticed that my loss is just jumping around weirdly and I still haven't figured out exactly why. In order to get insight I intended to take a closer look towards the rnnt_loss() function. While I executed some simple text-examples, I noticed that calling rnnt_losss()repeatedly on the same input, the loss is always different. But not just that: It's monotonically increasing.
The code I am running:
from warprnnt_tensorflow import rnnt_loss
import numpy as np
def main():
acts = np.asarray([
[
[[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0]],
[[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0]],
[[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0]],
]
])
labels = np.asarray([[1, 2, 0]])
label_lengths = [len(t) for t in labels]
for i in range(10):
loss = rnnt_loss(
acts=acts,
labels=labels,
input_lengths=label_lengths,
label_lengths=label_lengths
)
print(np.mean(loss))
if __name__ == '__main__':
main()
So, I have tried to implement the model more or less "from scratch" on the basis of this repository.
For that I have implemented a training loop which I am executing eagerly to be able to debug.
However, in doing so I noticed that my loss is just jumping around weirdly and I still haven't figured out exactly why. In order to get insight I intended to take a closer look towards the
rnnt_loss()
function. While I executed some simple text-examples, I noticed that callingrnnt_losss()
repeatedly on the same input, the loss is always different. But not just that: It's monotonically increasing.The code I am running:
Output:
I am on
tensorflow==2.2.0
and I compiled the warp-transducer with GPU support.