B1 中級 5 タグ追加 保存
in this episode, we're going to create a very simple machine learned model and converted to tensorflow Light for use on mobile or I ot devices to start will create a simple model using care us.
The simplest possible neural network has one layer with one unit, and that takes a single input in care.
You'll then compile the model specifying two functions, the lost function and the optimizer on every iteration.
The framework calculates the loss using the method specified and then tries to optimize the neural network using the optimizer that specified.
Now we'll create a set of X values from negative ones of four, and now I'll create a set of corresponding Why values for these X values.
The goal will be to infer the relationship between the two.
Can you see what it is?
Every y value is two X minus one.
So where X is minus one, why is minus three where X zero?
Why is minus one, etcetera, etcetera.
To train the neural network, we use model dot faint passing it.
The ex is the wise and a number of iterations that we want to train for in this case will say 500.
So how do we test the model to see if a cannon fair y equals two X minus one for a new value that's achieved?
Using the predict method, we simply past 10 into it in an input shape, which is an array of one.
We then run the code on the network will be trained, and we'll see that the output is 19.5 which is very close to our desired value.
Given that we train the network with a very small data set, it's still quite impressive.
Now that we have a model, we can save it out as a file.
This is achieved using the save model method and care us.
We'll run it on will then see that linear don't H five is created.
Finally will convert to T F light using the Tokyo converter.
This is achieved with the from caress model file Method will pass the caress file into it.
We then called a converted to convert and save its results is linear dot cf light.
We can run it and then we'll see that linear dot cf Lite has created for us to learn more about tensorflow.
Visit tensorflow dot or ge on while you're at it.
Don't forget to subscribe to this channel.


How to convert your ML model to TensorFlow Lite (TensorFlow Tip of the Week)

林宜悉 2020 年 3 月 25 日 に公開
  1. 1. クリック一つで単語を検索


  2. 2. リピート機能


  3. 3. ショートカット


  4. 4. 字幕の表示/非表示


  5. 5. 動画をブログ等でシェア


  6. 6. 全画面再生


  1. クイズ付き動画


  1. クリックしてメモを表示

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔