Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

13 Commits

Repository files navigation

This is a collection of examples for how to use and extend TensorFlow.

Deep learning materials

CNN

http://www.wildml.com/2015/11/understanding-convolutional-neural-networks-for-nlp/http://cs231n.github.io/convolutional-networks/http://xrds.acm.org/blog/2016/06/convolutional-neural-networks-cnns-illustrated-explanation/https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/

RNN

http://karpathy.github.io/2015/05/21/rnn-effectiveness/

LSTM

http://colah.github.io/posts/2015-08-Understanding-LSTMs/

CUDA

https://devblogs.nvidia.com/parallelforall/easy-introduction-cuda-c-and-c/

People & Blog

https://twitter.com/dennybritzhttp://www.kentran.net/http://eli.thegreenplace.net/http://blog.dennybritz.com/

An advanced example

This example shows the use of the low level function tf.gradients() The definiton of function R=R(x,y) is taken from the example on this Wiki page. If you are interested in creating new Optimizers for Tensorflow you may want to continue reading this example.

importtensorflowastf# define symbolic variablesx=tf.placeholder("float") y=tf.placeholder("float")
# define a function R=R(x,y)R=0.127-(x*0.194/(y+0.194))
# The derivative of R with respect to yRdy=tf.gradients(R, y); # Launch a session for the default graph to comput dR/dy at (x,y)=(0.362, 0.556)sess=tf.Session()
result=sess.run(Rdy, {x:0.362,y:0.556})
printresult#[0.12484978]

The above example actually is implemented in one of my project SymJava which provides symbolic-numeric computations with just-in-time (JIT) compilation.

publicclassExample0 {
publicstaticvoidmain(String[] args) {
ExprR = 0.127-(x*0.194/(y+0.194));
ExprRdy = R.diff(y);
System.out.println(Rdy);
//Just-In-Time compile the symbolic expression to native codeBytecodeFuncfunc = JIT.compile(newExpr[]{x,y}, Rdy);
System.out.println(func.apply(0.362, 0.556));
}
}

About

Advanced examples for using Tensorflow

Topics

Resources

Stars

18 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages