2/ In classic Tensorflow, this just works:
y = tf.layers.dense(x, 10)
It creates a 10-neuron dense layer with appropriate weights and biases. Where do these weights live? In a global somewhere. Convenient but hair-curling for a software developer ! #noglobalvariables
-
-
এই থ্রেডটি দেখান
-
3/ In Eager mode, you know where your weights are because you have to put them somewhere yourself. My preferred pattern: a basic class. Define your layers in the constructor, line them up according to your preferred architecture in a "predict" function.pic.twitter.com/zhh3qsMraS
এই থ্রেডটি দেখান -
4/ You need a loss function, comparing what your model makes of the features against a target answer "yt"pic.twitter.com/zqMLv31SLx
এই থ্রেডটি দেখান -
5/ Tensorflow eager knows how to compute the gradient for this loss, relatively to the implicit weights and biases of your layers. "grads" is now a function of the same parameters as your loss function.pic.twitter.com/134PBH43d9
এই থ্রেডটি দেখান -
-
7/ And finally the training loop. You are passing your model as a parameter to grads so it is pretty obvious what weights and biases are being modified by the training.pic.twitter.com/l2aoPOWFhF
এই থ্রেডটি দেখান -
8/ To pipe data into your training loop, my_next_batch() can be implemented with vanilla Python or use the http://tf.data .Dataset API which allows training on out of memory datasets. In eager mode, it is very natural to use:pic.twitter.com/ygggQGjizG
এই থ্রেডটি দেখান -
9/ For power-users, there are alternative functions for computing gradients in eager mode: implicit_value_and_gradients gets the value of the loss at the same time as gradients. The code above can be made slightly more efficient:pic.twitter.com/q2eUvBzQWJ
এই থ্রেডটি দেখান -
10/ Also, tfe.GradientTape for differentiating any piece of code against any set of variables. Handy if you do not want to wrap your loss into a function and know the list of trainable variables explicitly, as in Keras Models where the list is in model.variables.pic.twitter.com/zs7sXgyrDC
এই থ্রেডটি দেখান -
11/ The code in a colab notebook for you to play with:https://drive.google.com/file/d/1WjjGLESzzyL2WLRjcpNBCmz1vFwsDNev/view?usp=sharing …
এই থ্রেডটি দেখান -
12/ And now the really cool part. Here is my model paused during training in a vanilla Python debugger: the values of weights, biases, activations, you name it are now visible. Yay! Eager rocks!pic.twitter.com/LiSTVwCvGy
এই থ্রেডটি দেখান
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
Oh Tensorflow and Terraform have the same acronym (tf). I imagine discussions about tf tf ^^.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
I guess this leads to models that are not compatible with tf.js, right?
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Still no inductive inference. Letting water flow downhill isn't pumping it up.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
লোড হতে বেশ কিছুক্ষণ সময় নিচ্ছে।
টুইটার তার ক্ষমতার বাইরে চলে গেছে বা কোনো সাময়িক সমস্যার সম্মুখীন হয়েছে আবার চেষ্টা করুন বা আরও তথ্যের জন্য টুইটারের স্থিতি দেখুন।
To begin, import and enable eager mode: