Placeholder Image

字幕表 動画を再生する

  • In this episode of tensorflow tip of the week, we'll look at how easy it is to incorporate tensorflow light into an android app.

  • This is Android studio with a simple empty app in it.

  • To use tensorflow light, the first thing that you need to do is add an implementation to your dependencies and build grader.

  • Also, make sure that you're a PT Options is set to know compress for T F light.

  • You'll also need to put your model into your assets folder.

  • Our model is called Linear because it in fares on a linear relationship of Y, equals two X minus one.

  • Now when your main activity there's also a few pieces of code that you'll need to add.

  • The first of these is to import the Tensorflow light interpreter.

  • Then you need to declare your interpreter object and you construct the interpreter, bypassing it.

  • A Function load model file, which loads the model from your assets folder as a map to bite Buffer.

  • This apple ready has a button on it called Unfair Button.

  • On its click handler.

  • You'll call a function called Do Inference, which uses the tensorflow light model.

  • You'll code that function next do inference receives an input string as the contents of an edit text.

  • When we pass our values to the neural network, we need to put them into an array.

  • This neural network just takes a single value, his input so we'll create that fromthe string that was sent into this function.

  • The output from the neural network is a two dimensional array, with one value in each access, so it's specified that next.

  • Then, to run the inference on the model, we simply called TF light dog run on passivity and put an output values.

  • TF Light then writes the results to the output value so we can read it out into a float, which we then return to the calling function.

  • Let's see what it looks like when we run it.

  • So, for example, if we import 10 the inferred value was 18.98 which is very closer to desired 19.

  • And for one, we unfair 1.6 which is also really close.

  • And that's not bad, considering this model was trained on only six items of data.

  • To learn more about tensorflow, visit tensorflow dot or GE on while you're at it.

  • Don't forget to subscribe to this channel.

In this episode of tensorflow tip of the week, we'll look at how easy it is to incorporate tensorflow light into an android app.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

AndroidアプリにTensorFlow Liteを追加する (TensorFlow Tip of the Week) (Add TensorFlow Lite to your Android App (TensorFlow Tip of the Week))

  • 2 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語