On-Device Machine Learning: Text Generation on Android
Now that we have converted our model, we can focus on actually building our app. The entire source code is available on GitHub, so here I'm only going to focus on the most interesting parts. In the Python script, we specified (lines 6/7) that our model is going to take as input a bidimensional array of integers of shape [1, 64], i.e. something like this, where the inner array contains 64 elements: But what we're going to have in real life is a string, corresponding to the current text. We thus need to convert that string into integers, a.k.a. Roughly, we can say that a token is a numeral representation of a part of our string.
Dec-21-2019, 00:17:27 GMT
- Technology: