Placeholder Image

字幕表 動画を再生する

  • if you've ever wanted to do step by step debugging of tensorflow projects.

  • But you didn't know how.

  • Check out this video where in just a couple of minutes, I'll get you set up to use it with the pie charm I D if you like, May and you like to write a few lines of code at a time and then step through them to make sure that they behave properly.

  • But you're stuck a little bit with doing that with Python in Tensorflow.

  • Then this video is for you.

  • Here I have a very simple hello world type application where I'm going to train a model and then run inference on it.

  • So here I'm feeding the model with a set of exes and wise, and there's a relationship between X and Y.

  • It's a linear relationship, and if you think about it, you'll see that why equals two X minus one?

  • So, for example, if X equals 42 x minus one is savin when X equals 32 X minus one is five, etcetera, etcetera.

  • So with only just a few points of data, I'm going to train a model and note that I'm not telling it the formula of just training it on data and then I'll try to unfair from that.

  • What the Y values should be when X equals 10.

  • Now we know that that's 19 but what will the model in fair?

  • So let's take a look at debugging it.

  • I'm going to set a break point.

  • And just like I would with Android Studio of Visual studio, I can run a debug, the D bugger will launch, and now you can see I'm in step by step debugging.

  • So here I have my model, and if I click Stapp to step over its I've created it, and I could even take a peek inside of it.

  • Here I had my layer, and it's just one with one note.

  • So it's not really a network, but it's more like a single neuron.

  • And now I can step over the compilation of the model and specifying the loss and optimizer functions for my exes and wise, you can see that they're numb pyre raise, so when I step over them, I can inspect those it directly in the D bugger.

  • So now when I run modeled outfit on, I'm passing my exes and wise in, I can see that the correct data is being passed into the training of the network.

  • So if something goes wrong, I know it's not because of the data.

  • So now when I step over that we can see the training takes place.

  • Now I have a trained model so I can step to the next line and start looking at predicting values based on that model.

  • So let's predict values for 10 11 12 and 13.

  • And when I run model predict on these values and printed out, we can see the answers in the console.

  • The results are pretty close.

  • For 10 I would have expected 19 and for 11 I would get 21.

  • But you can see that the model is getting very, very close to that.

  • So that's today's tip using the step by step the bugger.

  • It was a very simple scenario, but it really helps demystify some of the stuff that goes on in a tensorflow application.

  • It's amazingly useful, particularly as you prepare your data for training to be able to inspect it.

if you've ever wanted to do step by step debugging of tensorflow projects.

字幕と単語

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

A2 初級

PyCharm IDEを使ってTensorFlowプロジェクトをデバッグする (TensorFlow Tip of the Week) (De-bug your TensorFlow projects with the PyCharm IDE (TensorFlow Tip of the Week))

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